**This is an old revision of the document!**

The modeling package has been fundamentally changed to acheive several goals.

- math functions have been rewritten based on the glmatrix library, which is array based data
- geometry has been simplified to arrays of data to improve memory usage and performance
- geom2 - 2D geometries
- geom3 - 3D geometries
- path2 - 2D paths

- APIs have been standardized, and now align to JavaScript standards for interoperability
- tests for everything, no more unknowns

const { arc } = require('@jscad/modeling').primitives

- arc, line
- square / rectangle / roundedRectangle, circle / ellipse, star
- cube / cuboid / roundedCuboid, sphere / ellipsoid, cylinder / cylinderElliptic / roundedCylinder, geodesicSphere, polyhedron, torus
**NEW**line 2D primitive**NEW**star 2D primitive**NEW**ellipsoid 3D primitive**CHANGED**cylinder definition to use 'height'- APIs have been standardized
- all angles / rotations are now based on radians. Use degToRad() to convert easily.
- major rewrites of cylinder, roundedRectangle, roundedCube
- bug fixes

MAJOR CHANGE primitives are centered at 0,0,0 only. use translate() to position the shape

const { center } = require('@jscad/modeling').transforms

- center, mirror, rotate, scale, transform, translate
- APIs have been standardized
- all rotations are now based on radians. Use degToRad() to convert easily.
- bug fixes

MAJOR CHANGE: transforms are accumlated so the order of transforms is now important

const { intersect } = require('@jscad/modeling').booleans

- intersect, subtract, union
- APIs have been standardized
- bug fixes

const { measureArea } = require('@jscad/modeling').measurements

- measureArea, measureBounds, measureVolume
**RENAMED**bounds to measureBounds**RENAMED**area to measureArea**RENAMED**volume to measureVolume- major rewrites of measureArea and measureVolume

*NOTE: Contraction is a negative (-) expansion.*

- expand, offset
- APIs have been standardized
**NEW**expand function for 2D paths**NEW**offset function for 2D paths and 2D geometries- bug fixes

- extrudeLinear, extrudeRectangular, extrudeRotate, extrudeFromSlices
- APIs have been standardized
**RENAMED**linear_extrude to extrudeLinear**RENAMED**rectangular_extrude to extrudeRectangular**RENAMED**rotate_extrude to extrudeRotate**RENAMED**solidFromSlices to extrudeFromSlices- all angles / rotations are now based on radians
- major rewrites of all extrusions

- hull, hullChain
- APIs have been standardized
**RENAMED**chain_hull to hullChain**NEW**hull and hullChain for 2D paths**NEW**hull and hullChain for 3D geometries

- color
- colorNameToRgb, hexToRgb, hslToRgb, hsvToRgb, hueToColorComponent
- rgbToHex, rgbToHsl, rgbtoHsv
**NEW**color for 2D geometries and 2D paths**REMOVED**color using names, use colorNameToRgb

MAJOR CHANGE: Colors are applied at the geometry level. Colors must be applied as the last step, as other operations create new geometry.

**REMOVED**CSG, CAG, etc. objects- See Object API

**REMOVED**OpenSCAD functions / function signitures**REMOVED**OpenSCAD math functions- See JavaScript Math

**REMOVED**old text functions- vector_char (Use NEW vectorChar)
- vector_text (Use NEW vectorText)

**REMOVED**functionality for 3D geometries- lieFlat
- getTransformationToFlatLying
- getTransformationAndInverseTransformationToFlatLying
- stretchAtPlane
- cutByPlane
- sectionCut

**REMOVED**functionalty for 2D geometries- overCutInsideCorners
- extrudeInOrthonormalBasis
- extrudeInPlane

*NOTE: We expect REMOVED functionality to be supported via small user libraries.*

- Deserializer (import)
- bug fix for colors
- bug fix for model scales

- Serializer (export)
- bug fix for colors

- Deserializer (import)
- bug fix for lwpolylines
- bug fix for polylines
- bug fix for colors

- Deserializer (import)
- bug fix for relative vertex references
- enhanced support for groups
- enhanced support for colors (material names)

- Deserializer (import)
- enhanced translation to jscad scripts
- bug fix for colors

- Deserializer (import)
- bug fix for colors
- bug fix for quadradic bezier curves
- bug fix for closed paths

- Serializer (export)
- bug fix for colors
- bug fix for 2D geometries

- Serializer (export)
- bug fix for colors

- bug fix for project folders
- bug fix for converting external formats

tbw

tbw