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_rotate_extrude [2020/12/05 06:12]
JSCAD Editor
en:design_guide_rotate_extrude [2022/05/02 08:04] (current)
JSCAD Editor
Line 3: Line 3:
 {{ :wiki:jscad-extruderotate.png?nolink | Extrude Rotate}} {{ :wiki:jscad-extruderotate.png?nolink | Extrude Rotate}}
  
-Additional also rotate_extrude() is available.+Extrude a two dimensional shape in a rotation about the Z axis. The two dimensional shape can be placed anywhere to create various three dimensional shapes. The ''segments'' specify the number of segments to create per full rotation
  
 Defaults: Defaults:
   * startAngle : 0   * startAngle : 0
-  * angle: 360 +  * angle: PI * 2 
-  * overflow: 'cap' (cap the ends inorder to create a solid) +  * overflow: 'cap' (cap the ends in order to create a solid) 
-  * fn32+  * segments12 (Note: Increasing the value of segments improves the overall shape.)
  
 <code javascript> <code javascript>
-rotate_extrude(translate([4,0,0], circle({r1fn: 30, center: true}) ); +const myshape = extrudeRotate({segments64}shape1
-rotate_extrude({fn36, startAngle: 45, angle: 180}, translate([4, 0, 0], circle({r: 1, fn: 30, center: true}))); +const myshape = extrudeRotate({segments8, angle: Math.PI startAngle: 0}, shape3)
- +
-rotate_extrude({fn:4}, square({size: [1,1], center: true}).translate([4,0,0]) ); +
- +
-rotate_extrude(polygon({points:[ [0,0],[2,1],[1,2],[1,3],[3,4],[0,5] ]}) ); +
-rotate_extrude({fn:4}, polygon({points:[ [0,0],[2,1],[1,2],[1,3],[3,4],[0,5] ]}) );+
 </code> </code>
  
-You can essentially extrude any 2D polygon (circle, square or polygon).