Skip to main content
OCCT category icon with a stylized logo representation

Introduction to OCCT Solids

Solids are three-dimensional shapes that represent complete geometric objects with volume. OCCT provides several primitive solid types that serve as building blocks for more complex 3D modeling operations. These primitives are commonly used in CAD applications and can be combined, modified, and transformed to create sophisticated geometries.

This example demonstrates the creation of the most common primitive solid types:

  • Box: A rectangular solid with specified width, length, and height
  • Cube: A special case of a box where all dimensions are equal
  • Cylinder: A circular solid with specified radius and height
  • Sphere: A perfectly round solid with a specified radius
  • Cone: A tapered solid with different radii at top and bottom
Bitbybit Platform

Creating primitive solids

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"e43513e5f9c946b0": {
"id": "e43513e5f9c946b0",
"name": "bitbybit.occt.shapes.solid.createBox",
"customName": "box",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"width": 3,
"length": 7,
"height": 8,
"center": [
0,
0,
0
],
"originOnCenter": true
},
"inputs": {},
"position": [
1095.4134994211415,
212.13676636576983
]
},
"25b61f24af681fc1": {
"id": "25b61f24af681fc1",
"name": "bitbybit.occt.shapes.solid.createCube",
"customName": "cube",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"size": 5,
"center": [
0,
0,
0
],
"originOnCenter": true
},
"inputs": {
"center": {
"connections": [
{
"node": "448bcc9a53099187",
"output": "result",
"data": {}
}
]
}
},
"position": [
1096.2055156502413,
638.7451662706167
]
},
"448bcc9a53099187": {
"id": "448bcc9a53099187",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 5,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
725.9477971825983,
679.5545829434357
]
},
"a9f77700c1e1906f": {
"id": "a9f77700c1e1906f",
"name": "bitbybit.occt.shapes.solid.createCylinder",
"customName": "cylinder",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 2,
"height": 3,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"angle": 360,
"originOnCenter": true
},
"inputs": {
"center": {
"connections": [
{
"node": "8aca4ab6493670a2",
"output": "result",
"data": {}
}
]
}
},
"position": [
1101.6017421578954,
1056.9492391773358
]
},
"8aca4ab6493670a2": {
"id": "8aca4ab6493670a2",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -5,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
729.2621246892346,
1134.7941632755822
]
},
"ec2580a4c1ac2d9d": {
"id": "ec2580a4c1ac2d9d",
"name": "bitbybit.occt.shapes.solid.createSphere",
"customName": "sphere",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 1.5,
"center": [
0,
0,
0
]
},
"inputs": {
"center": {
"connections": [
{
"node": "6b160cf261dd2fea",
"output": "result",
"data": {}
}
]
}
},
"position": [
1117.3865750518971,
1522.4103305452768
]
},
"6b160cf261dd2fea": {
"id": "6b160cf261dd2fea",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 10,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
712.3423435103973,
1562.1195996984645
]
},
"5a40465432d84f3b": {
"id": "5a40465432d84f3b",
"name": "bitbybit.occt.shapes.solid.createCone",
"customName": "cone",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius1": 2,
"radius2": 1,
"height": 3,
"angle": 360,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
]
},
"inputs": {
"center": {
"connections": [
{
"node": "2d48f4fb2d21c489",
"output": "result",
"data": {}
}
]
}
},
"position": [
1118.347451513905,
1888.699223011909
]
},
"2d48f4fb2d21c489": {
"id": "2d48f4fb2d21c489",
"name": "bitbybit.point.pointXYZ",
"customName": "point xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -10,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
724.1861903355834,
2041.562153475275
]
}
}
}

These primitive solids serve as the foundation for more complex 3D modeling operations. They can be combined using boolean operations (union, intersection, difference), transformed, and modified to create sophisticated geometries for engineering and design applications.