Copyright © 2021 by K4.org
  (v.0.48.124)

Creates new Profiles by offsetting an existing Profile.

This can produce multiple children, or no children, depending on the offsetDistance and target shape. Any holes in target are currently ignored, but holes can be produced in the results. offsetDistances can be supplied to control the offset distance for each edge of the target.

This also accepts a Polygon primitive as the target instead of a Profile.

The shape of 'outside' corners is controlled by the cornerStyle parameter.

Index

Rules

cornerStyle

cornerStyle: String

Controls the handling of outside corners. One of 'circular', 'miter', or 'bevel'. Any capitalization is accepted. The default is 'circular', which creates circular sections on convex corners of the original (or concave corners if the offset distance is negative). If offsetDistances is supplied (and has a length greater than 1), then 'circular' is not available, and the default is 'miter'.

Flags : Cached, Parameter (Note this is uncached)

Expression : (this.offsetDistances.length > 0) ? 'miter' : 'circular'

maxDeviation

maxDeviation: Number

Defines the maximum deviation for circular corners, which are approximated by linear segments. By default, uses the global maxDeviation in the system settings.

Flags : Cached, Parameter (Note this is uncached)

Expression : R.settings.geometry.maxDeviation

offsetDistance

offsetDistance: Number

The distance to offset the boundary of target. Positive values offset 'outward' and negative values offset 'inward'.

Flags : Cached, Parameter (Note this is uncached)

Expression : 0.0

offsetDistances

offsetDistances: Array

A set of distances to apply to corresponding edges of the profile. This only works with a polygonized version of the profile, where any curved edges are replaced by polylinear segments. Each distance in the array is applied to the corresponding edge in the boundary of the target (holes in the target are ignored). If this parameter is supplied, 'circular' cornerStyle is not availble, and 'miter' is the default. Positive and negative values cannot be combined in the same array.

If the length of the array less than the number of edges, the last value is replicated as necessary. If the length is more than the number of edges, the additional values are ignored. If both offsetDistance and offsetDistances are supplied, the latter takes precedence.

Notes: Collinear edges are not merged in the result; an edge which appears to be linear may be made of several segments. The result of 'miter' on variable offset 'outside' corners can cause some offset area to be cut off, depending on the offset difference and the angle. The 'bevel' style will prevent this, but the result is less pleasing.

Flags : Cached, Parameter (Note this is uncached)

Expression : []

resultPolygons

resultPolygons: Array

The resulting raw polygons.

Flags : Cached (Note this is uncached)

Expression : const offsets = this.offsetDistances.length>0 ? this.offsetDistances : [this.offsetDistance]; return this.target.polygon.offset2(offsets, this.cornerStyle, this.maxDeviation);

resultProfile

resultProfile: Child

The resulting Profiles

Design: Profile

target

target: Any

The base (starting) Profile or Polygon.

Flags : Cached, Required, Parameter (Note this is uncached)

Expression : ``