User Tools


Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
design_guide_union [2018/05/10 14:46]
z3dev
design_guide_union [2018/06/12 14:29]
z3dev
Line 1: Line 1:
 ==== Union ==== ==== Union ====
  
-Basic shapes ​or the results of other functions ​can be combined (merged) into a single shape.+Several ​shapes can be combined (merged) into a single shape. The result is the logical union of the shapes. The combining of smaller obects together allows easier transformations,​ etc.
  
 <code javascript>​ <code javascript>​
-union(sphere({r:​ 1, center:​true}),​cube({size:​ 1.5, center:​true}));  // openscad like+let shape = union(sphere({r:​ 1, center: true}), cube({size: 1.5, center: true})
 </​code>​ </​code>​
  
-multiple objects ​can be added, ​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}).union(cube({size:​ 1.5, center:​true}));  // using CSG objects'​ built in methods+sphere({r: 1, center: true}).union(cube({size:​ 1.5, center: true}))
 </​code>​ </​code>​