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:design_guide_mirror [2020/12/01 00:47] JSCAD Editor |
en:design_guide_mirror [2020/12/08 06:53] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Mirror ==== | ==== Mirror ==== | ||
| - | Shapes can mirror (reflect) about the X, Y, or Z axis. | + | Shapes can mirror (reflect) about the X, Y, or Z axis, and more specifically about any '' |
| // | // | ||
| Line 7: | Line 7: | ||
| Defaults: | Defaults: | ||
| * origin : [0, 0, 0] | * origin : [0, 0, 0] | ||
| - | * normal : [0, 0, 1] mirror about the Z axis | + | * normal : [0, 0, 1] (mirror about the Z axis) |
| <code javascript> | <code javascript> | ||
| - | let myshape = cube({size: [5, 20, 5]}) | + | const myshape = cube({size: [5, 20, 5]}) |
| - | let newshape = mirror({origin: | + | const newshape = mirror({origin: |
| </ | </ | ||
| - | There are simple versions of this function to mirror | + | There are simple versions of this function to mirror a single axis about the origin. |
| <code javascript> | <code javascript> | ||
| - | let myshape = cube({size: [5, 20, 5]}) | + | const myshape = cube({size: [5, 20, 5]}) |
| let newshape = mirrorX(myshape) | let newshape = mirrorX(myshape) | ||
| newshape = mirrorY(newshape) | newshape = mirrorY(newshape) | ||
| newshape = mirrorZ(newshape) | newshape = mirrorZ(newshape) | ||
| </ | </ | ||