User Tools

Summary of V2 Changes

Modeling Package (Previously named CSG)

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

Changes to Primitive Shapes

const { arc } = require('@jscad/modeling').primitives
  • arc, line
  • circle, ellipse, rectangle, roundedRectangle, square, 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

Changes to Transforms

const { center } = require('@jscad/modeling').transforms
  • align, center, mirror, rotate, scale, transform, translate
  • NEW align
  • 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

Changes to Booleans

const { intersect } = require('@jscad/modeling').booleans
  • intersect, subtract, union
  • APIs have been standardized
  • bug fixes

Changes to Measurements

const { measureArea } = require('@jscad/modeling').measurements
  • measureArea, measureBounds, measureEpsilon, measureVolume
  • RENAMED bounds to measureBounds
  • RENAMED area to measureArea
  • RENAMED volume to measureVolume
  • NEW measureEpsilon
  • NEW aggregate versions of measurements
  • major rewrites of measureArea and measureVolume

Changes to Expansions

const { expand } = require('@jscad/modeling').expansions
  • expand, offset
  • APIs have been standardized
  • NEW expand function for 2D paths
  • NEW offset function for 2D paths and 2D geometries
  • bug fixes

NOTE: Contraction is a negative (-) expansion.

Changes to Extrusions

const { extrudeLinear } = require('@jscad/modeling').extrusions
  • 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

Changes to Hulls

const { hull } = require('@jscad/modeling').hulls
  • 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

Changes to Text

const { vectorChar } = require('@jscad/modeling').text
  • vectorChar, vectorText

Changes to Colors

const { colorize } = require('@jscad/modeling').colors
  • colorize
  • colorNameToRgb, hexToRgb, hslToRgb, hsvToRgb, hueToColorComponent
  • rgbToHex, rgbToHsl, rgbtoHsv
  • NEW colorize 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 Functionality

  • REMOVED CSG, CAG, etc. objects
  • REMOVED OpenSCAD functions / function signitures
  • REMOVED OpenSCAD math functions
  • 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.

IO Packages


  • 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
  • Serializer (export)
    • enhanced to translate 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

Command Line Application

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

Desktop Application


Web (Site) Application

  • viewer has been split from applications
    • ability to create snapshots from command line
    • ability to render 2D paths, 2D geometry, 3D geometry
  • support for themes
  • support for multiple languages
  • support for NPM style projects (ALPHA)

Summary of Available Functionality:

Mode DnD Project Load Project DnD URL Load Example URL Parameters Export
Hosted Website* Y Y Y Y Y Y
Dev Web Server Y Y N Y N Y
Open Document Y Y N N N Y

Note: Hosted Website requires installation of backend proxy service; or remote.php