User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
changes_v2 [2019/07/18 08:38]
z3dev [Removed Functionality]
changes_v2 [2020/06/17 07:30] (current)
z3dev [Desktop Application]
Line 1: Line 1:
 ====== Summary of V2 Changes ====== ====== Summary of V2 Changes ======
  
-===== Core Library ​(Previously named CSG) =====+===== Modeling Package ​(Previously named CSG) =====
  
-The core library ​has been fundamentally changed to acheive several goals. +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 for WEBGL use+  * 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   * geometry has been simplified to arrays of data to improve memory usage and performance
     * geom2 - 2D geometries     * geom2 - 2D geometries
Line 13: Line 13:
  
 ==== Changes to Primitive Shapes ==== ==== Changes to Primitive Shapes ====
 +<code javascript>​
 +const { arc } = require('​@jscad/​modeling'​).primitives
 +</​code>​
  
-  * square / rectangle, circle / ellipse, cube / cuboid, sphere / ellipsoid, torus +  ​* arc, line 
-  * **NEW** star primitive+  ​* 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   * APIs have been standardized
   * all angles / rotations are now based on radians. Use degToRad() to convert easily.   * all angles / rotations are now based on radians. Use degToRad() to convert easily.
-  * major rewrites of roundedRectangle,​ roundedCube+  * major rewrites of cylinder, ​roundedRectangle,​ roundedCube
   * bug fixes   * bug fixes
 +
 +<wrap em>MAJOR CHANGE primitives are centered at 0,0,0 only. use translate() to position the shape</​wrap>​
  
  
 ==== Changes to Transforms ==== ==== Changes to Transforms ====
 +<code javascript>​
 +const { center } = require('​@jscad/​modeling'​).transforms
 +</​code>​
  
   * center, mirror, rotate, scale, transform, translate   * center, mirror, rotate, scale, transform, translate
Line 29: Line 42:
   * bug fixes   * bug fixes
  
 +<wrap em>MAJOR CHANGE: transforms are accumlated so the order of transforms is now important</​wrap>​
 ==== Changes to Booleans ==== ==== Changes to Booleans ====
 +<code javascript>​
 +const { intersect } = require('​@jscad/​modeling'​).booleans
 +</​code>​
  
   * intersect, subtract, union   * intersect, subtract, union
Line 36: Line 52:
   * bug fixes   * bug fixes
 ==== Changes to Measurements ==== ==== Changes to Measurements ====
 +<code javascript>​
 +const { measureArea } = require('​@jscad/​modeling'​).measurements
 +</​code>​
  
   * measureArea,​ measureBounds,​ measureVolume   * measureArea,​ measureBounds,​ measureVolume
Line 42: Line 61:
   * **RENAMED** volume to measureVolume   * **RENAMED** volume to measureVolume
   * major rewrites of measureArea and measureVolume   * major rewrites of measureArea and measureVolume
-==== Changes to Hulls ==== 
  
-  * hull, hullChain 
-  * **RENAMED** chainHull to hullChain 
-  * changed hull to accept one or more geometries 
-  * **NEW** hull and hullChain now support path2 
 ==== Changes to Expansions ==== ==== Changes to Expansions ====
- +<code javascript>​ 
-//NOTE: Contraction is a negative (-expansion.//+const { expand } = require('​@jscad/modeling'​).expansions 
 +</code>
  
   * expand, offset   * expand, offset
-  * **NEW** offset function for 2D paths+  * APIs have been standardized
   * **NEW** expand function for 2D paths   * **NEW** expand function for 2D paths
-  * **NEW** offset function for 2D geometries+  * **NEW** offset function for 2D paths and 2D geometries
   * bug fixes   * bug fixes
  
 +//NOTE: Contraction is a negative (-) expansion.//​
 ==== Changes to Extrusions ==== ==== Changes to Extrusions ====
 +<code javascript>​
 +const { extrudeLinear } = require('​@jscad/​modeling'​).extrusions
 +</​code>​
  
   * extrudeLinear,​ extrudeRectangular,​ extrudeRotate,​ extrudeFromSlices   * extrudeLinear,​ extrudeRectangular,​ extrudeRotate,​ extrudeFromSlices
 +  * APIs have been standardized
   * **RENAMED** linear_extrude to extrudeLinear   * **RENAMED** linear_extrude to extrudeLinear
   * **RENAMED** rectangular_extrude to extrudeRectangular   * **RENAMED** rectangular_extrude to extrudeRectangular
Line 69: Line 89:
  
 ==== Changes to Hulls ==== ==== Changes to Hulls ====
 +<code javascript>​
 +const { hull } = require('​@jscad/​modeling'​).hulls
 +</​code>​
  
   * hull, hullChain   * hull, hullChain
 +  * APIs have been standardized
   * **RENAMED** chain_hull to hullChain   * **RENAMED** chain_hull to hullChain
-  * **NEW** hull function ​for 2D paths+  * **NEW** hull and hullChain ​for 2D paths 
 +  * **NEW** hull and hullChain for 3D geometries 
 + 
 +==== Changes to Text ==== 
 +<code javascript>​ 
 +const { vectorChar } = require('​@jscad/​modeling'​).text 
 +</​code>​ 
 + 
 +  * vectorChar, vectorText 
 +==== Changes to Colors ==== 
 +<code javascript>​ 
 +const { colorize } = require('​@jscad/​modeling'​).colors 
 +</​code>​ 
 + 
 +  * colorize 
 +  * colorNameToRgb,​ hexToRgb, hslToRgb, hsvToRgb, hueToColorComponent 
 +  * rgbToHex, rgbToHsl, rgbtoHsv 
 +  * **NEW** colorize for 2D geometries and 2D paths 
 +  * **REMOVED** color using names, use colorNameToRgb 
 + 
 +<wrap em>MAJOR CHANGE: Colors are applied at the geometry level. Colors must be applied as the last step, as other operations create new geometry.</​wrap>​
 ==== Removed Functionality ==== ==== Removed Functionality ====
  
   * **REMOVED** CSG, CAG, etc. objects   * **REMOVED** CSG, CAG, etc. objects
 +    * See [[https://​github.com/​jscad-community/​jscad-object-api|Object API]]
   * **REMOVED** OpenSCAD functions / function signitures   * **REMOVED** OpenSCAD functions / function signitures
   * **REMOVED** OpenSCAD math functions   * **REMOVED** OpenSCAD math functions
 +    * See [[https://​developer.mozilla.org/​en-US/​docs/​Web/​JavaScript/​Reference/​Global_Objects/​Math|JavaScript Math]]
   * **REMOVED** old text functions   * **REMOVED** old text functions
-    * vector_char (use vectorChar) +    * vector_char (Use NEW vectorChar) 
-    * vector_text (use vectorText)+    * vector_text (Use NEW vectorText)
   * **REMOVED** functionality for 3D geometries   * **REMOVED** functionality for 3D geometries
     * lieFlat     * lieFlat
Line 93: Line 139:
     * extrudeInPlane     * extrudeInPlane
  
-//NOTE: We expect ​this functionality to be supported via small user libraries.//​+//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 ===== 
 + 
 +TO BE CONVERTED 
 + 
 +===== 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)