OCCT Fillets: Creating Rounded Edges
Introduction to Fillets
Fillets are geometric operations that create smooth, rounded transitions along the edges of shapes. They are widely used in various industries to:
- Soften sharp corners and edges, giving shapes a more organic or aesthetically pleasing look.
- Improve structural integrity by reducing stress concentrations at sharp intersections.
- Create smooth transitions between two or more surfaces on shells and solids.
- Apply roundings between two or more connected edges within a wire.
How Can Fillets Be Applied to a Solid?
In Bitbybit, leveraging OCCT's capabilities, there are a few primary ways to create fillets on solid shapes:
- Fillet All Edges: You can apply a fillet of a uniform radius to all eligible edges of a solid simultaneously.
- Fillet Specific Edges by Index: For more precise control, you can apply fillets to specific edges by providing their edge indexes. This allows for different radii on different edges or filleting only a subset of edges.
Filleting All Edges of a Solid
Let's first look at the simplest case: applying a fillet with a given radius to all applicable edges of a solid. In Bitbybit, you'll typically use a "Fillet Edges" command or function for this.
The following examples in TypeScript, Rete, and Blockly demonstrate creating a simple box solid and then filleting all its edges:

- Rete
- Blockly
- TypeScript
{
"id": "rete-v2-json",
"nodes": {
"box": {
"id": "box",
"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": [
-709,
859
]
},
"filletEdges": {
"id": "filletEdges",
"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": "box",
"output": "result",
"data": {}
}
]
}
},
"position": [
-270,
1147
]
}
},
"modules": {}
}
<xml xmlns="https://developers.google.com/blockly/xml"><block type="bitbybit.draw.drawAnyAsyncNoReturn" x="126" y="-931"><value name="Entity"><block type="bitbybit.occt.fillets.filletEdges"><value name="Shape"><block type="bitbybit.occt.shapes.solid.createBox"><value name="Width"><block type="math_number"><field name="NUM">5</field></block></value><value name="Length"><block type="math_number"><field name="NUM">8</field></block></value><value name="Height"><block type="math_number"><field name="NUM">10</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></block></value><value name="Radius"><block type="math_number"><field name="NUM">1</field></block></value></block></value></block></xml>
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,
radius: 1,
})
bitbybit.draw.drawAnyAsync({
entity: filleted,
});
Filleting operations are a powerful tool in CAD modeling for refining designs and achieving desired aesthetics and functional properties. In subsequent sections or advanced tutorials, we might explore how to fillet specific edges using their indexes and apply other types of fillets.
Finding the rounds afterwards
A later step often needs the faces a fillet made, to color them, measure them or build on them. The fillets that take a list of edges each have a twin that rounds the same edges and also returns a history of what became of every face, edge and vertex: facesFromEdges holds the round made along each edge, facesFromVertices the blend where rounds meet at a corner, and faces what each face of the shape was trimmed to.
filletEdgesListOneRadiusWithHistoryrounds the edges given with one radius, andfilletEdgesListWithHistorywith a radius each.filletEdgeVariableRadiusWithHistoryrounds one edge with a radius that changes along it,filletEdgesSameVariableRadiusWithHistoryseveral edges with one such changing radius, andfilletEdgesVariableRadiusWithHistoryseveral edges, each with its own.
Picking faces and edges explains what a history holds and finds the rounds of a box with one.



