Sheet Metal Features#

Specialized feature extraction for sheet metal parts, including bends, corners, holes, reliefs, and deformation features.

Note

Prerequisites: Sheet Metal Shapes

Tip

Tutorial Data File: lances-sheet-metal.step

Sheet Metal Features#

This guide covers the feature types and feature extraction for sheet metal parts. It focuses on identifying manufacturing features like bends, corners, holes, and deformations.

Prerequisite: First recognize the sheet metal structure using SheetMetalRecognizer (see Sheet Metal Recognition).


Overview#

After recognizing a sheet metal part, the SheetMetalFeatureExtractor analyzes thickness face chains to identify manufacturing features. Features are categorized into:

  • Folds: bends, hems, curls, and the tabs bent up beyond a bend (a tab is no fold itself)

  • Cut-outs: round, rectangular, slotted, polygonal and ring-sector holes, and perforated fields of them

  • Edges of the sheet: notches, corners, bend and corner reliefs

  • Formed features: lances, bridges, jogged tabs, hooks

  • Pressed features: beads, dimples, embosses, gussets

  • Formed cut-outs: louvres, extrusion holes, flanged cut-outs

The Feature Catalogue below shows each one on a part.


Quick Start#

from volmdlr.model import VolumeModel
from volmdlr_tools.shapes.recognizers import SheetMetalRecognizer
from volmdlr_tools.features.extractors import SheetMetalFeatureExtractor

# Load and recognize sheet metal
volume_model = VolumeModel.from_step("data/step/lances-sheet-metal.step")
shape = volume_model.primitives[0]

recognizer = SheetMetalRecognizer(shape=shape)
if recognizer.perform():
    sheet_metal = recognizer.result

    # Extract features
    extractor = SheetMetalFeatureExtractor(sheet_metal=sheet_metal)
    extractor.perform()

    # Access features
    print(f"Boundary features: {len(extractor.boundary_features)}")
    print(f"Internal features: {len(extractor.internal_features)}")

SheetMetalFeatureExtractor#

The main class for extracting features from a recognized sheet metal part.

Constructor#

SheetMetalFeatureExtractor(
    sheet_metal: SheetMetalShape,
    name: str = ""
)

Methods#

  • perform() -> bool: Execute feature extraction

Properties#

Property

Type

Description

boundary_features

list[Feature]

Features on the boundary (perimeter)

internal_features

list[Feature]

Features inside the sheet (holes, etc.)


Feature Catalogue#

Each picture below is a small part built for this page, run through the feature recognition. The coloured faces are the faces the recognition returned for that feature. All of the parts are 1.5 thick with an inside bend radius of 1.5. The script that builds them is doc/_scripts/sheet_metal_illustration_parts.py:

python doc/_scripts/sheet_metal_illustration_parts.py output_folder

Every feature exposes its faces as nodes (face indices in the part’s adjacency graph) and a name that tells variants of one class apart. Lengths are in the part’s units and angles in radians.

Folds

A flange bent up at the edge of a plate, its bend highlighted
Bend

Inside radius, angle, bend line

The edge of a sheet folded back over itself, the fold highlighted
Hem

Folded back, with its leg

The edge of a sheet rolled into a tube, highlighted
Curl

Rolled, with no leg after it

A flat ear plate bent up from the edge of a plate, ending in a round tip with a hole through it, highlighted
Tab

An ear plate beyond a bend, with a round tip

Cut-outs

A round hole through a plate, its wall highlighted
Round hole

Diameter, axis

A rectangular hole through a plate, its walls highlighted
Rectangular hole

Length, width

An elongated hole with rounded ends, its walls highlighted
Slot

Width, length, end centres

A hexagonal hole through a plate, its walls highlighted
Polygonal hole

Side count, across flats

A hole shaped like a slice of a ring, its walls highlighted
Ring sector

Radii and sweep

A plate with three fields of holes, staggered round holes, hexagonal holes and square holes, their walls highlighted
Perforated field

Hole shape and size, pitch, layout, ligament, open area

Edges of the sheet

A plate with five cuts into its outer edge, rectangular, V, round, U and slot-shaped, highlighted
Notch

Rectangular, V, U or round, with its width and depth

The rounded corner of a plate, highlighted
Corner

Rounded or chamfered

The corner of a tray where two bent-up flanges meet, with the cut between them highlighted
Corner relief

Where two flanges meet

A small cut beside the end of a bend, highlighted
Bend relief

A cut that lets a bend form

Formed features

A tab cut on three sides and bent out of a plate, highlighted
Lance

A tab cut on three sides, bent out along the fourth

A strip cut free along both sides and raised above a plate, highlighted
Bridge

A strip raised above the sheet, joined at both ends

A tab cut out of a plate and offset by two opposite bends, highlighted
Jogged tab

A tab offset by two opposite bends

A tab cut on three sides, bent up out of a plate and then over, its end pointing back down at the plate, highlighted
Hook

A tab bent up and over, its end pointing back down

Pressed features

A long rounded rib pressed into a plate, highlighted
Bead

A rib that stiffens a panel, along a path of straight runs and arcs

A round dome pressed into a plate, highlighted
Dimple

A pressed round dent

A raised rectangular pad with a flat top pressed into a plate, highlighted
Emboss

Any other pressed shape

A round rib pressed across the bend of an L, from the base into the leg, highlighted
Gusset

A rib pressed across a bend to stiffen it

Formed cut-outs

Two vent slits with the sheet beside them pressed out into hoods, highlighted
Louvre

A hood slit open on one side

Two round holes with a drawn collar around each, highlighted
Extrusion hole

A hole drawn into a collar

A rectangular opening with a flange drawn around it, highlighted
Flanged cut-out

A cut whose rim is pressed

Folds#

A fold is where the sheet turns about a straight line. The two ends of every fold show in the sheet’s edge as fan-shaped faces, bounded by two concentric arcs. A fold is named from its own geometry: how far it turns, and the flanges either side of it: whether the sheet carries on past it at all, and whether a flange beyond it folds again.

Bend, Hem and Curl share the Fold base. It reads inside_radius, thickness, bend_angle, bend_line and bend_zone_extent off the fold’s cylinders. A hem is a fold but not a bend, so a check written for bends never reaches it. The processor lists the three apart, as bends, hems and curls. A Tab is listed here beside them but is no Fold: it is the flat flange beyond a bend, with no bend_angle or inside_radius of its own, and the bend it stands on is the Bend listed in bends.

The sheet itself also reports every place it turns round a cylinder, folds or not, with the plates each one joins. How those bends differ from these features is told in Sheet Metal Recognition.

Feature

What it is

What the SDK reports

Bend

The sheet turned through less than half a turn, with flat sheet on either side; or a U-turn in a run of flanges, a half turn or more whose flanges both fold again.

Bend, with inside_radius and bend_angle (in the picture, 1.5 and π/2).

Hem

The edge folded back over the sheet, its leg lying along it: a half turn or more with a flange beyond it that runs out to the edge without folding again.

Hem. hem_type names its section: "flat" (no gap under the leg), "open" (a gap) or "teardrop" (folded past half a turn).

Curl

The edge rolled round with no flat leg after it: a fold the sheet ends on that turns past a right angle; a shallower one is a Bend.

Curl. bend_angle is how far the edge is rolled (in the picture, three quarters of a turn).

Tab

An ear plate: a flat flange beyond a single plain bend, running out to the sheet’s edge without folding again. Its outline is two parallel sides running out from the bend and a round tip joining them. It carries at most one hole, such as the hole for a pin or a screw.

Tab, in the processor’s tabs, plus the Bend it stands on. width is the distance between its sides (in the picture, 20); tip_nodes are the faces of its tip, hole_nodes the walls of its hole (empty when it has none, see has_hole) and bend_nodes the faces of its bend. The tab holds its tip, so the rounds of the tip are not reported again as corners. Its hole stays the cut-out it reads as (a RoundCavity for a round hole), so the hole rules still check it; hole_nodes only names it, as bend_nodes names the bend.

Only a flat ear plate beyond one plain bend, ending in a round tip, is a Tab. A tab that steps by two opposite bends is a Jog, and a tab carrying a rib across its fold stays a FlangedCutout, as the end tabs of the tutorial part do. A rectangular flange whose corners are broken by small rounds is no tab: the rounds of the tip add up to at least 0.4 of the tab’s width.

Cut-outs#

A cut-out is a hole through the sheet. Its walls run through the thickness and close on themselves. A cut-out is named by its outline.

Feature

What it is

What the SDK reports

Round hole

A circular hole.

RoundCavity, named "CircularHole".

Rectangular hole

Four straight walls at right angles.

RectangularCavity, with length and width.

Slot

Two straight walls closed by two half circles.

SlottedCavity, with width, slot_length and the centres of its end_circles.

Polygonal hole

A regular polygon: equal sides at equal angles.

PolygonalCavity, with side_count, circumradius and across_flats.

Ring sector

A slice of a ring, or of a disc: two arcs about one centre and two straight walls pointing at it.

SectorCavity. sector() gives inner_radius (0 for a slice of a disc), outer_radius and sweep_angle.

A cut-out that matches none of these outlines is still reported, as a plain Cavity.

A field of holes on a regular lattice is reported as one feature:

Feature

What it is

What the SDK reports

Perforated field

Holes of one shape and size punched through one flat plate, each centred on a node of one lattice: a square or rectangular grid, rows staggered at 60 degrees, or any other.

Perforation, in the processor’s perforations. It owns its holes: they are not in cavities, and holes lists them, each the cavity it was read as. hole_shape (a PerforationHoleShape read off the holes’ cavity type: ROUND, SQUARE, POLYGONAL…), hole_size (the hole’s width along pitch: a diameter, a hexagon’s width across the flats facing its neighbours), hole_count, pitch and second_pitch (centre to centre along the lattice’s two directions, the shorter first), lattice_angle (60 to 90 degrees, in radians), layout (a PerforationLayout: square, rectangular, staggered or oblique), minimum_ligament (the narrowest web between two neighbouring holes, wall to wall), open_area_ratio (one hole’s area over one lattice cell’s) and plate_nodes (the skin faces of the plate, both sides). A measurement the geometry does not determine is None.

A field needs at least 9 holes spanning at least 3 lattice nodes along each of its two directions; fewer, or a single row or two, stay cavities. It need not fill a parallelogram: an L-shaped field, or staggered rows bounded by a rectangle, is one perforation, and so is a field with a hole left out. A hole off the lattice, of another size, cut across a bend or into the sheet’s edge is no part of it and stays a cavity. Fields on different lattices, or of different holes, are separate perforations, as are two fields on one lattice with an empty node or more between them.

The rule layer still judges each hole: validate_part puts a perforation’s holes to the rules beside it, as it does the bends a lance owns, so the web from each hole to its nearest neighbour and to the border is checked as before. The perforated-metal design guideline (a web of at least 1.2 sheet thicknesses between holes) is not checked yet: compare minimum_ligament with processor.sheet_thickness.

Edges of the sheet#

These features sit on the outer contour of the sheet. A cut into the edge is named by the bends it sits at, never by how many walls it has. A cut that reaches the end of one bend is a Relief; a cut where two bends meet, at the corner between two flanges, is a CornerRelief, whether it is square, round or of any other shape; any other cut into the edge is a Notch. An open slot is a U or rectangular notch deeper than it is wide. A bite with a single curved wall is a notch, while a corner rounded off the outline is a Corner: the bite curves into the material and the round curves out of it. The inside corner where the edge steps in, or where a tab stands out of the sheet, is no cut at all.

Feature

What it is

What the SDK reports

Notch

A cut into the outer edge of the sheet, at the end of no bend (the gap between two knuckles of a hinge is one): its walls turn into the material and the edge carries on along one line on both sides of it.

Notch, in the processor’s notches. Its outline is "rectangular", "v", "u", "round" or "other"; width is the mouth along the edge, depth how far it reaches in, and radius the arc of a round or U notch.

Corner

A rounded or chamfered corner of the sheet’s outline.

Corner. Its name tells a rounded corner ("RoundCorner") from a chamfered one ("Chamfer").

Corner relief

The cut at a corner where two flanges meet, so that both can fold without colliding.

CornerRelief, whatever its shape. Its shape names that shape from the walls of its cut: "square", "round" or "obround", or None for any other cut.

Bend relief

A small cut at the end of a bend that lets the flange fold without tearing the sheet beside it.

Relief. Its shape is "square" (flat walls alone), "round" (a round hole: one cylinder, or several on one axis, and no flat wall) or "obround" (a slot, a half circle between two flat walls), or None for any other cut, such as a square cut with rounded inner corners.

Formed features#

A formed feature is cut and formed in one stroke: the tool shears the sheet along a line and pushes the sheet beside the cut out of plane. Its name tells whether the formed part fills the opening ("ShearWith…") or leaves a gap beside it ("CutoutWith…"). The folds of a formed feature are reported as well, as Bends with their own inside_radius and bend_angle.

Feature

What it is

What the SDK reports

Lance

A tab cut on three sides and bent out of the sheet along the fourth.

Lance, named "ShearWithLance" or "CutoutWithLance", plus the Bend the tab hinges on. The processor lists lances in lances.

Bridge

A strip cut free along both sides and raised above the sheet, still joined at both ends.

Lance, named "ShearWithBridge" or "CutoutWithBridge", plus the four Bends that lift the strip.

Jogged tab

A tab cut out of the sheet and offset by two opposite bends.

Jog, named "ShearWithJog" or "CutoutWithJog", plus its two Bends. The processor lists jogs in jogs. A jogged tab carries no measurement: its offset, flat_length and bend_nodes are None.

Hook

A tab cut on three sides, bent up out of the sheet about its hinge and then over a crest by more than it rose, so its end flange points back towards the sheet.

Hook, named "ShearWithHook" or "CutoutWithHook", in the processor’s hooks (not in lances or jogs). Hook subclasses Lance, so isinstance(hook, Lance) is true even though lances does not list it; test type(feature) is Lance to leave hooks out. Like a lance it owns its cut walls, its two bends (bends, the hinge then the crest; no Bend is reported over them) and the skin of its tab (skin_nodes). width is the tab’s width along its bends (in the picture, 10), flange_length the flat of its end flange beyond the crest (4), opening_angle the angle it rises off the sheet at, its hinge’s bend angle (30 degrees, in radians), and height how far the lowest point of its end flange stands above the sheet’s skin on the side it rises to, the inside of its hinge. height is signed: it is negative when the end flange of a tab narrower than its window reaches back down below that skin. A measurement the geometry does not determine is None.

A tab whose crest turns back by exactly as much as it rose runs on parallel to the sheet: it is a jogged tab, a Jog, and its bends stay Bends. One whose crest turns back by less still rises past it and is a jogged tab too. Only a crest that turns back further than the hinge rose makes a Hook. The design guideline’s minimums for a hook (width at least 2 thicknesses, end flange at least 2.5) are not checked: the hook reports its measurements, and processor.sheet_thickness is there to compare them with.

A sheet stepped across its whole width by two bends that turn the same angle in opposite senses, with no cut, is a jog when the step is no more than five sheet thicknesses. It is reported as a Jog named "Jog", plus its two Bends. The Jog holds the flat between the bends and records the step (offset), the length of that flat across the bends (flat_length) and the faces of its bends (bend_nodes). A larger step makes a Z, reported as its two Bends only. Two bends that turn the same way, as those of a channel, never make a jog, and neither do two bends with no flat between them.

Pressed features#

A pressed feature is a local shape pushed into the sheet without cutting it. Both skins of the sheet follow the shape.

Feature

What it is

What the SDK reports

Bead

A rib that stiffens a panel: one section, for example round, V or flat-bottomed U, swept along a path of straight runs and arcs in the sheet, each end capped or running out into the sheet.

Bead, a kind of Emboss, in the processor’s beads. Its section, across the path it runs along, is "round" (arcs alone), "u" (a flat crest between two walls) or "v" (two straight walls with no flat crest), or None for free-form faces.

Dimple

A round dome with no flat face, closing over its axis. A ring about an axis, such as an annular bead, stays an Emboss.

Dimple, a kind of Emboss, in the processor’s dimples. It reads its outline and crown as an emboss does, a sphere turning about the line square to the sheet through its centre; having no flat face, its crown is "rounded".

Gusset

A rib pressed across a bend, from one flange into the other, to stiffen it. It cuts the bend’s cylinders into pieces that touch nowhere; the pieces are still one fold, reported as one Bend (see Coaxial bends and fold lines in Sheet Metal Shapes). Not the solid gusset of a moulded or machined part, a thin plate standing in a corner, which is a rib (see Ribs).

Gusset, in the processor’s gussets, holding its formed skin on both sides of the sheet. It is found by either deformation extractor, and no Emboss or FlangedCutout is read from its faces. Unfolding a part with a gusset is refused, naming the gusset’s faces: the bend under it is not laid flat with it. A rib across a bend that is not read as a gusset, such as one with a region of its skin of more than SheetMetalShape.MAXIMUM_GUSSET_REGION_FACES faces, is left to the deformation pass: the default, region-based extractor reads it as an Emboss straddling the bend, and the wire-seeded DeformationExtractor reads nothing there. Either way the bend under it stays a Bend.

Emboss

Any other raised or sunken shape, such as a pad with a single flat top face.

Emboss. The processor’s embosses lists every emboss, beads and dimples included. Its outline, seen square to the sheet, is "round", "obround", "rounded_rectangle", "l_shape", "cross" or "spline", or None for any other outline; a face written as a B-spline is read as the plane, cylinder, cone, sphere or torus it lies on, so an analytic outline exported as B-splines reads as its analytic self, and "spline" needs a face that stays free-form and a direction square to the sheet to see it along; its crown is "flat" when a flat face tops it, "rounded" otherwise, or None when its faces give no direction square to the sheet.

Formed cut-outs#

A formed cut-out opens a hole and shapes the sheet around it. It holds two kinds of faces: formed_nodes, the skin the press shaped, and cut_nodes, the walls of the cut through the sheet’s thickness.

Feature

What it is

What the SDK reports

Louvre

A slit with the sheet on one side pressed out into a hood, used for ventilation.

Louvre, a kind of FlangedCutout, in the processor’s louvre. A louvre recognised from its slit walls alone has only cut_nodes; one whose hood was found as well is reported once, holding both. A louvre reads no shape: its hood is pressed out beside a slit, not drawn round an opening.

Extrusion hole

A round hole with a collar drawn out of the sheet around it, often tapped.

ExtrusionHole, a kind of FlangedCutout, in the processor’s extrusion_holes. Its shape is "circle".

Flanged cut-out

Any other opening with a flange drawn around it.

FlangedCutout. Its shape, the outline of the opening seen square to the sheet, is "circle", "obround", "rounded_rectangle" or "spline", or None for any other opening. It is read from the formed collar alone: the walls of the cut, among them the flat rim a straight collar ends in, are left out.

Finding features in code#

The processor runs every extraction and sorts the results by kind:

from volmdlr.model import VolumeModel
from volmdlr_tools.features.core import FeatureProcessor

volume_model = VolumeModel.from_step("data/step/lances-sheet-metal.step")
processor = FeatureProcessor(volume_model.primitives[0])
processor.extract_all()

for bend in processor.bends:
    print(f"Bend: inside radius {bend.inside_radius:.4g}, angle {bend.bend_angle:.2f} rad")
for feature in processor.all_features:
    print(f"{type(feature).__name__} {feature.name!r}: faces {feature.nodes}")

Deformations are recognised by the RegionDeformationExtractor (the default), which segments each side into panel and candidate regions, so embosses and flanged cut-outs merged with cut-out rims or the sheet boundary are found too:

from volmdlr_tools.features.extractors import RegionDeformationExtractor

deform_extractor = RegionDeformationExtractor(sheet_metal=sheet_metal)
deform_extractor.perform()

deformations = deform_extractor.result

The wire-seeded DeformationExtractor remains available with the same interface; it only finds deformations hanging on a face’s inner wire. Through the processor, pick the extractor with FeatureProcessor.extract_deformations(extractor_class=...).


Complete Example#

from volmdlr.model import VolumeModel
from volmdlr_tools.shapes.recognizers import SheetMetalRecognizer
from volmdlr_tools.features.extractors import SheetMetalFeatureExtractor
from volmdlr_tools.features.extractors import DeformationExtractor

# Load the sheet metal part
volume_model = VolumeModel.from_step("data/step/lances-sheet-metal.step")
shape = volume_model.primitives[0]

# Step 1: Recognize sheet metal structure
recognizer = SheetMetalRecognizer(shape=shape)

if not recognizer.perform():
    print("Not a valid sheet metal part")
    exit()

sheet_metal = recognizer.result
print(f"Sheet thickness: {sheet_metal.thickness:.3f}")

# Step 2: Extract sheet metal features
feature_extractor = SheetMetalFeatureExtractor(sheet_metal=sheet_metal)
feature_extractor.perform()

# Step 3: Print feature summary
print("\n=== Boundary Features ===")
for feature in feature_extractor.boundary_features:
    print(f"  - {feature.__class__.__name__}")

print("\n=== Internal Features ===")
for feature in feature_extractor.internal_features:
    print(f"  - {feature.__class__.__name__}")

# Step 4: Extract deformation features
deform_extractor = DeformationExtractor(sheet_metal=sheet_metal)
deform_extractor.perform()

print("\n=== Deformation Features ===")
for feature in deform_extractor.features:
    print(f"  - {feature.__class__.__name__}")

# Step 5: Visualize
boundary_shell = sheet_metal.get_boundary_thickness_shell()
boundary_shell.color = (1.0, 0.5, 0.0)  # Orange

internal_shells = sheet_metal.get_internal_thickness_shells()
for shell in internal_shells:
    shell.color = (0.0, 0.8, 0.2)  # Green

VolumeModel([shape, boundary_shell, *internal_shells]).babylonjs()

See Also#

See Also#