Cutting, forming and finishing
Once a part has its shape, the shop cuts its holes, presses its stiffening and ventilation shapes into it, and finishes its edges. Each of those is one operation here, and each works on one region at a time, given by its face.
Holes, notches, slots and pockets
bitbybit.occt.fabrication.sheetMetal.cut takes closed profiles drawn on a region's face and cuts each square through the sheet, as a laser or a punch does. A profile may run over the region's outline, which cuts a notch, but never onto a bend: holes near a bend distort when it is formed, so a cut that reaches one is refused.




- Rete
- Blockly
- TypeScript
const { sheetMetal } = bitbybit.occt.fabrication;
const { wire } = bitbybit.occt.shapes;
const blank = await bitbybit.occt.shapes.face.createRectangleFace({ width: 140, length: 90, center: [0, 0, 0], direction: [0, 1, 0] });
let panel = await sheetMetal.plate({ face: blank, thickness: 2, bendRadius: 2, name: "panel" });
panel = await sheetMetal.flange({
part: panel,
insideFace: await sheetMetal.insideFace({ part: panel, region: "panel" }),
edge: await sheetMetal.insideEdgeToward({ part: panel, region: "panel", direction: [0, 0, -1] }),
length: 30,
name: "wall",
});
const holes = [
await wire.createCircleWire({ radius: 6, center: [-40, 0, 10], direction: [0, 1, 0] }),
await wire.createCircleWire({ radius: 6, center: [0, 0, 10], direction: [0, 1, 0] }),
];
const notch = await wire.createRectangleWire({ width: 30, length: 20, center: [55, 0, 45], direction: [0, 1, 0] });
panel = await sheetMetal.cut({ part: panel, face: await sheetMetal.insideFace({ part: panel, region: "panel" }), profiles: [...holes, notch] });
const slot = await bitbybit.occt.fillets.fillet2d({ shape: await wire.createRectangleWire({ width: 10, length: 40, center: [0, 15, -43], direction: [0, 0, 1] }), radius: 4.9 });
panel = await sheetMetal.cut({ part: panel, face: await sheetMetal.insideFace({ part: panel, region: "wall" }), profiles: [slot] });
const label = await bitbybit.occt.fillets.fillet2d({ shape: await wire.createRectangleWire({ width: 40, length: 24, center: [40, -2, 10], direction: [0, 1, 0] }), radius: 3 });
panel = await sheetMetal.cut({ part: panel, face: await sheetMetal.outsideFace({ part: panel, region: "panel" }), profiles: [label], depth: 0.8, name: "label" });
await bitbybit.draw.drawAnyAsync({ entity: panel, options: bitbybit.draw.optionsOcctSheet({}) });
bitbybit.babylon.scene.adjustActiveArcRotateCamera({ position: [150, 148, -180], lookAt: [0, 13, 0] });
Profiles must lie on the face's plane: draw them on the inside face's plane, or on the outside face's when you cut from that side. The first call cuts two holes and a notch in the base at once; the second cuts a slot through the wall, whose inside face sits a thickness in from the part's outside. Give a depth, less than the thickness, and the profiles are pocketed instead of cut through: the third call recesses a label area 0.8 into the underside, picked with bitbybit.occt.fabrication.sheetMetal.outsideFace. A pocket is recorded as a form named name (here label), so check knows its floor belongs there; a cut through records nothing. The roles are walls and floors.
Cutting across a formed region, such as a formed loft's surface, follows the surface: the profile is projected onto it along the profile's plane's normal and the cut runs square to the surface, as a laser cuts a formed part.
Stamped forms
bitbybit.occt.fabrication.sheetMetal.form presses forms into a region's face. A kind picks the form, and each kind takes its own sizes and refuses another kind's, so a mistyped option is caught rather than ignored.




- Rete
- Blockly
- TypeScript
const { sheetMetal } = bitbybit.occt.fabrication;
const { sheetMetalBendDirectionEnum, sheetMetalFormEnum } = Bit.Inputs.OCCT;
const blank = await bitbybit.occt.shapes.face.createRectangleFace({ width: 180, length: 120, center: [0, 0, 0], direction: [0, 1, 0] });
let panel = await sheetMetal.plate({ face: blank, thickness: 1, bendRadius: 1, name: "panel" });
panel = await sheetMetal.form({
part: panel,
face: await sheetMetal.insideFace({ part: panel, region: "panel" }),
kind: sheetMetalFormEnum.louver,
points: [[-40, 0, -40], [-40, 0, -20], [-40, 0, 0]],
along: [1, 0, 0],
length: 60,
width: 8,
height: 4,
name: "louver",
});
panel = await sheetMetal.form({
part: panel,
face: await sheetMetal.insideFace({ part: panel, region: "panel" }),
kind: sheetMetalFormEnum.dimple,
points: [[45, 0, -35], [45, 0, 5]],
diameter: 20,
depth: 4,
draft: 30,
name: "dimple",
});
panel = await sheetMetal.form({
part: panel,
face: await sheetMetal.insideFace({ part: panel, region: "panel" }),
kind: sheetMetalFormEnum.bridge,
points: [[-40, 0, 35]],
along: [1, 0, 0],
length: 40,
width: 10,
height: 4,
name: "bridge",
});
panel = await sheetMetal.form({
part: panel,
face: await sheetMetal.insideFace({ part: panel, region: "panel" }),
kind: sheetMetalFormEnum.extrudedHole,
points: [[30, 0, 40], [60, 0, 40]],
diameter: 6,
height: 3,
direction: sheetMetalBendDirectionEnum.down,
name: "collar",
});
await bitbybit.draw.drawAnyAsync({ entity: panel, options: bitbybit.draw.optionsOcctSheet({}) });
bitbybit.babylon.scene.adjustActiveArcRotateCamera({ position: [192, 173, -231], lookAt: [0, 0, 0] });
Four kinds are placed at points on the face:
louver: a slit with a hood pressed out beside it, for ventilation.lengthrunsalonga direction,widthacross it, andheightis how far it rises; its ramp'sangleis 45 degrees unless given, and its slit iskerfwide.bridge: the same strip pressed out but joined at both ends, a strap to pass a cable tie under, sized as a louver is.dimple: a round recess or boss of adiameter, presseddepthdeep, its wall sloped bydraftdegrees from square. Dimples stiffen a panel, act as feet or locate a part.extrudedHole: a hole of adiameterwhose rim is drawn into a collarheighttall, which gives a thin sheet enough material to tap a thread or take a self-tapping screw.
Two kinds follow curves drawn on the face:
emboss: a closed profile presseddepthdeep with walls sloped bydraft, a raised or sunken panel that stiffens a large flat area or carries a label.bead: a channelwidthwide anddepthdeep pressed along open or closed paths of lines and arcs, the classic stiffening rib.


- Rete
- Blockly
- TypeScript
const { sheetMetal } = bitbybit.occt.fabrication;
const { sheetMetalFormEnum } = Bit.Inputs.OCCT;
const { wire } = bitbybit.occt.shapes;
const blank = await bitbybit.occt.shapes.face.createRectangleFace({ width: 180, length: 120, center: [0, 0, 0], direction: [0, 1, 0] });
let panel = await sheetMetal.plate({ face: blank, thickness: 1, bendRadius: 1, name: "panel" });
const pad = await bitbybit.occt.fillets.fillet2d({ shape: await wire.createRectangleWire({ width: 90, length: 50, center: [0, 0, 0], direction: [0, 1, 0] }), radius: 10 });
panel = await sheetMetal.form({
part: panel,
face: await sheetMetal.insideFace({ part: panel, region: "panel" }),
kind: sheetMetalFormEnum.emboss,
curves: [pad],
depth: 4,
draft: 30,
name: "pad",
});
const ring = await bitbybit.occt.fillets.fillet2d({ shape: await wire.createRectangleWire({ width: 150, length: 95, center: [0, 0, 0], direction: [0, 1, 0] }), radius: 15 });
panel = await sheetMetal.form({
part: panel,
face: await sheetMetal.insideFace({ part: panel, region: "panel" }),
kind: sheetMetalFormEnum.bead,
curves: [ring],
width: 6,
depth: 2,
draft: 30,
bendRadius: 0.5,
name: "bead",
});
await bitbybit.draw.drawAnyAsync({ entity: panel, options: bitbybit.draw.optionsOcctSheet({}) });
bitbybit.babylon.scene.adjustActiveArcRotateCamera({ position: [192, 174, -230], lookAt: [0, 2, 0] });
A form's wall is a section turned along its outline, so outlines must turn smoothly: round the corners of a profile (with bitbybit.occt.fillets.fillet2d, as above) or a sharp turn is refused. A bead's two bends must fit in its depth; a shallow bead needs a draft or a smaller bendRadius, and the refusal says by how much. direction set to down presses the forms out of the other face, as the extruded holes in the first example do. Each form is recorded as name, a dot and its number from 1 (louver.1, louver.2). The role forms holds every new face, and a role of each form's own name, collar.1 and collar.2 after the extruded holes above, holds that form's faces, so one form can be picked out of several with facesOfRole. Drawn in its looks, every form is in the accent, #ff4400, a pocket included, which is why the forms on this page stand out from the sheet round them.
Gussets across a bend
A long or heavily loaded bend flexes. A gusset is a rib pressed across the bend's inside to lock its angle. bitbybit.occt.fabrication.sheetMetal.gusset presses gussets across a cylindrical bend you name, each centred at a position along it.




- Rete
- Blockly
- TypeScript
const { sheetMetal } = bitbybit.occt.fabrication;
const blank = await bitbybit.occt.shapes.face.createRectangleFace({ width: 100, length: 60, center: [0, 0, 0], direction: [0, 1, 0] });
let bracket = await sheetMetal.plate({ face: blank, thickness: 2, bendRadius: 3, name: "base" });
bracket = await sheetMetal.flange({
part: bracket,
insideFace: await sheetMetal.insideFace({ part: bracket, region: "base" }),
edge: await sheetMetal.insideEdgeToward({ part: bracket, region: "base", direction: [1, 0, 0] }),
length: 50,
name: "upright",
});
const [across] = await sheetMetal.bendNames({ part: bracket });
bracket = await sheetMetal.gusset({ part: bracket, across, positions: [15, 45], width: 10, depth: 4 });
bracket = await sheetMetal.roundCorners({ part: bracket, insideFace: await sheetMetal.insideFace({ part: bracket, region: "upright" }), size: 10 });
bracket = await sheetMetal.roundCorners({
part: bracket,
insideFace: await sheetMetal.insideFace({ part: bracket, region: "base" }),
size: 8,
style: Bit.Inputs.OCCT.sheetMetalCornerStyleEnum.bevel,
});
await bitbybit.draw.drawAnyAsync({ entity: bracket, options: bitbybit.draw.optionsOcctSheet({}) });
bitbybit.babylon.scene.adjustActiveArcRotateCamera({ position: [113, 124, -135], lookAt: [0, 23, 0] });
The bend is named, not picked as a face: bitbybit.occt.fabrication.sheetMetal.bendNames lists the part's bends, and the example takes the first. positions are measured along the bend from the start of its span. Each gusset is width wide along the bend, more than twice the thickness, and stands depth in from the bend's inner face at its middle. A conical bend takes no gussets. They are recorded as forms, named as a stamped form is: the feature's name, here the default gusset1, a dot and a number, gusset1.1 and gusset1.2, each also a role holding its faces, beside forms for all of them.
Finished corners
A blank's sharp corners cut hands and catch on things. bitbybit.occt.fabrication.sheetMetal.roundCorners rounds or bevels the corners of a region's outline, the edges through the thickness where two of its sides meet. size is the round's radius, or how far a bevel cuts along each side; style picks round or bevel, and kind picks convex corners, concave ones or all. The example rounds the upright's two free corners to 10 and bevels the base's 8 along each side.
A corner where a side runs into a bend is left alone, since rounding it would cut into the bend. Corners of a relief notch are corners too, and they are small: a region with reliefs takes only a size those corners can hold. The faces each corner became are the role rounds.
