Platforms to show: All Mac Windows Linux Cross-Platform

Back to ClipperPathMBS class.

ClipperPathMBS.Append(item as ClipperPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Appends a new point to the path.

See also:

ClipperPathMBS.Append(X as Int64, Y as Int64)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Appends a new path.

Without creating intermediate Xojo ClipperPointMBS object.

See also:

ClipperPathMBS.Area 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.
Example
dim points() as ClipperPointMBS

points.Append new ClipperPointMBS(1,2)
points.Append new ClipperPointMBS(4,2)
points.Append new ClipperPointMBS(4,6)
points.Append new ClipperPointMBS(1,6)

dim path as new ClipperPathMBS(points)
dim area as Double = path.Area

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.

ClipperPathMBS.Clear

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Clears the path.

ClipperPathMBS.Constructor

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

See also:

ClipperPathMBS.Constructor(otherPath as ClipperPathMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new path with the copy of old path.

See also:

ClipperPathMBS.Constructor(points() as ClipperPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new path with given points.

See also:

ClipperPathMBS.Equal(otherPath 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
Checks if two paths are equal.

Returns true if both are equal.

ClipperPathMBS.Insert(Index as Integer, item as ClipperPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Inserts a point into the path at given index.

Index = 0 adds as first path.

ClipperPathMBS.Orientation 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.
Example
dim points() as ClipperPointMBS

points.Append new ClipperPointMBS(1,2)
points.Append new ClipperPointMBS(4,2)
points.Append new ClipperPointMBS(4,6)
points.Append new ClipperPointMBS(1,6)

dim path as new ClipperPathMBS(points)
dim Orientation as boolean = path.Orientation

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

ClipperPathMBS.PointInPolygon(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.
Example
dim points() as ClipperPointMBS

points.Append new ClipperPointMBS(1,2)
points.Append new ClipperPointMBS(4,2)
points.Append new ClipperPointMBS(4,6)
points.Append new ClipperPointMBS(1,6)

dim path as new ClipperPathMBS(points)

dim b1 as Integer = path.PointInPolygon(new ClipperPointMBS(2,2)) // -1 on line
dim b2 as Integer = path.PointInPolygon(new ClipperPointMBS(2,22)) // 0 outside
dim b3 as Integer = path.PointInPolygon(new ClipperPointMBS(2,3)) // 1 = inside

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

ClipperPathMBS.Remove(index as integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes a point.

ClipperPathMBS.ReversePath

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.

ClipperPathMBS.TranslatePath(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:

ClipperPathMBS.TranslatePath(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:

ClipperPathMBS.Value(Index as Integer) as ClipperPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries or sets a value in the path.

Raises exception if out of bounds.
(Read and Write computed property)

ClipperPathMBS.Values as ClipperPointMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates copy of path as Xojo array or ClipperPointMBS.

ClipperPathMBS.ValuesToArray(dest() as ClipperPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Clipper MBS Tools Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds ClipperPointMBS objects for the points in the path to the Xojo array.

Mainly for older Xojo versions where the plugin can't create an array for you.

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


The biggest plugin in space...