meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
en:design_guide_scale [2020/11/28 02:57] JSCAD Editor created |
en:design_guide_scale [2020/12/08 06:52] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Scale ==== | ==== Scale ==== | ||
| - | Shapes can be scaled by any factor. Shapes are enlarged | + | Shapes can be scaled by any factor, enlarging |
| // | // | ||
| Defaults: | Defaults: | ||
| - | * factor | + | * factors |
| <code javascript> | <code javascript> | ||
| - | let obj = sphere(5) | + | const myshape |
| - | obj = scale(2,obj) | + | const newshape |
| - | obj = scale([1,2,3],obj) | + | |
| </ | </ | ||
| - | The CSG library functions can also be used. //NOTE: Deprecated in the V2 API// | + | In addition, there are simple versions of the same function for scaling about a single axis. |
| <code javascript> | <code javascript> | ||
| - | obj.scale([1,2,3]) | + | const myshape = sphere({radius: |
| + | let newshape = scaleX(2, myshape) | ||
| + | newshape = scaleY(4, newshape) | ||
| + | newshape = scaleZ(6, newshape) | ||
| </ | </ | ||