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
I understand that the Polygon class treats polygons mostly like curves rather than 2D shapes. Still, there are some methods (like encloses and area) which pertain to the region enclosed by the polygon.
In this direction someone asked about finding the Intersection between Segment and Interior of Polygon in SymPy on Stack Overflow. They wanted specifically the length, but I imagine one may also want to geometric object, union of line segments.
Should there be something like Polygon.fill().intersect(Segment) method, returning the intersection set? (I am not sure about the API here, do we want a FilledPolygon class object returned by Polygon.fill() method?) My answer on SO has a sketch of a possible approach to this.
The text was updated successfully, but these errors were encountered:
normalhuman
changed the title
Length of intersection of a line segment with the interior of a polygon
Intersection of a line segment with the interior of a polygon
Jan 15, 2018
I have shied away from such additions because there are much better options available for dealing with filled regions. After a quick look, I think it was shapely that I had looked at before.
One thing we haven't implemented yet is a footprint area which ignores self intersections of segments. (See this repo for a possible routine to use/modify and related discussion here.)
I understand that the Polygon class treats polygons mostly like curves rather than 2D shapes. Still, there are some methods (like
encloses
andarea
) which pertain to the region enclosed by the polygon.In this direction someone asked about finding the Intersection between Segment and Interior of Polygon in SymPy on Stack Overflow. They wanted specifically the length, but I imagine one may also want to geometric object, union of line segments.
Should there be something like
Polygon.fill().intersect(Segment)
method, returning the intersection set? (I am not sure about the API here, do we want a FilledPolygon class object returned byPolygon.fill()
method?) My answer on SO has a sketch of a possible approach to this.The text was updated successfully, but these errors were encountered: