meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:quick_reference_shapes [2020/11/29 07:09] JSCAD Editor |
en:quick_reference_shapes [2022/05/03 07:13] (current) JSCAD Editor [2D Primitives] |
||
---|---|---|---|
Line 7: | Line 7: | ||
</ | </ | ||
- | === 2D Primitives === | + | ==== 2D Primitives |
^ Primitive | ^ Primitive | ||
- | | const mypath = arc({center: | + | | const mypath = arc({center: |
- | | const myshape = circle({center: | + | | const myshape = circle({center: |
- | | const myshape = ellipse({center: | + | | const myshape = ellipse({center: |
- | | const mypath = line([ [10, 10], [-10, 10] ]) | [[https:// | + | | const mypath = line([ [10, 10], [-10, 10] ]) | [[https:// |
- | | const myshape = polygon({ points: [ [10, 11], [0, 11], [5, 20] ], paths: [0, 1, 2]}) | [[https:// | + | | const myshape = polygon({ points: [ [10, 11], [0, 11], [5, 20] ], paths: [0, 1, 2]}) | [[https:// |
- | | const myshape = rectangle({center: | + | | const myshape = rectangle({center: |
- | | const myshape = roundedRectangle({center: | + | | const myshape = roundedRectangle({center: |
- | | const myshape = square({center: | + | | const myshape = square({center: |
- | | const myshape = star({vertices: | + | | const myshape = star({vertices: |
- | | const myshape = star({vertices: | + | | const myshape = star({vertices: |
+ | | const myshape = triangle({type: | ||
- | + | ==== 3D Primitives | |
- | === 3D Primitives === | + | |
^ Primitive | ^ Primitive | ||
- | | const myshape = cube({center: | + | | const myshape = cube({center: |
- | | const myshape = cuboid({center: | + | | const myshape = cuboid({center: |
- | | const myshape = cylinder({center: | + | | const myshape = cylinder({center: |
- | | const myshape = cylinderElliptic({center: | + | | const myshape = cylinderElliptic({center: |
- | | const myshape = ellipsoid({center: | + | | const myshape = ellipsoid({center: |
- | + | | const myshape = geodesicSphere({radius: | |
- | [[https://github.com/ | + | | const myshape |
- | + | | const myshape | |
- | | | + | | const myshape |
- | ^ 2D Primitives | + | | const myshape |
- | | const rectangle | + | | const myshape |
- | | const rectangle | + | |
- | | const rectangle = square({round: | + | |
- | | const rectangle | + | |
- | | const circle1 = circle(); **/* center: | + | |
- | | const circle1 = circle({center: | + | |
- | | | const cylinder1 = cylinder(); | + | |
- | | ::: | const cylinder | + | |
- | | ::: | const cylinder = CSG.roundedCylinder(); | + | |
- | | ::: | const cylinder | + | |
- | | const ellipse = CAG.ellipse({center: | + | |
- | | const cag = CAG.fromPoints([ [0, | + | |
- | | const cag = CAG.fromSides([side, | + |