User Tools


This is an old revision of the document!


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
  • 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

Changes to Transforms

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

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, measureVolume
  • RENAMED bounds to measureBounds
  • RENAMED area to measureArea
  • RENAMED volume to measureVolume
  • 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

AMF

  • Deserializer (import)
    • bug fix for colors
    • bug fix for model scales
  • Serializer (export)
    • bug fix for colors

DXF

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

OBJ

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

STL

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

SVG

  • 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

X3D

  • Serializer (export)
    • bug fix for colors

Command Line Application

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

Desktop Application

tbw

Web (Site) Application

tbw