UNPKG

@jscad/modeling

Version:

Constructive Solid Geometry (CSG) Library for JSCAD

16 lines (13 loc) 484 B
const applyTransforms = require('./applyTransforms') /** * Produces an array of points from the given geometry. * The returned array should not be modified as the data is shared with the geometry. * @param {path2} geometry - the geometry * @returns {Array} an array of points * @alias module:modeling/geometries/path2.toPoints * * @example * let sharedpoints = toPoints(geometry) */ const toPoints = (geometry) => applyTransforms(geometry).points module.exports = toPoints