OCCT Fillets: Applying Variable Radius on Specific Corners of 2D Wires
While filleting all corners of a 2D wire with a uniform radius is common, OpenCascade Technology (OCCT) also provides the capability to apply fillets with different radii to specific, individual corners (vertices) of a wire. This allows for more nuanced and precise control over the shape of 2D profiles.
To achieve this, you typically need to:
- Identify Target Corners: Determine which vertices (corners) of the wire you want to fillet. This might involve knowing the order of vertices in the wire or selecting them based on their position.
- Provide Vertex and Radius Pairs: The fillet operation will usually require a list of target vertices (or their indexes within the wire) and the corresponding fillet radius to be applied at each of those specific corners.
The examples below demonstrate creating a 2D wire and then applying fillets with different radii to selected corners.

- Rete
- Blockly
- TypeScript
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"squareWire": {
"id": "squareWire",
"name": "bitbybit.occt.shapes.wire.createSquareWire",
"customName": "square wire",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"size": 1,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
]
},
"inputs": {},
"position": [
874,
611
]
},
"parse": {
"id": "parse",
"name": "bitbybit.json.parse",
"customName": "parse",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"text": "[1, 3]"
},
"inputs": {},
"position": [
881,
1297
]
},
"fillet2d": {
"id": "fillet2d",
"name": "bitbybit.occt.fillets.fillet2d",
"customName": "fillet 2d",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 0.1
},
"inputs": {
"indexes": {
"connections": [
{
"node": "parse",
"output": "result",
"data": {}
}
]
},
"shape": {
"connections": [
{
"node": "squareWire",
"output": "result",
"data": {}
}
]
},
"radiusList": {
"connections": [
{
"node": "parse2",
"output": "result",
"data": {}
}
]
}
},
"position": [
1417,
919
]
},
"parse2": {
"id": "parse2",
"name": "bitbybit.json.parse",
"customName": "parse",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"text": "[0.2, 0.3]"
},
"inputs": {},
"position": [
881,
1003
]
}
},
"modules": {}
}
Script Source (blockly)
<xml xmlns="https://developers.google.com/blockly/xml"><block type="bitbybit.draw.drawAnyAsyncNoReturn" x="-386" y="-1094"><value name="Entity"><block type="bitbybit.occt.fillets.fillet2d"><value name="Shape"><block type="bitbybit.occt.shapes.wire.createSquareWire"><value name="Size"><block type="math_number"><field name="NUM">1</field></block></value><value name="Center"><block type="bitbybit.point.pointXYZ"><value name="X"><block type="math_number"><field name="NUM">0</field></block></value><value name="Y"><block type="math_number"><field name="NUM">0</field></block></value><value name="Z"><block type="math_number"><field name="NUM">0</field></block></value></block></value><value name="Direction"><block type="bitbybit.vector.vectorXYZ"><value name="X"><block type="math_number"><field name="NUM">0</field></block></value><value name="Y"><block type="math_number"><field name="NUM">1</field></block></value><value name="Z"><block type="math_number"><field name="NUM">0</field></block></value></block></value></block></value><value name="RadiusList"><block type="lists_create_with"><mutation items="2"></mutation><value name="ADD0"><block type="math_number"><field name="NUM">0.1</field></block></value><value name="ADD1"><block type="math_number"><field name="NUM">0.3</field></block></value></block></value><value name="Indexes"><block type="lists_create_with"><mutation items="2"></mutation><value name="ADD0"><block type="math_number"><field name="NUM">1</field></block></value><value name="ADD1"><block type="math_number"><field name="NUM">3</field></block></value></block></value></block></value></block></xml>
Script Source (typescript)
const squareOpt = new Bit.Inputs.OCCT.SquareDto();
const square = await bitbybit.occt.shapes.wire.createSquareWire(squareOpt);
const squareFillet = await bitbybit.occt.fillets.fillet2d({
shape: square,
radiusList: [0.1, 0.3],
indexes: [1, 3]
});
bitbybit.draw.drawAnyAsync({
entity: squareFillet
});
Applying variable radius fillets to specific corners of 2D wires is a powerful technique for creating custom profiles with precise rounded features, which can then be used as a basis for more complex 3D modeling operations.



