Clpr.PolyTreeD
PolyTreeD.t
is a read-only data structure that receives solutions from clipping operations. It's an alternative to the PathsD.t
data structure which also receives solutions. However the principle advantage of PolyTreeD.t
over PathsD.t
is that it also represents the parent-child relationships of the polygons in the solution (where a parent's polygon will contain all its children polygons).
The PolyTreeD.t
object that's to receive a clipping solution is passed as a parameter to ClipperD.execute
. When the clipping operation finishes, this object will be populated with data representing the clipped solution.
A PolyTreeD.t
object is a container for any number of PolyTreeD.t
child objects, each representing a single polygon contour. The top-level descendents of a PolyTreeD.t
solution will always be outer polygon contours. Children may in turn contain their own children to any level of nesting. Children of outer polygon contours will always represent holes, and children of holes will always represent nested outer polygon contours.
PolyTreeD.t
will never contain open paths since open paths can't contain paths. When clipping open paths, these will always be represented in solutions via a separate PathsD.t
structure.