meta data for this page
  •  

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:design_guide_linear_extrude [2020/12/05 05:07]
JSCAD Editor
en:design_guide_linear_extrude [2022/05/02 08:02] (current)
JSCAD Editor
Line 12: Line 12:
   * height : 1   * height : 1
   * twist : 0   * twist : 0
-  * twistSteps : 1 +  * twistSteps : 1 (Note: Increasing the value of twistSteps improves the overall shape.)
  
 <code javascript> <code javascript>
-let myshape = extrudeLinear({height: radiusZ * 2}, shape1) +const { extrudeLinear } = require('@jscad/modeling').extrusions
-let myshape extrudeLinear({height: radiusZ * 2, twistAngle: Math.PI 2, twistSteps: 10}, shape2) +
-let myshape = extrudeLinear({height: radiusZ * 2}, shape3) +
-</code>+
  
-Linear extrusion of 2D shape, with optional twist. The 2d shape is placed in in z=0 plane and extruded into direction offset (a CSG.Vector3D). The final face is rotated twistangle degrees. Rotation is done around the origin of the 2D shape (i.e. x=0y=0twiststeps determines the resolution of the twist (should be >= 1), returns a CSG object:+const myshape extrudeLinear({height: radiusZ * 2}, shape1) 
 +const myshape = extrudeLinear({height: radiusZ * 2, twistAngle: Math.PI / 2twistSteps: 10}, shape2) 
 +</code>