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:
Bending features: Bends, curls, hems
Corner features: Sheet corners
Cut features: Notches, holes (round, rectangular, slotted)
Offset features: Jogs
Relief features: Bend reliefs, corner reliefs
Deformation features: Lances, louvres, embosses
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 Types#
Bending Features#
Feature |
Description |
Detection Pattern |
|---|---|---|
Bend |
Simple bend (angle < 90°) |
Single fan-shaped face pair, path distance = 1 |
Curl |
Curved bend (angle > 90°) |
Single fan-shaped face pair, path distance = 3 |
Hem |
Hemmed edge (180° bend) |
Single fan-shaped face pair, path distance = 5 |
Detection: Bends are identified by pairs of fan-shaped faces in the thickness face chain. A fan-shaped face has two concentric circular edges and represents a curved portion of the sheet.
# Access bends from boundary features
bends = [f for f in extractor.boundary_features
if f.__class__.__name__ == 'Bend']
for bend in bends:
print(f"Bend angle: {bend.angle}")
Corner Features#
Feature |
Description |
Detection Pattern |
|---|---|---|
Corner |
Sheet metal corner |
Convex angles (90°-180°) at boundary |
Corners are identified at convex angle transitions in the boundary chain.
Cut Features#
Feature |
Description |
Detection Pattern |
|---|---|---|
Notch |
Open-ended cut |
Open chain, concave angles at boundary |
Rectangular Hole |
Rectangular cutout |
Closed chain, 4-8 faces, 4 planar, 2 parallel pairs |
Round Hole |
Circular cutout |
Closed chain with cylindrical face |
Slotted Hole |
Elongated cutout |
Closed chain with two cylindrical faces |
Cut features are identified from internal thickness face chains:
# Access internal features (holes, cutouts)
internal = extractor.internal_features
for feature in internal:
feature_type = feature.__class__.__name__
print(f"Internal feature: {feature_type}")
Offset Features#
Feature |
Description |
Detection Pattern |
|---|---|---|
Jog |
Offset bend |
Two fan-shaped face pairs, parallel sections |
Jogs create a step in the sheet metal by combining two bends.
Relief Features#
Feature |
Description |
Detection Pattern |
|---|---|---|
Relief |
Material relief |
Open chain, 3 faces, at bend intersection |
CornerRelief |
Corner cutout |
Small relief at bend corner |
Reliefs are cuts that allow proper bending without material interference.
Deformation Features#
Feature |
Description |
Detection Pattern |
|---|---|---|
Lance |
Lance feature |
Partial cut and bend |
Louvre |
Ventilation louvre |
Multiple parallel lances |
Emboss |
Embossed shape |
Local deformation |
FlangedCutout |
Cut with flange |
Cut with bent edge |
Deformations are recognized by the RegionDeformationExtractor (the default), which
segments each side into panel and candidate regions, so embosses and flanged cutouts
merged with cutout 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()
Feature Categories#
Features are organized into categories using the FeatureCategory enum:
Category |
Features |
|---|---|
|
Bend, Curl, Hem |
|
Corner |
|
Notch, RoundHole, RectangularHole, SlottedHole |
|
Jog |
|
Relief, CornerRelief |
|
Lance, Louvre, Emboss, FlangedCutout |
from volmdlr_tools.features.feature_types import FeatureCategory
# Filter by category
bending_features = [f for f in all_features
if f.category == FeatureCategory.BENDING]
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