Platforms to show: All Mac Windows Linux Cross-Platform
ClipperPolyTreeMBS class
Super class: ClipperPolyNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Clipper | MBS Tools Plugin | 18.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
It's an alternative to the Paths data structure which also receives these solutions. PolyTree's two major advantages over the Paths structure are: it properly represents the parent-child relationships of the returned polygons; it differentiates between open and closed paths. However, since PolyTree is a more complex structure than the Paths structure, and since it's more computationally expensive to process (the Execute method being roughly 5-10% slower), it should used only be when parent-child polygon relationships are needed, or when open paths are being 'clipped'.
An empty PolyTree object can be passed as the solution parameter in ClipperEngineMBS.Execute and in ClipperOffsetMBS.Execute. Once the clipping or offseting operation is completed, the method returns with the PolyTree structure filled with data representing the solution.
A PolyTree object is a container for any number of PolyNode children, with each contained PolyNode representing a single polygon contour (either an outer or hole polygon). PolyTree itself is a specialized PolyNode whose immediate children represent the top-level outer polygons of the solution. (Its own Contour property is always empty.) The contained top-level PolyNodes may contain their own PolyNode children representing hole polygons that may also contain children representing nested outer polygons etc. Children of outers will always be holes, and children of holes will always be outers.
PolyTrees can also contain open paths. Open paths will always be represented by top level PolyNodes. Two functions are provided to quickly separate out open and closed paths from a polytree - OpenPathsFromPolyTree and ClosedPathsFromPolyTree.
Subclass of the ClipperPolyNodeMBS class.
- 2 properties
- property First as ClipperPolyNodeMBS
- property Total as Integer
- 3 methods
- method Clear
- method Constructor
- method Constructor(otherPolyNodes as ClipperPolyTreeMBS)
Super class ClipperPolyNodeMBS
- 10 properties
- property ChildCount as Integer
- property Childs as ClipperPolyNodesMBS
- property Contour as ClipperPathMBS
- property Handle as Integer
- property IsHole as Boolean
- property IsOpen as Boolean
- property NextNode as ClipperPolyNodeMBS
- property Owner as Variant
- property ParentNode as ClipperPolyNodeMBS
- property Tag as Variant
- method Constructor
This class has no sub classes.
Some methods using this class:
- ClipperEngineMBS.Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, fillType as ClipperMBS.PolyFillType) as Boolean
- ClipperEngineMBS.Execute(clipType as ClipperMBS.ClipType, byref solution as ClipperPolyTreeMBS, subjFillType as ClipperMBS.PolyFillType, clipFillType as ClipperMBS.PolyFillType) as Boolean
- ClipperEngineMBS.Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, fillType as Integer) as Boolean
- ClipperEngineMBS.Execute(clipType as Integer, byref solution as ClipperPolyTreeMBS, subjFillType as Integer, clipFillType as Integer) as Boolean
- ClipperMBS.ClosedPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)
- ClipperMBS.OpenPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)
- ClipperMBS.PolyTreeToPaths(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)
- ClipperOffsetMBS.Execute(byref PolyTree as ClipperPolyTreeMBS, delta as double)
The items on this page are in the following plugins: MBS Tools Plugin.
ClipperPolyNodesMBS - CLKernelMBS