Skip to main content

OCCT Fillets: Creating Rounded Edges

OCCT category icon with a stylized logo representation

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.

A 3D solid box with several of its edges rounded by fillet operations of varying radii. Fillets on a 3D solid with variable radii.

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:

  1. Fillet All Edges: You can apply a fillet of a uniform radius to all eligible edges of a solid simultaneously.
  2. 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:

TypeScript Example: Fillet All Edges of a Solid

Bitbybit Platform

Fillet Solid

typescript logoTypescript
Script Source (typescript)
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,
radius: 1,
})

bitbybit.draw.drawAnyAsync({
entity: filleted,
});
}

start();

Blockly Example: Fillet All Edges of a Solid

Bitbybit Platform

Fillet Solid

blockly logoBlockly
Script Source (blockly)
<xml xmlns="https://developers.google.com/blockly/xml"><block type="bitbybit.draw.drawAnyAsyncNoReturn" id="UO^K1-FNciNjT{DsaF2S" x="126" y="-931"><value name="Entity"><block type="bitbybit.occt.fillets.filletEdges" id="]d!qIi^FvTrfo6~}o~r!"><value name="Shape"><block type="bitbybit.occt.shapes.solid.createBox" id="}ti`95.Px,*VWdbe:+2("><value name="Width"><block type="math_number" id="qKPm%W;J:H.3i8v#2Ibp"><field name="NUM">5</field></block></value><value name="Length"><block type="math_number" id="KA!u62qD46=^mm()r/Kr"><field name="NUM">8</field></block></value><value name="Height"><block type="math_number" id="1P/r/2V@?!Yd|dy3n78U"><field name="NUM">10</field></block></value><value name="Center"><block type="bitbybit.point.pointXYZ" id="lyxO-q4()OdN=awoG:Y0"><value name="X"><block type="math_number" id="4bQJbGsRZ2NRQ)=dgggy"><field name="NUM">0</field></block></value><value name="Y"><block type="math_number" id="(.66wVQ[,1%aY!?{k4(:"><field name="NUM">0</field></block></value><value name="Z"><block type="math_number" id="C5,9wZ=aD7(*AhsLhq3%"><field name="NUM">0</field></block></value></block></value></block></value><value name="Radius"><block type="math_number" id="Tl]m971f5#L-B6U8oI2$"><field name="NUM">1</field></block></value></block></value></block></xml>

Rete Example: Fillet All Edges of a Solid

Bitbybit Platform

Fillet Solid

rete logoRete
Script Source (rete)
{
"id": "rete-v2-json",
"nodes": {
"24d5eba8a6441cd3": {
"id": "24d5eba8a6441cd3",
"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
]
},
"fabbb1728807a7f9": {
"id": "fabbb1728807a7f9",
"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": "24d5eba8a6441cd3",
"output": "result",
"data": {}
}
]
}
},
"position": [
-269.9433663221892,
1146.51629885998
]
}
}
}

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.