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:design_guide_subtract [2020/11/28 03:03]
JSCAD Editor created
en:design_guide_subtract [2020/12/08 06:54] (current)
JSCAD Editor
Line 1: Line 1:
-==== Difference ====+==== Subtract ==== 
 + 
 +{{ :wiki:jscad-subtract.png?nolink | Subtract}}
  
 Several shapes can be removed (subtracted) from another. The result is the logical difference of shapes. Several shapes can be removed (subtracted) from another. The result is the logical difference of shapes.
Line 6: Line 8:
  
 <code javascript> <code javascript>
-let shape difference(sphere({r: 1, center: true}), cube({size: 1.5, center: true})+const newshape subtract(cube({size: 10}), cylinder({radius4heigth14})
-</code> +
- +
-The CSG library functions can also be used. //NOTE: Deprecated in the V2 API// +
- +
-<code javascript> +
-sphere({r: 1center: true}). subtract(cube({size1.5centertrue}))+
 </code> </code>