Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

ClipperMBS.Area(path as ClipperPathMBS) as double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: This function returns the area of the supplied polygon.
Notes: It's assumed that the path is closed and does not self-intersect. Depending on orientation, this value may be positive or negative. If Orientation is true, then the area will be positive and conversely, if Orientation is false, then the area will be negative.

Feedback, Comments & Corrections

ClipperMBS.CleanPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, distance as double = 1.415)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates a clean polygon.
Notes:
Removes vertices:
that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear)
that are within the specified distance of an adjacent vertex
that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices
Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the InPoly and OutPolys parameters can reference the same Path object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

See also:

Feedback, Comments & Corrections

ClipperMBS.CleanPolygon(Poly as ClipperPathMBS, distance as double = 1.415)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates a clean polygon.
Notes:
Removes vertices:
that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear)
that are within the specified distance of an adjacent vertex
that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices
Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the in_poly and out_poly parameters can reference the same Path object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

See also:

Feedback, Comments & Corrections

ClipperMBS.CleanPolygons(InPoly as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, distance as double = 1.415)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates clean polygons.
Notes:
Removes vertices:
that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear)
that are within the specified distance of an adjacent vertex
that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices
Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the InPoly and OutPoly parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

See also:

Feedback, Comments & Corrections

ClipperMBS.CleanPolygons(Poly as ClipperPathsMBS, distance as double = 1.415)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates clean polygons.
Notes:
Removes vertices:
that join co-linear edges, or join edges that are almost co-linear (such that if the vertex was moved no more than the specified distance the edges would be co-linear)
that are within the specified distance of an adjacent vertex
that are within the specified distance of a semi-adjacent vertex together with their out-lying vertices
Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

This function is overloaded. In the first definition, the InPoly and OutPoly parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

See also:

Feedback, Comments & Corrections

ClipperMBS.ClosedPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: This function filters out open paths from the PolyTree structure and returns only closed paths in a Paths structure.

Feedback, Comments & Corrections

ClipperMBS.EllipsePoints(Left as Double, Top as Double, Right as Double, Bottom as Double) as ClipperPathMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates an ellipse as path of points with given bounding rectangle.
Example:
dim p as ClipperPathMBS = ClipperMBS.EllipsePoints(100,100,300,300)

Feedback, Comments & Corrections

ClipperMBS.MinkowskiDiff(poly1 as ClipperPathMBS, poly2 as ClipperPathMBS, byref solution as ClipperPathsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates Minkowski Difference.
Notes:
Minkowski Difference is performed by subtracting each point in a polygon from the set of points in an open or closed path. A key feature of Minkowski Difference is that when it's applied to two polygons, the resulting polygon will contain the coordinate space origin whenever the two polygons touch or overlap. (This function is often used to determine when polygons collide.)

In the image on the left the blue polygon is the 'minkowski difference' of the two red boxes. The black dot represents the coordinate space origin.

Feedback, Comments & Corrections

ClipperMBS.MinkowskiSum(pattern as ClipperPathMBS, path as ClipperPathMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates Minkowski sum.
Notes: Minkowski Addition is performed by adding each point in a polygon 'pattern' to the set of points in an open or closed path. The resulting polygon (or polygons) defines the region that the 'pattern' would pass over in moving from the beginning to the end of the 'path'.

See also:

Feedback, Comments & Corrections

ClipperMBS.MinkowskiSum(pattern as ClipperPathMBS, paths as ClipperPathsMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Creates Minkowski sum.
Notes: Minkowski Addition is performed by adding each point in a polygon 'pattern' to the set of points in an open or closed path. The resulting polygon (or polygons) defines the region that the 'pattern' would pass over in moving from the beginning to the end of the 'path'.

See also:

Feedback, Comments & Corrections

ClipperMBS.OpenPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: This function filters out closed paths from the PolyTree structure and returns only open paths in a Paths structure.

Feedback, Comments & Corrections

ClipperMBS.Orientation(path as ClipperPathMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Queries orientation of path.
Notes:
Orientation is only important to closed paths. Given that vertices are declared in a specific order, orientation refers to the direction (clockwise or counter-clockwise) that these vertices progress around a closed path.

Orientation is also dependent on axis direction:
  • On Y-axis positive upward displays, Orientation will return true if the polygon's orientation is counter-clockwise.
  • On Y-axis positive downward displays, Orientation will return true if the polygon's orientation is clockwise.

Notes:
  • Self-intersecting polygons have indeterminate orientations in which case this function won't return a meaningful value.
  • The majority of 2D graphic display libraries (eg GDI, GDI+, XLib, Cairo, AGG, Graphics32) and even the SVG file format have their coordinate origins at the top-left corner of their respective viewports with their Y axes increasing downward. However, some display libraries (eg Quartz, OpenGL) have their coordinate origins undefined or in the classic bottom-left position with their Y axes increasing upward.
  • For Non-Zero filled polygons, the orientation of holes must be opposite that of outer polygons.
  • For closed paths (polygons) in the solution returned by Clipper's Execute method, their orientations will always be true for outer polygons and false for hole polygons (unless the ReverseSolution property has been enabled).

Feedback, Comments & Corrections

ClipperMBS.PointInPolygon(path as ClipperPathMBS, pt as ClipperPointMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Returns 0 when false, -1 when pt is on poly and +1 when pt is in poly.
Notes: It's assumed that 'poly' is closed and does not self-intersect.

Feedback, Comments & Corrections

ClipperMBS.PolyTreeToPaths(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: This function converts a PolyTree structure into a Paths structure.

Feedback, Comments & Corrections

ClipperMBS.ReversePath(path as ClipperPathMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Reverses the vertex order (and hence orientation) in the specified path.

Feedback, Comments & Corrections

ClipperMBS.ReversePaths(paths as ClipperPathsMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Reverses the vertex order (and hence orientation) in each contained path.

Feedback, Comments & Corrections

ClipperMBS.SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType).
Notes:
Polygons with non-contiguous duplicate vertices (ie 'touching') will be split into two polygons.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.

See also:

Feedback, Comments & Corrections

ClipperMBS.SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType).
Notes:
Polygons with non-contiguous duplicate vertices (ie 'touching') will be split into two polygons.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.

See also:

Feedback, Comments & Corrections

ClipperMBS.SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).
Notes:
Polygons with non-contiguous duplicate vertices (ie 'vertices are touching') will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.

See also:

Feedback, Comments & Corrections

ClipperMBS.SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).
Notes:
Polygons with non-contiguous duplicate vertices (ie 'vertices are touching') will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.

See also:

Feedback, Comments & Corrections

ClipperMBS.SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).
Notes:
Polygons with non-contiguous duplicate vertices (ie 'vertices are touching') will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.

See also:

Feedback, Comments & Corrections

ClipperMBS.SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).
Notes:
Polygons with non-contiguous duplicate vertices (ie 'vertices are touching') will be split into two polygons.

This function is overloaded. In the first definition, the InPolys and OutPolys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.

See also:

Feedback, Comments & Corrections

ClipperMBS.TranslatePath(path as ClipperPathMBS, delta as ClipperPointMBS) as ClipperPathMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Offsets each point in path by x and y.
Notes: Returns a new path.

See also:

Feedback, Comments & Corrections

ClipperMBS.TranslatePath(path as ClipperPathMBS, x as Int64, y as Int64) as ClipperPathMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Offsets each point in path by x and y.
Notes: Returns a new path.

See also:

Feedback, Comments & Corrections

ClipperMBS.Version as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Clipper MBS Tools Plugin 18.0 Yes Yes Yes Yes No
Function: Queries the version of the Clipper library used.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Tools Plugin.





Links
MBS Xojo Plugins