meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 (increases) or shrunk (diminishes) by a scale factor. The result of scaling is a similar shape (in the geometric sense) to the original.+Shapes can be scaled by any factor, enlarging (increasing) or shrinking (diminishingshapes by the ''factors'' about X, Y, and Z axis. The result of scaling is a similar shape (in the geometric sense) to the original.
  
 //[[https://en.wikipedia.org/wiki/Scaling_(geometry)|Learn about the scaling shapes at Wikipedia.org]]// //[[https://en.wikipedia.org/wiki/Scaling_(geometry)|Learn about the scaling shapes at Wikipedia.org]]//
  
 Defaults: Defaults:
-  * factor 1.0 or [1.0,1.0,1.0]+  * factors : [1.0, 1.0, 1.0]
  
 <code javascript> <code javascript>
-let obj = sphere(5) +const myshape = sphere({radius: 5}
-obj = scale(2,obj) +const newshape = scale([2, 46], myshape)
-obj = scale([1,2,3],obj)+
 </code> </code>
  
-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: 5}) 
 +let newshape = scaleX(2, myshape) 
 +newshape = scaleY(4, newshape) 
 +newshape = scaleZ(6, newshape)
 </code> </code>