Skip to content

JSCAD V2 Maintenance

Z3 Development edited this page Jun 20, 2022 · 2 revisions

Websites

  • WILL NOT bring back V1 website as part of openjscad.org (Do not own namespace.)
  • openjscad.xyz
  • NEW component sharing site

Packages

  • switch to Rollup (replace browserify)
  • create libraries with CommonJS / UMD / ES6 import bindings
  • publish CommonJS / UMD / ES6 librares
  • update dev dependencies to latest; lerna, etc.
  • replace lerna (end of life) with ?? yarn ?? lerna-lite ??

Array Utils

  • move array utility functions from modeling to here
  • split out functions into separate source
  • add tests if not available
  • add documentation and generate docs
  • expose @jscad/array-utils in cli and web apps

Modeling

  • V3 new dependency; Array Utils (NOTE: These can be exposed as modeling/utils to maintain API)
  • Math
    • upgrade maths to mirror the API of glmatrix (no optional parameters)
    • remove vec3.unit(), update libraries to use vec3.normalize() instead
    • add both clone and copy functions
      • clone creates a new array from values of the old array; one parameter
      • copy copies the values from the old array into the new array; two parameters
    • remove utils/clamp.js and utils/quantizeForSpace.js
    • add PI2 to constants, and rework code to use new constant
  • Geometries (immutable)
    • change clone to shallow functions
      • clone creates a new object using Object.assign()
    • correct to retain user attributes (color, name, etc)
      • NOTE: applyTransforms() must reset transforms with a NEW mat4 allocation
    • V3 move slice to geometries
  • V3 Connectors
    • re-implement as supported geometry (anonymous object form)
      • contains plane, and perpendicular (vector)
      • created from...
        • plane and perpendicular
        • three points (of plane), and perpendicular
        • closest point on GEOMETRY to POINT, and perpendicular
    • adding attributes (name, id, etc) is possible
    • usable as parameter to transforms; align, center, mirror, rotate, scale, translate ==> transform(mat4)
  • V3 Curves (See http://verbnurbs.com/ for inspiration)
    • NEW arc
    • NEW nurbs
  • Booleans
  • Expansions
    • rewrite 3D expand / contract
    • V3 3D offset
  • Extrusions
    • NEW projection() from 3D to 2D
  • Hulls
    • NEW 3D minkowski ?
  • Text
    • fix vectorChar() to return an array of segments just like vectorText() ?
    • V3 change vectorChar() and vectorText() to return array of path2 objects
    • remove vectorChar() from exposed API ?
  • Primitives
    • NEW triangle primitive
  • Transforms
    • center becomes alias to align
  • Measurements
    • use WeakMap for caching measurements
    • NEW measureCenter
    • NEW measureCenterOfMass
    • NEW measureBoundingSphere
    • NEW measureDimensions; width, height, depth
  • V3 pipeline operation (see https://github.com/jscad/csg.js/issues/114 )
  • Others
    • V3 Remove Orthonormalbasis
    • isRetesselated attribute from geom3

Core

  • V3 add 'use' method to include / use a single source file (remote loading)
  • rework logic for drag-n-drop of STL file
    • conversion should happen BEFORE evaluation
    • conversions should create a new file system entry, which is passed into evaluation
    • add conversion task to worker thread?
  • split out ‘most’ based code and move to web; observable-utils and sideEffects
  • rework core to separate vtree
  • V3 rework evaluation to support async functions, both cli and web
  • expose @jscad/array-utils as part of webRequire
  • remove support for V1 designs => add meaning messages for incorrect exports

Web

  • suck in most-gestures package, and eliminate dependency
  • improved performance by controlling rendering loops
  • implement options
    • Enable zoom to fit
  • remove options
    • Enable Experimental Geometry Caching
    • Storage path of settings
  • NEW options
    • Units; micrometer, millimeter, meter, kilometer, inch, feet, yard, mile
  • review storage, as things seems overly complicated and unnecessary
  • themes
    • add more
    • enhance to supply more color variations
  • editor, add autocomplete for JSCAD API ?
  • performance; replace JSON comparisons with id comparisons

Renderer

  • allow geometry to specify the style of lighting applied
  • allow geometry to specify a texture
  • change to use matrix in geometries
  • fix to allow geometries with more than 65K polygons / points (dies an ugly death now)
  • use WeakMap to track previous solids / geometry
  • add list of supporting frameworks to README
  • improve direct conversions into buffers
  • implement DrawLines for 2D geometry, and rework code
  • render slices

Desktop (NEW)

  • create VUE / React based Desktop APP
  • reload files via livereload, NOT browser based crap
  • uses VTREE for caching of objects
  • full control of view; colors, axes, grid, smoothing, etc.
  • selection of viewed geometries
  • full control of IO deserialization / serialization options
    • units; micrometer, millimeter, meter, kilometer, inch, feet, yard, mile
  • orientation of view in upper right corner

IO

  • Create tests for colors
    • colors on solids are exported as a property of shapes
    • colors on polygons are exported as a property of faces, etc
    • export VS import
  • Create / expose documentation for all deserializers and serializers
  • Add sections to explain conversions, which can be found in the code
  • Switch XML parsing to https://github.com/lddubeau/saxes
    • AMF deserializer
    • SVG deserializer

Other

  • create jsfiddle based component for posting bugs / small tests
  • JSCAD language (API) definitions for VIM / EMACS ? maybe TS definitions are enough

README Fixes

  • OpenJSCAD.org on main README, strange links, missing logo
  • Remove maxAge from badges
  • Review all badges for consistency

Cleanup

  • remove unused files
    • MAKEFILE
    • old files
    • remove unused CSS files
    • remove unused HTML files
    • remove old *.md files
  • remove unused directories
    • old directories
  • remove unused packages
    • ui/csg-viewer