# Differences

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

 quick_reference_shapes [2018/01/28 07:49]z3dev quick_reference_shapes [2018/02/22 19:01] (current)kaosat-dev Both sides previous revision Previous revision 2018/02/22 19:01 kaosat-dev 2018/01/28 07:49 z3dev 2018/01/28 07:49 z3dev 2018/01/27 05:44 z3dev 2018/01/27 05:43 z3dev created Next revision Previous revision 2018/02/22 19:01 kaosat-dev 2018/01/28 07:49 z3dev 2018/01/28 07:49 z3dev 2018/01/27 05:44 z3dev 2018/01/27 05:43 z3dev created Line 1: Line 1: ===== Primitive Shapes ===== ===== Primitive Shapes ===== ^  2D Primitives ​ ^  3D Primitives ​ ^ ^  2D Primitives ​ ^  3D Primitives ​ ^ - | var rectangle = CAG.rectangle(); **/* center: [0,​0], ​radius: [1,1] */**  | var cube = CSG.cube(); **/* center: [0,​0,​0], ​radius: [1,1,1] */**  | + | const rectangle = square(); **/* center: [0,​0], ​size: [1,1] */**  | const cube1 = cube(); **/* center: [0,​0,​0], ​size: [1,1,1] */**  | - | var rectangle = CAG.rectangle({center: [1,​2], ​radius: [1, 2]});  | var cube = CSG.cube({center:​ [1, 2, 3], radius: [1, 2, 3]});  | + | const rectangle = square({center: [1,​2], ​size: [1, 2]});  | const cube1 = cube({center:​ [1, 2, 3], size: [1, 2, 3]});  | - | var rectangle = CAG.roundedRectangle(); **/* center: [0,0], radius: [1,1], roundradius:​ 0.2, resolution: 32 */**  | var cube = CSG.roundedCube(); **/* center: [0,0,0], radius: [1,1,1] roundradius:​ 0.2, resolution: 12 */**  | + | const rectangle = square({round: true}); **/* center: [0,0], radius: [1,1], roundradius:​ 0.2, resolution: 32 */**  | const cube1 = cube({round: true}); **/* center: [0,0,0], radius: [1,1,1] roundradius:​ 0.2, resolution: 12 */**  | - | var rectangle = CAG.roundedRectangle({center: [1,2], radius: [1, 2], roundradius: 1, resolution:​32}); ​ | var cube = CSG.roundedCube({center: [0, 0, 0], radius: ​[3,3,3], roundradius: 0.5, resolution: 32});  | + | const rectangle = square({center: [1,2], radius: [1, 2],rounded: true, fn:​32}); ​ | const cube1 = cube({center:​ [0, 0, 0], radius: ​2, round: true, fn: 32});  | - | var circle ​= CAG.circle(); **/* center: [0,​0], ​radius: [1,1], resolution: 32 */**  | var sphere ​= CSG.sphere(); **/* center: [0,​0,​0], ​radius: 1, resolution: 12 */**  | + | const circle1 ​= circle(); **/* center: [0,​0], ​r: [1,1], resolution: 32 */**  | const sphere1 ​= sphere(); **/* center: [0,​0,​0], ​r: 1, fn: 12 */**  | - | var circle ​= CAG.circle({center:​ [1,​2], ​radius: 3, resolution: 72});  | var sphere ​= CSG.sphere({center:​ [1, 2, 3], radius: 4, resolution: 36});  | + | const circle1 ​= circle({center:​ [1,​2], ​r: 3, resolution: 72});  | const sphere1 ​= sphere({center:​ [1, 2, 3], r: 4, fn: 36});  | - |  | var cylinder ​= CSG.cylinder(); ​**/* start: [0, -1, 0], end: [0, 1, 0],  radius: 1, resolution: 32 */​**  ​| + |  | const cylinder1 ​= cylinder(); ​  ​| - | ::: | var cylinder = CSG.cylinder({start:​ [1, 2, 3], end: [4, 5, 6], radiusStart:​ 7, radiusEnd: 8, resolution: 72});  | + | ::: | const cylinder = CSG.cylinder({start:​ [1, 2, 3], end: [4, 5, 6], radiusStart:​ 7, radiusEnd: 8, resolution: 72});  | - | ::: | var cylinder = CSG.roundedCylinder();​ **/* start: [0,-1,0], end: [0,1,0], radius: 1, resolution: 12 */**  | + | ::: | const cylinder = CSG.roundedCylinder();​ **/* start: [0,-1,0], end: [0,1,0], radius: 1, resolution: 12 */**  | - | ::: | var cylinder = CSG.roundedCylinder({start:​ [10,11,12], end: [13,14,15], radius: 16, resolution: 6});  | + | ::: | const cylinder = CSG.roundedCylinder({start:​ [10,11,12], end: [13,14,15], radius: 16, resolution: 6});  | - | var ellipse = CAG.ellipse({center:​ [5,5], radius: [10,​20],​resolution:​ 72}); || var cylinder = CSG.cylinderElliptic({start: [0,-10,0],end: [0,10,​0],​radiusStart:​ [10,​5],​radiusEnd:​ [5,​2.5],​resolution: 16}); | + | const ellipse = CAG.ellipse({center:​ [5,5], radius: [10,​20],​resolution:​ 72}); | const cylinder = cylinder({r1: 10, r2: 20, fn: 16}); | - | var cag = CAG.fromPoints([ [0,​0],​[5,​0],​[3,​5],​[0,​5] ]); **/* polygon with 3+ points */**  | var csg = CSG.fromPolygons([polygon,​ ...]); ​ | + | const cag = CAG.fromPoints([ [0,​0],​[5,​0],​[3,​5],​[0,​5] ]); **/* polygon with 3+ points */**  | const csg = CSG.fromPolygons([polygon,​ ...]); ​ | - | var cag = CAG.fromSides([side,​...]);​ **/* polygon with 1+ sides */**  | ::: | + | const cag = CAG.fromSides([side,​...]);​ **/* polygon with 1+ sides */**  | ::: |