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.
Bitbybit Platform

Simple Loft Operation

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"b8a58571ebd30b44": {
"id": "b8a58571ebd30b44",
"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": [
409.9140625,
135.00390625
]
},
"0999348ac27dbe3a": {
"id": "0999348ac27dbe3a",
"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": "5b0a2e7a36e52bc6",
"output": "result",
"data": {}
}
]
}
},
"position": [
411.21484375,
550.01953125
]
},
"5b0a2e7a36e52bc6": {
"id": "5b0a2e7a36e52bc6",
"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": [
-13.58203125,
587.8515625
]
},
"58baa94ee15ce87c": {
"id": "58baa94ee15ce87c",
"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": "31cc8830d0d5b8d6",
"output": "result",
"data": {}
}
]
}
},
"position": [
414.354436433955,
962.7267506423071
]
},
"31cc8830d0d5b8d6": {
"id": "31cc8830d0d5b8d6",
"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.337436698711855,
985.1818818123244
]
},
"aa7b869ef39ad66c": {
"id": "aa7b869ef39ad66c",
"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": "5f66390fcd956929",
"output": "list",
"data": {}
}
]
}
},
"position": [
1345.6703881224773,
574.9945464709863
]
},
"5f66390fcd956929": {
"id": "5f66390fcd956929",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "b8a58571ebd30b44",
"output": "result",
"data": {}
},
{
"node": "0999348ac27dbe3a",
"output": "result",
"data": {}
},
{
"node": "58baa94ee15ce87c",
"output": "result",
"data": {}
}
]
}
},
"position": [
938.8623690201757,
627.1782400352727
]
},
"71104a241cda7a83": {
"id": "71104a241cda7a83",
"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": "aa7b869ef39ad66c",
"output": "result",
"data": {}
}
]
},
"options": {
"connections": [
{
"node": "2b01c4bcdaa8b222",
"output": "result",
"data": {}
}
]
}
},
"position": [
1832.5904062824504,
751.3332776592763
]
},
"2b01c4bcdaa8b222": {
"id": "2b01c4bcdaa8b222",
"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
},
"inputs": {},
"position": [
1348.8560416190364,
915.1471633350661
]
}
}
}

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!