meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
en:design_guide_linear_extrude [2020/11/28 03:06] JSCAD Editor created |
en:design_guide_linear_extrude [2022/05/02 08:02] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Extrusions ===== | + | ==== Linear Extrude |
| - | {{page> | + | {{ : |
| - | {{page> | + | Extrude a two dimensional shape in an upward linear direction. |
| - | {{page> | + | The two dimensional shape is extruded to the '' |
| - | ==== Linear Extrude ==== | + | |
| - | Extruding 2D shapes | + | //Note: The two dimensional shape can be placed anywhere to create various twisted |
| + | |||
| + | Defaults: | ||
| + | * height | ||
| + | * twist : 0 | ||
| + | * 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: | ||
| - | |||
| - | <code javascript> | ||
| - | // CAG built in method | ||
| - | var c = CAG.circle({radius: | ||
| - | extruded = c.extrude({offset: | ||
| - | </ | ||