Platforms to show: All Mac Windows Linux Cross-Platform

Back to ClipperMBS module.

ClipperMBS.Area(path as ClipperPathMBS) as double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function returns the area of the supplied polygon.

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.

ClipperMBS.CleanPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, distance as double = 1.415)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a clean polygon.

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:

ClipperMBS.CleanPolygon(Poly as ClipperPathMBS, distance as double = 1.415)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a clean polygon.

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:

ClipperMBS.CleanPolygons(InPoly as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, distance as double = 1.415)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates clean polygons.

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:

ClipperMBS.CleanPolygons(Poly as ClipperPathsMBS, distance as double = 1.415)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates clean polygons.

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:

ClipperMBS.ClosedPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function filters out open paths from the PolyTree structure and returns only closed paths in a Paths structure.

ClipperMBS.EllipsePoints(Left as Double, Top as Double, Right as Double, Bottom as Double) as ClipperPathMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates an ellipse as path of points with given bounding rectangle.
Example
dim p as ClipperPathMBS = ClipperMBS.EllipsePoints(100,100,300,300)

Some examples using this method:

ClipperMBS.MinkowskiDiff(poly1 as ClipperPathMBS, poly2 as ClipperPathMBS, byref solution as ClipperPathsMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates Minkowski Difference.

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.

ClipperMBS.MinkowskiSum(pattern as ClipperPathMBS, path as ClipperPathMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates Minkowski sum.

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:

Some examples using this method:

ClipperMBS.MinkowskiSum(pattern as ClipperPathMBS, paths as ClipperPathsMBS, byref solution as ClipperPathsMBS, pathIsClosed as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates Minkowski sum.

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:

ClipperMBS.OpenPathsFromPolyTree(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function filters out closed paths from the PolyTree structure and returns only open paths in a Paths structure.

ClipperMBS.Orientation(path as ClipperPathMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries orientation of path.

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).

ClipperMBS.PointInPolygon(path as ClipperPathMBS, pt as ClipperPointMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns 0 when false, -1 when pt is on poly and +1 when pt is in poly.

It's assumed that 'poly' is closed and does not self-intersect.

ClipperMBS.PolyTreeToPaths(polytree as ClipperPolyTreeMBS, byref paths as ClipperPathsMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function converts a PolyTree structure into a Paths structure.

ClipperMBS.ReversePath(path as ClipperPathMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reverses the vertex order (and hence orientation) in the specified path.

ClipperMBS.ReversePaths(paths as ClipperPathsMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reverses the vertex order (and hence orientation) in each contained path.

ClipperMBS.SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType).

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:

ClipperMBS.SimplifyPolygon(InPoly as ClipperPathMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType).

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:

ClipperMBS.SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).

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:

ClipperMBS.SimplifyPolygons(InPolys as ClipperPathsMBS, byref OutPolys as ClipperPathsMBS, fillType as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).

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:

ClipperMBS.SimplifyPolygons(Polys as ClipperPathsMBS, fillType as ClipperMBS.PolyFillType = ClipperMBS.PolyFillType.EvenOdd)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).

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:

ClipperMBS.SimplifyPolygons(Polys as ClipperPathsMBS, fillType as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).

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:

ClipperMBS.TranslatePath(path as ClipperPathMBS, delta as ClipperPointMBS) as ClipperPathMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Offsets each point in path by x and y.

Returns a new path.

See also:

ClipperMBS.TranslatePath(path as ClipperPathMBS, x as Int64, y as Int64) as ClipperPathMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Offsets each point in path by x and y.

Returns a new path.

See also:

ClipperMBS.Version as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the version of the Clipper library used.

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


The biggest plugin in space...