OCCT Fillets: Applying Variable Radius on Specific Edges
In addition to filleting all edges of a solid with a uniform radius, OpenCascade Technology (OCCT) allows for more precise control by applying fillets with different radii to specific, individual edges. This is achieved by identifying the target edges using their edge indexes.
This capability is essential for creating more detailed and nuanced designs where varying degrees of rounding are required on different parts of a model.
How It Works
The general process involves:
- Identifying Target Edges: Determine the indexes of the edges you wish to fillet. You can visualize these indexes using the "Draw Edge Indexes" option in the drawing settings.
- Providing Edge Index and Radius Pairs: The fillet operation will typically require you to provide a list of edge indexes along with their corresponding desired fillet radii. This allows you to specify, for example, that edge index 1 should have a radius of 0.5, while edge index 5 should have a radius of 1.2.
The examples below demonstrate creating a solid box and then applying fillets with different radii to a selection of its edges.
TypeScript Example: Fillet Specific Edges with Variable Radii
const start = async () => {
const boxOpt = new Bit.Inputs.OCCT.BoxDto();
boxOpt.width = 5;
boxOpt.length = 8;
boxOpt.height = 10;
const box = await bitbybit.occt.shapes.solid.createBox(boxOpt);
const filleted = await bitbybit.occt.fillets.filletEdges({
shape: box,
radiusList: [1, 2, 0.3],
indexes: [1, 2, 3]
})
bitbybit.draw.drawAnyAsync({
entity: filleted,
});
}
start();
Blockly Example: Fillet Specific Edges with Variable Radii
<xml xmlns="https://developers.google.com/blockly/xml"><block type="bitbybit.draw.drawAnyAsyncNoReturn" id="UO^K1-FNciNjT{DsaF2S" x="514" y="-1267"><value name="Entity"><block type="bitbybit.occt.fillets.filletEdges" id="HUGQP_OZ2HA+0$!Rq(K-"><value name="Shape"><block type="bitbybit.occt.shapes.solid.createBox" id="|)@8Fjiij5v/gub8f#u$"><value name="Width"><block type="math_number" id="Ki-@9)~]mkRl6?@Rfx5n"><field name="NUM">5</field></block></value><value name="Length"><block type="math_number" id=",~D8g;%9aYqX/!8ING/F"><field name="NUM">8</field></block></value><value name="Height"><block type="math_number" id=":@Ftc#0G%xkQ9Sk+z;+F"><field name="NUM">10</field></block></value><value name="Center"><block type="bitbybit.point.pointXYZ" id="/^:hH^b?Zgyl62v-o`o|"><value name="X"><block type="math_number" id="8Ggh~I~ZP}grGof7=][T"><field name="NUM">0</field></block></value><value name="Y"><block type="math_number" id="j,g@GX_5A}p3E?A`)e)G"><field name="NUM">0</field></block></value><value name="Z"><block type="math_number" id="cFoeLSsG2P4P.Pi]FKnl"><field name="NUM">0</field></block></value></block></value></block></value><value name="RadiusList"><block type="lists_create_with" id="XcA2UEHs0*ObsR*1D4Fl"><mutation items="3"></mutation><value name="ADD0"><block type="math_number" id="ag|?;ikAU*4r7DE21mf1"><field name="NUM">1</field></block></value><value name="ADD1"><block type="math_number" id="}j0o2Tl|AA=NjfiKl9hy"><field name="NUM">2</field></block></value><value name="ADD2"><block type="math_number" id="24bK|Y*n)Z;)zwh)U;%]"><field name="NUM">0.3</field></block></value></block></value><value name="Indexes"><block type="lists_create_with" id="owishX5L@:.mf9k$%FoG"><mutation items="3"></mutation><value name="ADD0"><block type="math_number" id="]^a2nABtULU6lQJmJ)rL"><field name="NUM">1</field></block></value><value name="ADD1"><block type="math_number" id="ClsScm/]O07-eM=oQuq6"><field name="NUM">2</field></block></value><value name="ADD2"><block type="math_number" id="C@1SHC`O~@!^bTGi(1~f"><field name="NUM">3</field></block></value></block></value></block></value></block></xml>
Rete Example: Fillet Specific Edges with Variable Radii
{
"id": "rete-v2-json",
"nodes": {
"627a8cc50042ca11": {
"id": "627a8cc50042ca11",
"name": "bitbybit.occt.shapes.solid.createBox",
"customName": "box",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"width": 5,
"length": 8,
"height": 10,
"center": [
0,
0,
0
],
"originOnCenter": true
},
"inputs": {},
"position": [
-708.9265376490123,
859.1667600728709
]
},
"7dbf39d355a4a6a7": {
"id": "7dbf39d355a4a6a7",
"name": "bitbybit.occt.fillets.filletEdges",
"customName": "fillet edges",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 1
},
"inputs": {
"shape": {
"connections": [
{
"node": "627a8cc50042ca11",
"output": "result",
"data": {}
}
]
},
"radiusList": {
"connections": [
{
"node": "220c5ac8eeed60d1",
"output": "list",
"data": {}
}
]
},
"indexes": {
"connections": [
{
"node": "741fba4c0482a1c4",
"output": "list",
"data": {}
}
]
}
},
"position": [
4.849368722060774,
1232.1525405252057
]
},
"220c5ac8eeed60d1": {
"id": "220c5ac8eeed60d1",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "3deaf348607653c5",
"output": "result",
"data": {}
},
{
"node": "a4e55f01d7171b93",
"output": "result",
"data": {}
},
{
"node": "2eedc26244dacad8",
"output": "result",
"data": {}
}
]
}
},
"position": [
-640.3973867518604,
1430.4370266380179
]
},
"3deaf348607653c5": {
"id": "3deaf348607653c5",
"name": "bitbybit.math.number",
"customName": "number",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 1
},
"inputs": {},
"position": [
-1078.9839555481535,
1161.320096810749
]
},
"a4e55f01d7171b93": {
"id": "a4e55f01d7171b93",
"name": "bitbybit.math.number",
"customName": "number",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 2
},
"inputs": {},
"position": [
-1078.0127214540544,
1378.5970750222207
]
},
"2eedc26244dacad8": {
"id": "2eedc26244dacad8",
"name": "bitbybit.math.number",
"customName": "number",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 0.3
},
"inputs": {},
"position": [
-1081.201301310153,
1599.818546417745
]
},
"741fba4c0482a1c4": {
"id": "741fba4c0482a1c4",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "cddcea779bef9f05",
"output": "result",
"data": {}
},
{
"node": "74455d74bd3781b8",
"output": "result",
"data": {}
},
{
"node": "ea9c1145ead573eb",
"output": "result",
"data": {}
}
]
}
},
"position": [
-682.5098753600391,
2136.7678491912484
]
},
"cddcea779bef9f05": {
"id": "cddcea779bef9f05",
"name": "bitbybit.math.number",
"customName": "number",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 1
},
"inputs": {},
"position": [
-1073.1517770359849,
1845.4768091041688
]
},
"74455d74bd3781b8": {
"id": "74455d74bd3781b8",
"name": "bitbybit.math.number",
"customName": "number",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 2
},
"inputs": {},
"position": [
-1074.0510678638543,
2060.2715749532063
]
},
"ea9c1145ead573eb": {
"id": "ea9c1145ead573eb",
"name": "bitbybit.math.number",
"customName": "number",
"async": false,
"drawable": false,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"number": 3
},
"inputs": {},
"position": [
-1071.0703995224253,
2303.5495396019314
]
}
}
}
By utilizing edge indexing, you gain fine-grained control over filleting operations, enabling the creation of more sophisticated and precisely detailed 3D models. Remember that after a fillet operation, the topology of the shape changes, and edge indexes will be different on the resulting shape.



