All shapes (primitives or the results of operations) can be modified to correct issues, etc. In all cases, these functions returns the results, and never changes the original geometry.
Example
const { snap } = require('@jscad/modeling').modifiers
Methods
(static) generalize(options, …geometries) → {Object|Array}
Apply various modifications in proper order to produce a generalized geometry.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | options for modifications Properties
|
|||||||||||||||||||||
geometries |
Object |
<repeatable> |
the geometries to generalize |
Returns:
the modified geometry, or a list of modified geometries
- Type
- Object | Array
(static) snap(…geometries) → {Object|Array}
- Source:
- See:
-
- measurements.measureEpsilon()
Snap the given geometries to the overall precision (epsilon) of the geometry.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
geometries |
Object |
<repeatable> |
the geometries to snap |
Returns:
the snapped geometry, or a list of snapped geometries
- Type
- Object | Array