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: This is the flat shape that will be extruded and rotated: a wire or an edge (open, like a line or an arc, or closed, like a rectangle or a circle), or a face without holes, whose outline is swept from its own plane. 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: With a closed wire or a face as the profile, makeSolid set to true, the default (as seen in the Rete example's rotatedExtrude node and TypeScript's rotatedExtrudeOpt.makeSolid = true), gives a solid helical shape. An open wire encloses nothing, so it gives a helical shell, a ribbon-like surface, whatever makeSolid says, and with makeSolid set to false every profile gives a shell. A height of 0 leaves nothing to twist along.
  5. Following the Faces: rotatedExtrudeWithHistory twists the same profile and reports what each part of it became, as a history: facesFromEdges holds the twisted side each profile edge swept, and firstFaces and lastFaces the bottom and top of a solid. A face used as the profile becomes the bottom, under faces.

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.

Rotated extrude
Bitbybit Platform

Rotated extrude in Rete

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"rotatedExtrude": {
"id": "rotatedExtrude",
"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": "rectangleWire",
"output": "result",
"data": {}
}
]
}
},
"position": [
1001,
374
]
},
"rectangleWire": {
"id": "rectangleWire",
"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,
367
]
}
},
"modules": {}
}

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.

Rotated extrude of many profiles
Bitbybit Platform

Rotated extrude of many profiles in Rete

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"rotatedExtrude": {
"id": "rotatedExtrude",
"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": "ngonWire",
"output": "result",
"data": {}
}
]
}
},
"position": [
1049,
99
]
},
"ngonWire": {
"id": "ngonWire",
"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": "flatten",
"output": "result",
"data": {}
}
]
}
},
"position": [
681,
99
]
},
"ellipseWire": {
"id": "ellipseWire",
"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,
100
]
},
"divideWireByEqualDistanceToPoints": {
"id": "divideWireByEqualDistanceToPoints",
"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": "ellipseWire",
"output": "result",
"data": {}
}
]
}
},
"position": [
-43,
99
]
},
"flatten": {
"id": "flatten",
"name": "bitbybit.lists.flatten",
"customName": "flatten",
"async": false,
"drawable": false,
"data": {
"nrLevels": 1
},
"inputs": {
"list": {
"connections": [
{
"node": "divideWireByEqualDistanceToPoints",
"output": "result",
"data": {}
}
]
}
},
"position": [
317,
140
]
},
"makeCompound": {
"id": "makeCompound",
"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": "createList",
"output": "list",
"data": {}
}
]
}
},
"position": [
1788,
100
]
},
"createList": {
"id": "createList",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "rotatedExtrude",
"output": "result",
"data": {}
}
]
}
},
"position": [
1418,
140
]
},
"adjustActiveArcRotateCamera": {
"id": "adjustActiveArcRotateCamera",
"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": "vectorXyz",
"output": "result",
"data": {}
}
]
},
"position": {
"connections": [
{
"node": "vectorXyz2",
"output": "result",
"data": {}
}
]
}
},
"position": [
-401,
504
]
},
"vectorXyz": {
"id": "vectorXyz",
"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,
688
]
},
"vectorXyz2": {
"id": "vectorXyz2",
"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": [
-977,
355
]
}
},
"modules": {}
}

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!