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_transforms [2020/11/28 06:38] JSCAD Editor |
en:quick_reference_transforms [2021/04/30 08:23] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| <code javascript> | <code javascript> | ||
| const { translate, scale, rotateX } = require(' | const { translate, scale, rotateX } = require(' | ||
| - | </ | ||
| - | |||
| - | The ' | ||
| - | |||
| - | <code javascript> | ||
| - | const newshape = align({modes: | ||
| - | const newshapes = align({modes: | ||
| </ | </ | ||
| ^ Transform | ^ Transform | ||
| - | | const newshape = align({modes: | + | | const newshape = align({modes: |
| - | | const newshapes = align({modes: | + | | const newshape = center({axes: |
| - | | const newshape = center({axes: | + | | const newshape = centerX(oldshape) |
| - | | const newshape = centerX(oldshape) | + | | const newshape = centerY(oldshape) |
| - | | const newshape = centerY(oldshape) | + | | const newshape = centerZ(oldshape) |
| - | | const newshape = centerZ(oldshape) | + | | const newshape |
| - | + | | const newshape | |
| - | ^ 2D Transformations | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | 2Dshape = 2Dshape.rotateZ(20); | 3Dshape = 3Dshape.rotateX(90); | + | | const newshape |
| - | | ::: | 3Dshape | + | | const newshape |
| - | | ::: | 3Dshape = 3Dshape.rotateZ(45); | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | ::: | 3Dshape | + | | const newshape |
| - | | 2Dshape = 2Dshape.mirrored(plane); | + | | const newshape |
| - | | 2Dshape | + | | const newshape |
| - | | **/* not supported yet */** | + | | const newshape |
| - | | ::: | 3Dshape | + | |
| - | | ::: | 3Dshape | + | |
| - | | ::: | 3Dshape | + | |
| - | | 2Dshape = 2Dshape.expand(0.2, 8); **/* radius, resolution */** | + | |
| - | | 2Dshape | + | |
| - | + | ||
| - | //Note: Shape transformations can be chained together. Example:// | + | |
| - | **var 3Dshape = CSG.cube().rotate(45).translate([20, | ||