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 |
|---|---|---|
|
|
Features on the boundary (perimeter) |
|
|
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
Inside radius, angle, bend line
Folded back, with its leg
Rolled, with no leg after it
An ear plate beyond a bend, with a round tip
Cut-outs
Diameter, axis
Length, width
Width, length, end centres
Side count, across flats
Radii and sweep
Hole shape and size, pitch, layout, ligament, open area
Edges of the sheet
Rectangular, V, U or round, with its width and depth
Rounded or chamfered
Where two flanges meet
A cut that lets a bend form
Formed features
A tab cut on three sides, bent out along the fourth
A strip raised above the sheet, joined at both ends
A tab offset by two opposite bends
A tab bent up and over, its end pointing back down
Pressed features
A rib that stiffens a panel, along a path of straight runs and arcs
A pressed round dent
Any other pressed shape
A rib pressed across a bend to stiffen it
Formed cut-outs
A hood slit open on one side
A hole drawn into a collar
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
Rectangular hole |
Four straight walls at right angles. |
|
Slot |
Two straight walls closed by two half circles. |
|
Polygonal hole |
A regular polygon: equal sides at equal angles. |
|
Ring sector |
A slice of a ring, or of a disc: two arcs about one centre and two straight walls pointing at it. |
|
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. |
|
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. |
|
Corner |
A rounded or chamfered corner of the sheet’s outline. |
|
Corner relief |
The cut at a corner where two flanges meet, so that both can fold without colliding. |
|
Bend relief |
A small cut at the end of a bend that lets the flange fold without tearing the sheet beside it. |
|
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. |
|
Bridge |
A strip cut free along both sides and raised above the sheet, still joined at both ends. |
|
Jogged tab |
A tab cut out of the sheet and offset by two opposite bends. |
|
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. |
|
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. |
|
Dimple |
A round dome with no flat face, closing over its axis. A ring about an axis, such as an annular bead, stays an |
|
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 |
|
Emboss |
Any other raised or sunken shape, such as a pad with a single flat top face. |
|
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. |
|
Extrusion hole |
A round hole with a collar drawn out of the sheet around it, often tapped. |
|
Flanged cut-out |
Any other opening with a flange drawn around it. |
|
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#
Sheet Metal Recognition - Shape recognition with SheetMetalRecognizer
Feature Recognition - General FeatureProcessor usage
See Also#
Sheet Metal Shapes - Sheet metal recognition
Feature Processor - General feature extraction