User Tools


Differences

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

Link to this comparison view

Next revision
Previous revision
design_guide_intersection [2018/02/18 11:46]
z3dev created
design_guide_intersection [2018/06/12 14:30] (current)
z3dev
Line 1: Line 1:
 ==== Intersection ==== ==== Intersection ====
 +
 +Several objects can be combined (overlapped) into a single shape. This result is the logical intersection of the shapes.
  
 <code javascript>​ <code javascript>​
-intersection(sphere({r:​ 1, center:​true}),​cube({size:​ 1.5, center:​true})); // openscad like+let shape = intersection(sphere({r:​ 1, center: true}), cube({size: 1.5, center: true}))
 </​code>​ </​code>​
  
-multiple objects ​can be intersected, ​also arrays.+The CSG library functions ​can also be used//NOTE: Deprecated in the V2 API//
  
 <code javascript>​ <code javascript>​
-sphere({r: 1, center:​true}).intersect(cube({size:​ 1.5, center:​true}));   // using CSG objects'​ built in methods+sphere({r: 1, center: true}). intersect(cube({size:​ 1.5, center: true}))
 </​code>​ </​code>​