Skip to main content

Creating Shapes with Rotated Extrusion

OCCT category icon with a stylized logo representation

Rotated extrusion is a powerful 3D modeling technique used to create spiral-like or helical shapes. It works by taking a 2D profile (an open or closed wire) and sweeping it along a vertical axis while simultaneously rotating the profile around that same axis. This is distinct from a simple revolution (which creates axially symmetric objects) as it involves both linear extrusion and rotation occurring concurrently over the length of the extrusion. This method can be used for generating objects like springs, threads, spiral staircases, or decorative twisted elements.

How Rotated Extrusion Works

The process of creating a shape through rotated extrusion involves several key elements:

  1. The Profile Shape (Wire): This is the initial 2D wire (which can be open, like a line or an arc, or closed, like a rectangle or a circle) that will be extruded and rotated. The geometry of this profile dictates the cross-section of the resulting spiral or helical 3D object.
  2. The Extrusion Height (or Length): This scalar value specifies the distance the profile travels along the [0, 1, 0] vector.
  3. The Total Angle of Rotation (Twist): This defines how much the profile rotates around the [0, 1, 0] axis as it travels the full Extrusion Height. For example, a 360-degree angle means the profile completes one full twist.
  4. Make Solid Option: If the input profile is a closed wire, setting the makeSolid option to true (as seen in the Rete example's rotatedExtrude node and TypeScript's rotatedExtrudeOpt.makeSolid = true) will attempt to create a volumetric, solid helical shape. If the wire is open, or if makeSolid is false, the result will typically be a helical shell or ribbon-like surface.

In the examples below, we will demonstrate how to create a simple solid 3D helical shape by taking a 2D rectangular wire, defining an extrusion height, a rotation angle, and performing a rotated extrusion.

Bitbybit Platform

Rotated Extrude

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"b81c269e01ad99bf": {
"id": "b81c269e01ad99bf",
"name": "bitbybit.occt.operations.rotatedExtrude",
"customName": "rotated extrude",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"height": 4,
"angle": 360,
"makeSolid": true
},
"inputs": {
"shape": {
"connections": [
{
"node": "3b59b158c5f9e707",
"output": "result",
"data": {}
}
]
}
},
"position": [
1000.85546875,
374.42578125
]
},
"3b59b158c5f9e707": {
"id": "3b59b158c5f9e707",
"name": "bitbybit.occt.shapes.wire.createRectangleWire",
"customName": "rectangle wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"width": 1,
"length": 3,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
]
},
"inputs": {},
"position": [
590.111628276491,
367.01635289835633
]
}
}
}

Profiles Further From The Center

When the profile is further from the center it will form a helix like shape. This can be quite powerful and create beautiful looking aesthetics. Check these scripts below.

Bitbybit Platform

Rotated Extrude Multiple Profiles

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"2a178330a72730f1": {
"id": "2a178330a72730f1",
"name": "bitbybit.occt.operations.rotatedExtrude",
"customName": "rotated extrude",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"height": 30,
"angle": 270,
"makeSolid": true
},
"inputs": {
"shape": {
"connections": [
{
"node": "9f969594b0cf6f40",
"output": "result",
"data": {}
}
]
}
},
"position": [
1048.917561518481,
99.26741917649946
]
},
"9f969594b0cf6f40": {
"id": "9f969594b0cf6f40",
"name": "bitbybit.occt.shapes.wire.createNGonWire",
"customName": "ngon wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"nrCorners": 10,
"radius": 1.5
},
"inputs": {
"center": {
"connections": [
{
"node": "3a3daa50670b0170",
"output": "result",
"data": {}
}
]
}
},
"position": [
681.4368917567588,
98.75263851654029
]
},
"b9686ed54db82b31": {
"id": "b9686ed54db82b31",
"name": "bitbybit.occt.shapes.wire.createEllipseWire",
"customName": "ellipse wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"radiusMinor": 6,
"radiusMajor": 10
},
"inputs": {},
"position": [
-405.4059203757722,
100.09558335851492
]
},
"50ac968a2267e242": {
"id": "50ac968a2267e242",
"name": "bitbybit.occt.shapes.wire.divideWireByEqualDistanceToPoints",
"customName": "divide wire by equal distance to points",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"nrOfDivisions": 12,
"removeStartPoint": false,
"removeEndPoint": true
},
"inputs": {
"shape": {
"connections": [
{
"node": "b9686ed54db82b31",
"output": "result",
"data": {}
}
]
}
},
"position": [
-43.11135880446045,
99.30732643142413
]
},
"3a3daa50670b0170": {
"id": "3a3daa50670b0170",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "50ac968a2267e242",
"output": "result",
"data": {}
}
]
}
},
"position": [
317.43152070664985,
140.10402442188126
]
},
"cf557032f1c85ae6": {
"id": "cf557032f1c85ae6",
"name": "bitbybit.occt.shapes.compound.makeCompound",
"customName": "make compound",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"shapes": {
"connections": [
{
"node": "41273b74cff6013f",
"output": "list",
"data": {}
}
]
}
},
"position": [
1787.5233904608274,
100.3102983195994
]
},
"41273b74cff6013f": {
"id": "41273b74cff6013f",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "2a178330a72730f1",
"output": "result",
"data": {}
}
]
}
},
"position": [
1417.6402186250577,
140.08080278569008
]
},
"f5a25c4870f08e58": {
"id": "f5a25c4870f08e58",
"name": "bitbybit.babylon.scene.adjustActiveArcRotateCamera",
"customName": "adjust active arc rotate camera",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"position": [
10,
10,
10
],
"lookAt": [
0,
0,
0
],
"lowerBetaLimit": 1,
"upperBetaLimit": 179,
"angularSensibilityX": 1000,
"angularSensibilityY": 1000,
"maxZ": 1000,
"panningSensibility": 1000,
"wheelPrecision": 3
},
"inputs": {
"lookAt": {
"connections": [
{
"node": "b598b77e334923e8",
"output": "result",
"data": {}
}
]
},
"position": {
"connections": [
{
"node": "02f6cb1875fcb3b0",
"output": "result",
"data": {}
}
]
}
},
"position": [
-401.10121599018737,
503.67305401118836
]
},
"b598b77e334923e8": {
"id": "b598b77e334923e8",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 15,
"z": 0
},
"inputs": {},
"position": [
-982.1348053948486,
687.8467720151841
]
},
"02f6cb1875fcb3b0": {
"id": "02f6cb1875fcb3b0",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 30,
"y": 50,
"z": 30
},
"inputs": {},
"position": [
-976.7459224056403,
354.88193439985156
]
}
}
}

Current Limitations

Currently algorithm is intended to work with flat profiles on the ground plane (normal [0, 1, 0]).

Conclusion

Rotated extrusion is a versatile tool for creating complex helical and spiral geometries from simple 2D wire profiles. By carefully controlling the profile shape, extrusion height, and total rotation angle, you can generate a wide array of interesting and functional 3D models.

Experiment with different 2D wire profiles (open lines, arcs, closed circles, polygons, custom splines), adjust the extrusion height, and vary the rotation angle (try values greater than 360 for multiple twists!). Observe how the makeSolid parameter behaves with open versus closed wires. Happy modeling!