Reputation: 114481
ClipperLib documentation about offset operation says among preconditions:
- The orientations of closed paths must be consistent such that outer polygons share the same orientation, and any holes have the opposite orientation (ie non-zero filling). Open paths must be oriented with closed outer polygons.
(emphasis mine)
What is the definition of orientation for an open path?
Upvotes: 1
Views: 248
Reputation: 114481
The definition of orientation makes sense only for closed paths, that is a typo in the documentation.
Also if the input is not sorted and oriented (i.e. the area you want to offset is defined as a collection of closed loops assuming even-odd filling rule and it's unknown what loops are holes and what are boundaries) a solution is to perform the operation in two steps
This is possible because results from clipperlib operations are always sorted and oriented.
Upvotes: 0