Skip to main content

Creating a Simple Loft

OCCT category icon with a stylized logo representation

A loft operation is a fundamental technique in 3D modeling that allows you to create complex surfaces by defining a series of 2D profiles (cross-sections) in space. The software then generates a smooth transitional surface that connects these profiles. This is incredibly useful for modeling organic shapes, aerodynamic bodies, or any object with a varying cross-section.

In this tutorial, we'll walk through the process of creating a simple lofted shape. We will define three distinct elliptical wires at different positions and then use the loft operation to generate a surface that smoothly interpolates between them. We'll demonstrate how to achieve this using Rete, Blockly, and TypeScript, providing a clear understanding of the underlying logic and its implementation in different environments.

The power of lofting comes from its versatility. You can:

  • Use different shapes: Combine circles, rectangles, polygons, or even more complex custom curves.
  • Vary the number of profiles: More profiles can lead to more detailed and controlled surfaces.
  • Adjust profile orientation and scale: Tilting or resizing profiles can dramatically alter the resulting shape.
  • Create solids: By setting the makeSolid option to true (where applicable), you can create volumetric bodies instead of just surfaces.
  • Nr of wire edges: For loft to work correctly in most situations you must ensure that you loft wires that contain the same amount of edges to form topologically coherent faces.
  • Order of wires matter: If you reverse the order of wires in the list your loft faces will point to different direction.
  • Wire direction matters: If you reverse directions of wires and their edges, your loft faces will point to different direction.
Simple loft
Bitbybit Platform

Simple loft in Rete

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"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": 4,
"radiusMajor": 8
},
"inputs": {},
"position": [
410,
135
]
},
"ellipseWire2": {
"id": "ellipseWire2",
"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": 1,
"radiusMajor": 4
},
"inputs": {
"center": {
"connections": [
{
"node": "vectorXyz",
"output": "result",
"data": {}
}
]
}
},
"position": [
411,
550
]
},
"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": 3,
"z": 0
},
"inputs": {},
"position": [
-14,
588
]
},
"ellipseWire3": {
"id": "ellipseWire3",
"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": 2,
"radiusMajor": 6
},
"inputs": {
"center": {
"connections": [
{
"node": "vectorXyz2",
"output": "result",
"data": {}
}
]
}
},
"position": [
414,
963
]
},
"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": 0,
"y": 7,
"z": 0
},
"inputs": {},
"position": [
-18,
985
]
},
"loft": {
"id": "loft",
"name": "bitbybit.occt.operations.loft",
"customName": "loft",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"makeSolid": false
},
"inputs": {
"shapes": {
"connections": [
{
"node": "createList",
"output": "list",
"data": {}
}
]
}
},
"position": [
1346,
575
]
},
"createList": {
"id": "createList",
"name": "bitbybit.lists.createList",
"customName": "create list",
"async": false,
"drawable": false,
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "ellipseWire",
"output": "result",
"data": {}
},
{
"node": "ellipseWire2",
"output": "result",
"data": {}
},
{
"node": "ellipseWire3",
"output": "result",
"data": {}
}
]
}
},
"position": [
939,
627
]
},
"drawAnyAsync": {
"id": "drawAnyAsync",
"name": "bitbybit.draw.drawAnyAsync",
"customName": "draw any async",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
}
},
"inputs": {
"entity": {
"connections": [
{
"node": "loft",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "optionsOcctShapeSimple",
"output": "result",
"data": {}
}
]
}
},
"position": [
1833,
751
]
},
"optionsOcctShapeSimple": {
"id": "optionsOcctShapeSimple",
"name": "bitbybit.draw.optionsOcctShapeSimple",
"customName": "options occt shape simple",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"precision": 0.001,
"drawFaces": true,
"faceColour": "#8000ff",
"drawEdges": true,
"edgeColour": "#ffffff",
"edgeWidth": 2,
"drawTwoSided": true,
"backFaceColour": "#0000ff",
"backFaceOpacity": 1
},
"inputs": {},
"position": [
1349,
915
]
}
},
"modules": {}
}

With these examples, you've learned the basics of creating a lofted surface from a series of wire profiles.

Experiment with these parameters to explore the wide range of forms you can achieve with the loft operation. Happy modeling!