OpenJSCAD.org icon indicating copy to clipboard operation
OpenJSCAD.org copied to clipboard

feat(modeling): enhanced poly2 into a complete geometry

Open z3dev opened this issue 3 years ago • 1 comments

IN PROGRESS, DO NOT MERGE

These changes enhance poly2 into a complete geometry, i.e. useful geometry with complete functionality. Several missing functions were added, such as isA(), clone(), etc.

There was one small API change, changing flip() to reverse() to follow other 2D geometry naming.

In addition, the following special functions have been added:

  • isConvex() to determine if a polygon is convex
  • isSimple() to determine if a polygon is simple with no intersecting segments

All Submissions:

  • [ ] Have you followed the guidelines in our Contributing document?
  • [ ] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [ ] Does your submission pass tests?

z3dev avatar Jul 09 '22 06:07 z3dev

@platypii please take a quick scan of these changes for poly2. basically, i'm headed for a means of converting closed paths (polygons) into geom2 easily, i.e. correcting the issues users are reporting when importing SVG. there are a couple more functions coming, isSimple() to check if a polygon is non-crossing, and decompose() as suggested by @jue89 as part of #968

z3dev avatar Jul 09 '22 06:07 z3dev

these changes are moving to V3

z3dev avatar Jan 05 '23 08:01 z3dev