meta data for this page
  •  

Differences

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

Link to this comparison view

Next revision
Previous revision
en:quick_reference_operations [2020/11/28 01:50]
Admin created
en:quick_reference_operations [2021/06/10 01:37] (current)
JSCAD Editor [Boolean Operations]
Line 1: Line 1:
 ===== Shape Operations ===== ===== Shape Operations =====
-^  2D Operations  ^  3D Operations  ^ 
-| 2Dshape = union(2DshapeA, 2DshapeB) | 3Dshape = union(3DshapeA, 3DshapeB)  | 
-| 2Dshape = difference(2DshapeA, 2DshapeB) | 3Dshape = difference(3DshapeA, 3DshapeB) | 
-| 2Dshape = intersection(2DshapeA, 2DshapeB) | 3Dshape = intersection(3DshapeA, 3DshapeB)  | 
-| ::: | 3Dshape = 3DshapeA.inverse(3DshapeB) **/* inverse solid and empty space */**  | 
  
-//Note: The previous object oriented API is still supported but will be decommissioned soon.//+==== Boolean Operations ==== 
 + 
 +The 'booleans' are accessed through the modeling API using the following: 
 + 
 +<code javascript> 
 +const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans 
 +</code> 
 + 
 +^  Operation  ^  Notes  ^ 
 +| const newshape = intersect(oldshape0, oldshape1)  | [[https://www.openjscad.xyz/docs/module-modeling_booleans.html#.intersect | API]]  | 
 +| const newshape = subtract(oldshape0, oldshape1)  | [[https://www.openjscad.xyz/docs/module-modeling_booleans.html#.subtract | API]]  | 
 +| const newshape = union(oldshape0, oldshape1)  | [[https://www.openjscad.xyz/docs/module-modeling_booleans.html#.union | API]]  | 
 +| const newshapes = scission(bigshape)  | [[https://www.openjscad.xyz/docs/module-modeling_booleans.html#.scission | API]]  | 
 +==== Hull Operations === 
 + 
 +The 'hulls' are accessed through the modeling API using the following: 
 + 
 +<code javascript> 
 +const { hull, hullChain } = require('@jscad/modeling').hulls 
 +</code> 
 + 
 +^  Operation  ^  Notes  ^ 
 +| const newshape = hull(oldshape0, oldshape1)  | [[https://www.openjscad.xyz/docs/module-modeling_hulls.html#.hull | API]]  | 
 +| const newshape = hullChain(oldshape0, oldshape1)  | [[https://www.openjscad.xyz/docs/module-modeling_hulls.html#.hullChain | API]]  |