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

Introduction to OCCT Face Basic Primitives

Faces are two-dimensional surfaces that fill geometric boundaries to create areas in 3D space. While wires define outlines and curves, faces create actual surfaces that can be visualized with materials, analyzed for properties, and used to build 3D solids.

Think of wires as the frame of a window, and faces as the glass that fills the frame. This tutorial demonstrates creating circle, square, rectangle, and ellipse faces using different programming approaches.

Bitbybit Platform

Creating basic face primitives

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"9d2950eb42d026eb": {
"id": "9d2950eb42d026eb",
"name": "bitbybit.occt.shapes.face.createCircleFace",
"customName": "circle face",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 4,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
]
},
"inputs": {},
"position": [
913.703125,
436.41015625
]
},
"c863eef64ddee2c8": {
"id": "c863eef64ddee2c8",
"name": "bitbybit.occt.shapes.face.createEllipseFace",
"customName": "ellipse face",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"radiusMinor": 1,
"radiusMajor": 3
},
"inputs": {
"center": {
"connections": [
{
"node": "5f27a0fdde38d7ea",
"output": "result",
"data": {}
}
]
}
},
"position": [
905.5502310832453,
1678.0205681556072
]
},
"ddacad79d6942524": {
"id": "ddacad79d6942524",
"name": "bitbybit.occt.shapes.face.createSquareFace",
"customName": "square face",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"size": 3,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
]
},
"inputs": {
"center": {
"connections": [
{
"node": "2014565152a68ddc",
"output": "result",
"data": {}
}
]
}
},
"position": [
916.0273536742325,
838.3467683139284
]
},
"915c753679d2ae7b": {
"id": "915c753679d2ae7b",
"name": "bitbybit.occt.shapes.face.createRectangleFace",
"customName": "rectangle face",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"width": 3,
"length": 7,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
]
},
"inputs": {
"center": {
"connections": [
{
"node": "305e88c644ea099a",
"output": "result",
"data": {}
}
]
}
},
"position": [
910.5168109763998,
1219.3530266682635
]
},
"2014565152a68ddc": {
"id": "2014565152a68ddc",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 7,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
501.7924955588585,
880.408747068502
]
},
"305e88c644ea099a": {
"id": "305e88c644ea099a",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -7,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
518.7778459924483,
1299.4829635556591
]
},
"5f27a0fdde38d7ea": {
"id": "5f27a0fdde38d7ea",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 0,
"y": 0,
"z": -9
},
"inputs": {},
"position": [
507.829978040304,
1682.2323868383787
]
}
}
}

Each face primitive requires basic parameters: a center point for positioning, a direction vector for orientation (typically [0,1,0] for horizontal faces), and size parameters like radius for circles or width/length for rectangles. The examples create four different face types at separate positions so you can see them clearly.

These face primitives serve as building blocks for more complex modeling operations. You can extrude them into 3D solids, combine them with boolean operations, or use them as surfaces for analysis and visualization. They're commonly used in architectural modeling, manufacturing design, and any application where you need precise geometric surfaces.