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_linear_extrude [2020/12/05 04:48] JSCAD Editor |
en:design_guide_linear_extrude [2022/05/02 08:02] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Linear Extrude ==== | ==== Linear Extrude ==== | ||
| + | |||
| + | {{ : | ||
| Extrude a two dimensional shape in an upward linear direction. | Extrude a two dimensional shape in an upward linear direction. | ||
| - | The two dimensional shape is extruded to the '' | + | The two dimensional shape is extruded to the '' |
| //Note: The two dimensional shape can be placed anywhere to create various twisted shapes.// | //Note: The two dimensional shape can be placed anywhere to create various twisted shapes.// | ||
| Line 10: | 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> | ||
| - | linear_extrude({ height: 10 }, square()); | + | const { extrudeLinear |
| - | linear_extrude({ height: 10, twist: 90 }, square([1, | + | |
| - | linear_extrude({ height: 10, twist: 360, slices: 50}, circle().translate([1, | + | |
| - | linear_extrude({ height: | + | const myshape = extrudeLinear({height: |
| - | linear_extrude({ height: | + | const myshape = extrudeLinear({height: |
| </ | </ | ||
| - | |||
| - | 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=0, y=0) twiststeps determines the resolution of the twist (should be >= 1), returns a CSG object: | ||