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_transforms [2020/12/01 01:53] JSCAD Editor |
en:design_guide_transforms [2021/05/12 08:28] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| <code javascript> | <code javascript> | ||
| - | let circleA | + | const myshape |
| - | let circleB | + | const newshape |
| </ | </ | ||
| Line 11: | Line 11: | ||
| <code javascript> | <code javascript> | ||
| - | let circleA | + | let myshape |
| - | circleA | + | myshape |
| </ | </ | ||
| Line 18: | Line 18: | ||
| <code javascript> | <code javascript> | ||
| - | let circleA | + | let myshape |
| </ | </ | ||
| Line 24: | Line 24: | ||
| <code javascript> | <code javascript> | ||
| - | // rotate the circle | + | let myshape = scale([5, 10]). circle({radius: 5})) |
| - | // and translate the circle up the Z axis 10 units | + | myshape |
| - | // and assign the result to circleB | + | |
| - | let circleB | + | |
| </ | </ | ||
| - | The original shape can be transformed any number of times. For example, the same cylinder can be rotated, making | + | The original shape can be transformed any number of times. For example, the a single |
| The transforms return a single shape or an array of shapes depending on the given shapes. | The transforms return a single shape or an array of shapes depending on the given shapes. | ||
| Line 41: | Line 39: | ||
| ==== Orientation ==== | ==== Orientation ==== | ||
| - | The standard for all 3D systems today, including graphics cards, design tools, etc. is orientating shapes using the right-hand rule. JSCAD follows the same rules internally, and produces shapes, applies transforms, etc. using the right-hand rule of orientation. | + | The standard for all 3D systems today, including graphics cards, design tools, etc. is orientating shapes using the right-hand rule. JSCAD follows the same rules internally, and produces shapes, applies transforms, etc. using the right-hand rule of orientation. |
| - | + | ||
| - | //[[https:// | + | |
| {{page> | {{page> | ||
| Line 50: | Line 46: | ||
| {{page> | {{page> | ||
| + | |||
| + | {{page> | ||
| {{page> | {{page> | ||