OCCT Chamfers: Applying to Circular and Curved Edges
Chamfering operations in OpenCascade Technology (OCCT) are not restricted to straight, linear edges. They can also be successfully applied to non-linear edges, including:
- Circular edges (e.g., the edge of a cylindrical hole or a rounded boss).
- Elliptical edges.
- Even more complex free-form (spline-based) edges.
This capability allows for the creation of beveled transitions around curved features, which is common in mechanical design and for aesthetic detailing.
Circular edge chamfer on a 3D solid.
The examples below demonstrate creating a box with a cylindrical hole through its middle. Then, a chamfer operation is applied to the circular edges formed by this hole.
TypeScript Example: Chamfer Circular Edge of a Hole
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 cylinderOpt = new Bit.Inputs.OCCT.CylinderDto();
cylinderOpt.direction = [1, 0, 0];
cylinderOpt.center = [-5, 0, 0];
cylinderOpt.radius = 2;
cylinderOpt.height = 10;
const cylinder = await bitbybit.occt.shapes.solid.createCylinder(cylinderOpt)
const difference = await bitbybit.occt.booleans.difference({
shape: box,
shapes: [cylinder],
keepEdges: false
});
const chamfered = await bitbybit.occt.fillets.chamferEdges({
shape: difference,
distance: 0.4
})
bitbybit.draw.drawAnyAsync({
entity: chamfered,
});
}
start();
Blockly Example: Chamfer Circular Edge of a Hole
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="k(XkWbWdxnl0%TB_4u9_">differenceSolid</variable></variables><block type="variables_set" id="}C{{n^m.?vXLuU(.~7mY" x="-525" y="-1335"><field name="VAR" id="k(XkWbWdxnl0%TB_4u9_">differenceSolid</field><value name="VALUE"><block type="bitbybit.occt.booleans.difference" id="I,Im[%,@!wAU5T-h?x=%"><value name="Shape"><block type="bitbybit.occt.shapes.solid.createBox" id="mQ8NHOuARgLyhBk6}g^s"><value name="Width"><block type="math_number" id="7fG@;W/:Vts$zSO}4j(]"><field name="NUM">5</field></block></value><value name="Length"><block type="math_number" id="LCj)(O6k1)^yPkJEoMzD"><field name="NUM">8</field></block></value><value name="Height"><block type="math_number" id="?-!Ip3I^G@=fxbcl4Iu|"><field name="NUM">10</field></block></value><value name="Center"><block type="bitbybit.point.pointXYZ" id="}!.!!0$]TL43CwavkTh*"><value name="X"><block type="math_number" id="z5z_A~D,9e0jpC)1{_g:"><field name="NUM">0</field></block></value><value name="Y"><block type="math_number" id="5=3R#MG7#!Q8TG1[{=P`"><field name="NUM">0</field></block></value><value name="Z"><block type="math_number" id="y*}sZo/[)Qb/ZUE?u!ep"><field name="NUM">0</field></block></value></block></value></block></value><value name="Shapes"><block type="lists_create_with" id="(h9J`BPx^V,0XTyq=PnP"><mutation items="1"></mutation><value name="ADD0"><block type="bitbybit.occt.shapes.solid.createCylinder" id="zCXY$3~6]yn!t?2NHYO0"><value name="Radius"><block type="math_number" id="Gf/92+]J{]Z=%hjB)bF6"><field name="NUM">2</field></block></value><value name="Height"><block type="math_number" id="t??PSPjr1RL0+IIV*~fB"><field name="NUM">10</field></block></value><value name="Center"><block type="bitbybit.point.pointXYZ" id="GR4I^-d3-$v7{E+qreOr"><value name="X"><block type="math_number" id="%%gSbrNZIFNH~maeVi-a"><field name="NUM">-5</field></block></value><value name="Y"><block type="math_number" id="*dZ2.kWamII0yD^(#{Pa"><field name="NUM">0</field></block></value><value name="Z"><block type="math_number" id="mIk*_{8$CQ=,1mQ.Z*zX"><field name="NUM">0</field></block></value></block></value><value name="Direction"><block type="bitbybit.vector.vectorXYZ" id="!XCU9xf(N!O53i#nAlEQ"><value name="X"><block type="math_number" id="IMsq+E`6P@HN$;~8^lbZ"><field name="NUM">1</field></block></value><value name="Y"><block type="math_number" id="DG87Vv06K:Z/54Zb=ne~"><field name="NUM">0</field></block></value><value name="Z"><block type="math_number" id="~gn3U8iS+pqmQjZ}M8Sk"><field name="NUM">0</field></block></value></block></value></block></value></block></value><value name="KeepEdges"><block type="logic_boolean" id="N5$-DTnFC:`~|SD12Wkh"><field name="BOOL">FALSE</field></block></value></block></value><next><block type="bitbybit.draw.drawAnyAsyncNoReturn" id="pF!Mww.[{,{0LvKi|wH}"><value name="Entity"><block type="bitbybit.occt.fillets.chamferEdges" id="76A-4pZ@I:Hre1*8I/vU"><value name="Shape"><block type="variables_get" id="ilHm@HD^.hYBK_|2#HXU"><field name="VAR" id="k(XkWbWdxnl0%TB_4u9_">differenceSolid</field></block></value><value name="Distance"><block type="math_number" id="a7qb/Osu:a!%Jv23@FkJ"><field name="NUM">0.4</field></block></value></block></value></block></next></block></xml>
Rete Example: Chamfer Circular Edge of a Hole
{
"id": "rete-v2-json",
"nodes": {
"465a6cff04eeb4c7": {
"id": "465a6cff04eeb4c7",
"name": "bitbybit.occt.fillets.chamferEdges",
"customName": "chamfer edges",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": false,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"distance": 0.5
},
"inputs": {
"shape": {
"connections": [
{
"node": "134db198c978e5a5",
"output": "result",
"data": {}
}
]
}
},
"position": [
25.869618545988516,
850.4317699140497
]
},
"b19bb772deab47ce": {
"id": "b19bb772deab47ce",
"name": "bitbybit.occt.shapes.solid.createCylinder",
"customName": "cylinder",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"radius": 2,
"height": 8,
"center": [
0,
0,
0
],
"direction": [
0,
1,
0
],
"angle": 360,
"originOnCenter": false
},
"inputs": {
"direction": {
"connections": [
{
"node": "28b22e6329a3febd",
"output": "result",
"data": {}
}
]
},
"center": {
"connections": [
{
"node": "36c94019c8ee49cf",
"output": "result",
"data": {}
}
]
}
},
"position": [
-905.7708007163599,
967.4837207911903
]
},
"28b22e6329a3febd": {
"id": "28b22e6329a3febd",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": 1,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
-1270.401024117951,
1308.0223750907223
]
},
"3cc824a676577242": {
"id": "3cc824a676577242",
"name": "bitbybit.lists.createList",
"customName": "create list",
"data": {},
"inputs": {
"listElements": {
"connections": [
{
"node": "b19bb772deab47ce",
"output": "result",
"data": {}
}
]
}
},
"position": [
-548.0110127318145,
1114.6413541651573
]
},
"134db198c978e5a5": {
"id": "134db198c978e5a5",
"name": "bitbybit.occt.booleans.difference",
"customName": "difference",
"async": true,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"keepEdges": false
},
"inputs": {
"shapes": {
"connections": [
{
"node": "3cc824a676577242",
"output": "list",
"data": {}
}
]
},
"shape": {
"connections": [
{
"node": "d3846c69e45faeee",
"output": "result",
"data": {}
}
]
}
},
"position": [
-334.28492550210524,
727.5800438660185
]
},
"d3846c69e45faeee": {
"id": "d3846c69e45faeee",
"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": 11,
"center": [
0,
0,
0
],
"originOnCenter": true
},
"inputs": {},
"position": [
-1099.250222686699,
476.74125056103367
]
},
"36c94019c8ee49cf": {
"id": "36c94019c8ee49cf",
"name": "bitbybit.vector.vectorXYZ",
"customName": "vector xyz",
"async": false,
"drawable": true,
"data": {
"genericNodeData": {
"hide": true,
"oneOnOne": false,
"flatten": 0,
"forceExecution": false
},
"x": -4,
"y": 0,
"z": 0
},
"inputs": {},
"position": [
-1295.6103092286526,
922.9426725145504
]
}
}
}
Being able to chamfer curved edges is essential for achieving a wide range of design intents, from functional deburring of holes to specific aesthetic finishes on complex parts. The underlying principles of selecting edges (often by index if not chamfering all) and specifying chamfer distances remain similar to chamfering straight edges.



