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.

- Rete
- Blockly
- TypeScript
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,
});
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.
A radius that changes along an edge
The fillets above keep one radius along each edge. bitbybit.occt.fillets.filletEdgeVariableRadius lets the radius change along a single edge: radiusList holds the radii and paramsU where each one applies, as fractions of the edge's length from 0 at the start of its curve to 1 at its end, whichever way the edge is turned. A position halfway sits halfway along the edge, on a curve as on a line. A position outside 0 to 1, a radius that is not above 0 and one position given twice with two radii are refused before the fillet is built, naming the place in the list.
Each radius is placed at its own position, with two radii as with more, and the positions may come in any order. Where no position is at 0 or 1, that end takes the nearest radius. Between positions the radius follows a smooth curve that can overshoot the radii you gave, so neighbouring radii that jump far apart can round more, or less, than either of them.

- Rete
- Blockly
- TypeScript
const block = await bitbybit.occt.shapes.solid.createBox({ width: 12, length: 6, height: 4, center: [0, 2, 0] });
const topEdges = await bitbybit.occt.select.edges.extreme({ shape: block, direction: [0, 1, 0] });
const longEdges = await bitbybit.occt.select.edges.along({ shape: block, direction: [1, 0, 0], indexes: topEdges });
const edge = await bitbybit.occt.shapes.edge.getEdge({ shape: block, index: longEdges[0] });
const radii = bitbybit.json.parse({ text: "[0.4, 1.8, 0.4]" });
const positions = bitbybit.json.parse({ text: "[0, 0.5, 1]" });
const swelling = await bitbybit.occt.fillets.filletEdgeVariableRadius({ shape: block, edge, radiusList: radii, paramsU: positions });
await bitbybit.draw.drawAnyAsync({ entity: swelling });
bitbybit.babylon.scene.adjustActiveArcRotateCamera({ position: [12, 12, -16], lookAt: [0, 2, 0] });
filletEdgesSameVariableRadius applies one such profile to several edges, and filletEdgesVariableRadius gives each edge its own.
