You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, faces are tested for containment within one another by converting to polygons and using geo to test containment of those polygons. However, all Segments are converted to polygons by adding a (straight) line from the start point to the end point. This can differ significantly from the true area if the Segment is of type Segment::Arc.
This test constructs a circle of radius 1 by joining 4 quarter-circle Arc segments and compares it against a circle of radius 0.99.
Expected Outcome
Test passes.
Actual Outcome
The assertion that arcs.as_polygon().contains(&ring.as_polygon()) fails because the former is rendered as a diamond (with vertices at [(-1, 0), (0, -1), (1, 0), (0, 1)]) and the latter as a 36-gon of radius 0.99.
The text was updated successfully, but these errors were encountered:
I do have some WIP on replacing geo for our more simple case that would resolve this, but I'm not sure when I will have a chance to finish that work. Thus, I wanted to at least capture it here.
Overview
Currently, faces are tested for containment within one another by converting to polygons and using
geo
to test containment of those polygons. However, allSegment
s are converted to polygons by adding a (straight) line from the start point to the end point. This can differ significantly from the true area if theSegment
is of typeSegment::Arc
.Steps to Reproduce
This test constructs a circle of radius 1 by joining 4 quarter-circle
Arc
segments and compares it against a circle of radius 0.99.Expected Outcome
Test passes.
Actual Outcome
The assertion that
arcs.as_polygon().contains(&ring.as_polygon())
fails because the former is rendered as a diamond (with vertices at [(-1, 0), (0, -1), (1, 0), (0, 1)]) and the latter as a 36-gon of radius 0.99.The text was updated successfully, but these errors were encountered: