volmdlr_tools.features.feature_types.sheet_metal package#

Sheet metal feature types for representing various sheet metal manufacturing features.

Submodules#

volmdlr_tools.features.feature_types.sheet_metal.bends module#

Sheet metal bend feature module.

class volmdlr_tools.features.feature_types.sheet_metal.bends.Bend(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Fold

Bend feature type: a fold with flat sheet carrying on from both sides of it.

The sheet turns through an angle and goes on as a flange either side. A half turn or more whose flanges both fold again further on — a U-turn in a run of flanges — is a bend too; folded back at the edge of the sheet it is a Hem, and rolled at the edge with no flange after it a Curl.

feature_type: FeatureType = 'bend'#
class volmdlr_tools.features.feature_types.sheet_metal.bends.BendHolder#

Bases: object

What a feature formed with bends of its own holds of them: a jog its two bends, a lance its hinge or legs.

Such a feature owns the faces of its bends, so no Bend is reported over them: one face, one feature. The bends are still there to measure and to unfold, as the folds in bends, whose faces bend_nodes lists. Mixed into a Feature subclass, whose constructor sets bends with _hold() and takes them as its bends keyword.

It must come before Feature among the subclass’s bases (class Jog(BendHolder, Feature)): its _init_arguments(), _copied(), _write_value() and _read_value() add the bends and hand the rest on to Feature through super(), which they cannot do from behind it.

property bend_nodes: list[int] | None#

Get the faces of the feature’s bends, or None when none was found for it.

bends: list[Fold] | None#

The feature’s own bends, or None when none was found for it.

class volmdlr_tools.features.feature_types.sheet_metal.bends.Curl(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Fold

Curl feature type: the edge of the sheet rolled round, with no flat leg after the roll.

The sheet ends on the fold itself. How far the edge is rolled is its bend_angle; a curl may stop short of meeting the sheet or roll on until it nearly does.

feature_type: FeatureType = 'curl'#
class volmdlr_tools.features.feature_types.sheet_metal.bends.Fold(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

A fold of the sheet about one axis: what a bend, a hem and a curl have in common.

Its recognized face set is the fold zone: the two coaxial cylindrical faces the sheet is wrapped around — inside and outside — plus the thickness faces of the sheet’s outer edge that close the zone where it stops along its axis, and, on a curl, the free edge running its whole length. The walls of a cut through or beside the fold — a hole or a window across it, a lance, a bridge, a jogged tab — belong to that cut, not to the fold, even where they are fan-shaped. The flat sheet either side is a neighbour the fold does not own, which is why flange length is a measurement (volmdlr_tools.features.measurements.bends) and not one of the parameters below (ADR 0001); only a hem also holds the flange it folds back, its leg. A fold a jog or a lance is formed with belongs to that feature (see BendHolder) and is not reported on its own.

Parameters are read off those cylinders and answer None on a face set that carries no coaxial cylinder pair, rather than raising: a sub-chain classified as a bend but grouping only thickness faces is a bend the recognizer described without its radius, and a rule must be able to report that it could not be checked.

What the fold is — a plain bend, a hem folded back onto the sheet, a curl rolled at its edge — is told by its subclass, never by a parameter, so a check written for bends does not reach hems and curls by inheritance.

All values are in the model’s own units — metres, like every model in this repo — and angles in radians.

property bend_angle: float | None#

Get the angle the sheet turns through, in radians.

The angle swept by the fold zone’s inside surface: pi/2 for a square corner (90 degrees), whatever the flange lengths either side. This is the included turn of the material, not the angle between the flanges, which is its supplement. A surface split into several faces is measured whole: their arcs are added, overlaps counted once.

Returns:

The swept angle in radians (e.g. 1.5708 for a 90-degree bend), or None when the face set carries no coaxial cylinder pair.

property bend_axis: Vector3D | None#

Get the unit direction the fold’s axis runs in.

Returns:

The direction of bend_line, or None when there is no bend line or it has no length, so no direction can be read off it.

property bend_line: LineSegment3D | None#

Get the fold’s axis, trimmed to the stretch of it the fold actually spans.

The geometric anchor of everything measured relative to a fold: its direction is the direction the fold runs in, and its length is how far the fold runs across the sheet. Taken from the inside cylinder, so the segment lies on the axis of the surface the sheet is wrapped around, and spanning every face of it.

Returns:

The axis segment, or None when the face set carries no coaxial cylinder pair.

property bend_zone_extent: float | None#

Get the width of sheet the fold consumes, measured across it on the inside surface.

The arc length of the inside surface between the two tangent lines, inside_radius * bend_angle — 6.28 mm for a 90-degree bend of 4 mm inside radius. This is the strip a flange loses to the fold, and the band a hole-to-bend distance is measured from the edge of.

Returns:

The arc length across the fold (e.g. 0.00628), or None when the face set carries no coaxial cylinder pair.

category: FeatureCategory = 'forming'#
feature_type: FeatureType = 'unknown'#
property inside_radius: float | None#

Get the radius of the fold’s inside surface — the tighter of its two cylinders.

The quantity bend-radius rules table against material grade and sheet thickness. Read off the inside cylinder rather than derived from the outside one and the thickness, so it stays exact on a part whose thickness the recognizer measures approximately.

Returns:

The inside radius (e.g. 0.004 for a 4 mm bend radius), or None when the face set carries no coaxial cylinder pair.

property thickness: float | None#

Get the thickness of the sheet across the fold.

How far the fold’s outside surface stands off its inside one, read off the fold itself, so it is known even where the sheet’s thickness as a whole is not.

Returns:

The thickness (e.g. 0.001 for a 1 mm sheet), or None when the face set carries no coaxial cylinder pair.

class volmdlr_tools.features.feature_types.sheet_metal.bends.Hem(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', hem_type: Literal['flat', 'open', 'teardrop'] = 'open', leg_nodes: list[int] | None = None)#

Bases: Fold

Hem feature type: the edge of the sheet folded back over the sheet, its leg lying along it.

The fold turns about half a turn and flat sheet carries on beyond it, so the leg reaches back across the sheet from the edge. hem_type names its section:

  • "flat": folded flat against the sheet, with no gap under the leg;

  • "open": folded back with a gap between the leg and the sheet;

  • "teardrop": folded past half a turn, so the leg angles back down towards the sheet.

The leg is part of the hem: folding the edge back is what makes it, so its faces — both sides of the sheet, and the walls round its free edge — are in leg_nodes, and the fold itself in fold_nodes.

An edge rolled round with no flat leg is a Curl.

feature_type: FeatureType = 'hem'#
property fold_nodes: list[int]#

Get the nodes of the fold itself: every node that is not part of the leg.

classmethod from_faces_and_nodes(faces: list, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', hem_type: Literal['flat', 'open', 'teardrop'] = 'open', leg_nodes: list[int] | None = None) → Hem#

Create a hem from its faces and their nodes, saying which of them are its leg.

An unknown keyword is refused rather than dropped, so a misspelt hem_type cannot silently give an "open" hem.

hem_type: Literal['flat', 'open', 'teardrop']#
leg_nodes: list[int]#
volmdlr_tools.features.feature_types.sheet_metal.bends.is_same_cylinder(face: TopoDS_Shape, other: TopoDS_Shape) → bool#

Whether two faces lie on one cylinder: the same axis line and the same radius.

A bend surface an exporter split in two — at a seam, at a quadrant — is two faces of one cylinder. Recognition then finds each half as a bend of its own, and this is how they are told apart from two neighbouring bends.

Parameters:
  • face – A face, typed as a face or handed back as a bare shape (as the adjacency graph does).

  • other – Another face, likewise.

Returns:

True when both are cylindrical and share axis and radius.

volmdlr_tools.features.feature_types.sheet_metal.bends.skin_axis(face: TopoDS_Shape, other: TopoDS_Shape, thickness: float | None) → Vector3D | None#

Return the unit axis direction two faces share when they are the inside and outside skins of one fold.

The inside and the outside of a fold are cylinders about one axis line whose radii differ by the thickness of the sheet. Two folds nested about one axis, as the layers of a curl, have skins of other radii: a skin of one and a skin of the other are no fold. When the thickness is unknown, any two coaxial cylinders of different radii are taken for a fold’s skins.

Parameters:
  • face – A face, typed as a face or handed back as a bare shape (as the adjacency graph does).

  • other – Another face, likewise.

  • thickness – The thickness of the sheet, or None when it is unknown.

Returns:

The unit direction of their common axis when both are cylindrical, coaxial and their radii differ by the thickness (by any amount when it is unknown); None otherwise.

volmdlr_tools.features.feature_types.sheet_metal.corners module#

Sheet metal corner feature module.

class volmdlr_tools.features.feature_types.sheet_metal.corners.Corner(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Corner feature type.

A corner is a sheet metal feature consisting of a single face where both adjacent solid angles are convex and fall within the range (90°, 180°). According to Yang Yang et al., corners are identified using the convexity method.

category: FeatureCategory = 'cut'#
feature_type: FeatureType = 'corner'#

volmdlr_tools.features.feature_types.sheet_metal.hooks module#

Sheet metal hook feature module.

class volmdlr_tools.features.feature_types.sheet_metal.hooks.Hook(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', *, bends: list[Fold] | None = None, skin_nodes: list[int] | None = None, width: float | None = None, flange_length: float | None = None, opening_angle: float | None = None, height: float | None = None)#

Bases: Lance

Hook feature type: a tab lanced out of the sheet and bent over at its crest, its end pointing back down.

A tab is sheared on three sides and bent out of the sheet about the fourth, its hinge; it rises at an angle, then turns back over a second bend, its crest, by more than it rose, so that its end flange points back towards the sheet and its free end stands above it. A tab turned back by exactly as much as it rose runs on parallel to the sheet and is a jogged tab, a Jog, not a hook.

Like a Lance, the hook owns every face of it: the walls of its cut, its two bends (bends, the hinge first, then the crest) and the skin of the tab on both sides of the sheet (skin_nodes). No Bend is reported over its bends. Its name tells whether the tab fills its opening, "ShearWithHook", or leaves a gap beside it, "CutoutWithHook".

A hook is a Lance subclass, so isinstance(hook, Lance) is true and code written for lances reads its cut walls, bends and skin. The processor files features by their exact type, though: FeatureProcessor.lances lists no hook, and FeatureProcessor.hooks lists them all. Test type(feature) is Lance to keep hooks out.

Its measurements, in the model’s own units and in radians, each None when the geometry does not determine it:

  • width: the width of the tab, along its bends;

  • flange_length: the length of the flat of its end flange, beyond the crest;

  • opening_angle: the angle the tab rises off the sheet at, its hinge’s bend angle;

  • height: how far the free end stands above the sheet: from the sheet’s skin on the side the tab rises to (the inside of its hinge), up to the lowest point of the end flange. It is signed: negative when that point sits below that skin, as when the end flange of a tab narrower than its window reaches back down into it.

feature_type: FeatureType = 'hook'#

volmdlr_tools.features.feature_types.sheet_metal.jogs module#

Sheet metal jog feature module.

class volmdlr_tools.features.feature_types.sheet_metal.jogs.Jog(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', offset: float | None = None, flat_length: float | None = None, bends: list[Fold] | None = None)#

Bases: BendHolder, Feature

Jog feature type: the sheet stepped aside by two opposite bends of equal angle.

The sheet bends one way and then back by the same angle, so it carries on parallel to where it was, shifted by a few thicknesses. Its faces are those of the flat between the two bends — both of its skins and its ends — and those of the two bends themselves: the jog owns its bends (bends, whose faces bend_nodes lists), and no Bend is reported over them, so each face of the part is held by a single feature.

A jog cut free on its sides inside the sheet, a jogged tab, is found from the walls of its cut and carries no measurement: its offset, flat_length, bends and bend_nodes are None.

All values are in the model’s own units.

category: FeatureCategory = 'forming'#
feature_type: FeatureType = 'jog'#

volmdlr_tools.features.feature_types.sheet_metal.notches module#

Sheet metal notch feature module.

class volmdlr_tools.features.feature_types.sheet_metal.notches.Notch(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', mouth: tuple[Point3D, Point3D] | None = None)#

Bases: Feature

A cut into the outer edge of a sheet, at the end of no bend.

Its walls turn into the material, and the edge of the sheet carries on along one line on both sides of it. A cut at the end of a bend is a relief instead, whatever its shape; a cut between two pieces of one fold, as between the knuckles of a hinge, ends neither piece and is a notch.

A notch is described by the outline it cuts, seen across the sheet:

  • "rectangular": two parallel sides and a bottom square to them, its inside corners sharp or rounded;

  • "v": two sides closing towards each other, meeting at a point or on a small round;

  • "u": two parallel sides joined by a half circle as wide as the notch;

  • "round": a single arc, a bite out of the edge;

  • "other": anything else.

An open slot is no outline of its own: it is a "u" or a "rectangular" notch deeper than it is wide.

A notch whose walls are free-form surfaces, as on a sheet shaped by forming, is still found, but it has no outline to read: it is "other" and its width, depth and radius are None.

category: FeatureCategory = 'cut'#
property depth: float | None#

Get how far the notch reaches into the sheet, from the line of the edge.

Returns:

The depth, or None when the walls cannot be read.

feature_type: FeatureType = 'notch'#
property outline: Literal['rectangular', 'v', 'u', 'round', 'other']#

Get the shape of the outline the notch cuts into the edge.

Returns:

"rectangular", "v", "u", "round", or "other" when the walls draw none of these or cannot be read.

property radius: float | None#

Get the radius of the notch’s arc.

Returns:

The radius of a "round" or a "u" notch, None for any other outline.

property width: float | None#

Get the width of the notch’s mouth, along the edge it is cut into.

Returns:

The distance between the two ends of the cut, or None when the walls cannot be read.

volmdlr_tools.features.feature_types.sheet_metal.notches.NotchOutline#

The shape of a notch’s outline, seen across the sheet.

alias of Literal[‘rectangular’, ‘v’, ‘u’, ‘round’, ‘other’]

volmdlr_tools.features.feature_types.sheet_metal.notches.Point2D#

A point in the plane across the sheet.

alias of tuple[float, float]

volmdlr_tools.features.feature_types.sheet_metal.perforations module#

Sheet metal perforation feature module: a field of holes punched through a flat plate on a regular lattice.

class volmdlr_tools.features.feature_types.sheet_metal.perforations.Perforation(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', *, holes: list[Cavity] | None = None, plate_nodes: list[int] | None = None, hole_size: float | None = None, pitch: float | None = None, second_pitch: float | None = None, lattice_angle: float | None = None, layout: PerforationLayout | str | None = None, minimum_ligament: float | None = None, open_area_ratio: float | None = None)#

Bases: Feature

Perforation feature type: a field of congruent holes punched through one flat plate of the sheet on a lattice.

Every hole has the same shape and size and is centred on a node of one lattice: a square or rectangular grid, rows staggered at 60 degrees, or any other. The field need not fill a parallelogram: an L-shaped field, or one bounded by a rectangle across staggered rows, is one perforation. Its holes are joined to one another one lattice step at a time; a hole on the same lattice beyond a gap of one empty node or more starts a field of its own.

The perforation owns its holes. They are no cavities of the processor’s cavities; each is still a Cavity in holes, with its own parameters, and the perforation’s nodes are their walls. plate_nodes are the skin faces of the plate the holes go through, on both sides of the sheet; the perforation does not own them.

Its measurements, in the model’s own units and in radians, each None when the geometry does not determine it:

  • hole_shape: the PerforationHoleShape of the holes, read off their cavity type, so it always says what holes hold;

  • hole_size: the width of a hole along the lattice’s first direction, the one pitch is measured along: a round hole’s diameter, a hexagon’s width across the flats facing its neighbours;

  • hole_count: how many holes the field holds;

  • pitch and second_pitch: the distance between the centres of two neighbouring holes along the lattice’s two directions, the shorter first;

  • lattice_angle: the angle between those two directions, from 60 to 90 degrees;

  • layout: the PerforationLayout that angle and those pitches make;

  • minimum_ligament: the narrowest web of material between two neighbouring holes, measured between their walls;

  • open_area_ratio: the share of the field that is open: the area of one hole over that of one lattice cell, the field’s outline being one cell around each hole.

feature_type: FeatureType = 'perforation'#
property hole_count: int#

Get how many holes the field holds.

property hole_shape: PerforationHoleShape | None#

Get the outline of the holes, after their cavity type, or None when the field holds no hole.

The lookup is by the first hole’s exact type: a RoundCavity is PerforationHoleShape.ROUND, and a cavity type with no shape of its own here, a subclass of a listed type among them, is PerforationHoleShape.OTHER.

class volmdlr_tools.features.feature_types.sheet_metal.perforations.PerforationHoleShape(*values)#

Bases: Enum

The outline of a perforation’s holes, after the cavity type they were read as.

A plain enum, not a string: a hole’s SQUARE outline is no PerforationLayout.SQUARE lattice, and the two must never compare equal. Its value names it in a dictionary.

Variables:

OTHER – Holes of a cavity type with no name of its own here.

OTHER = 'other'#
POLYGONAL = 'polygonal'#
RECTANGULAR = 'rectangular'#
ROUND = 'round'#
SECTOR = 'sector'#
SLOTTED = 'slotted'#
SQUARE = 'square'#
class volmdlr_tools.features.feature_types.sheet_metal.perforations.PerforationLayout(*values)#

Bases: str, Enum

How the holes of a perforation are laid out: the shape of the lattice their centres sit on.

Variables:
  • SQUARE – In rows and columns at right angles, as far apart along both.

  • RECTANGULAR – In rows and columns at right angles, further apart along one than along the other.

  • STAGGERED – Each row shifted by half a pitch, every hole as far from its six neighbours: the 60-degree layout of round and hexagonal perforated sheet.

  • OBLIQUE – On any other lattice, such as staggered rows closer or further apart than 60 degrees make them.

OBLIQUE = 'oblique'#
RECTANGULAR = 'rectangular'#
SQUARE = 'square'#
STAGGERED = 'staggered'#

volmdlr_tools.features.feature_types.sheet_metal.reliefs module#

Sheet metal corner relief feature module.

volmdlr_tools.features.feature_types.sheet_metal.reliefs.CORNER_RELIEF_FOLDS = 2#

A cut into the edge at the ends of at least this many bends, about different axes, is a corner relief.

class volmdlr_tools.features.feature_types.sheet_metal.reliefs.CornerRelief(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Relief

Corner relief feature type.

A corner relief is a small sheet metal feature consisting of a few faces connected by concave angles, typically located at corners where bends meet. According to Yang Yang et al., corner reliefs are identified using the concavity method and distinguished from slots/notches by their small size and location at bend intersections.

class volmdlr_tools.features.feature_types.sheet_metal.reliefs.Relief(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Cut at the end of a bend that lets the bend stop inside the sheet.

shape names what the cut takes out of the sheet.

category: FeatureCategory = 'cut'#
feature_type: FeatureType = 'relief'#
property shape: Literal['round', 'square', 'obround'] | None#

Get the shape the relief cuts out of the sheet, read from the walls of its cut.

  • "square": flat walls alone;

  • "round": a round hole, one cylinder (or several on one axis) and no flat wall;

  • "obround": a slot, a cylinder between two flat walls tangent to it.

Where the cut of a round or obround relief crosses a bend, its free-form walls are passed over.

Returns:

The shape, or None for walls of any other kind, such as a square cut whose inner corners are rounded.

volmdlr_tools.features.feature_types.sheet_metal.lances module#

Sheet metal lances module.

class volmdlr_tools.features.feature_types.sheet_metal.lances.Lance(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', *, bends: list[Fold] | None = None, skin_nodes: list[int] | None = None)#

Bases: BendHolder, Feature

Lance feature type: material cut free on some sides and bent out of the sheet.

A tab lance is cut on three sides and bent about the fourth, its hinge; a bridge is cut along both its sides and raised as a strip on two legs, with a bend at each end of each leg. The lance owns every face of it: the walls of its cut, its bends (bends, whose faces bend_nodes lists), and its skin (skin_nodes) — the tab, or the strip and its legs, on both sides of the sheet. No Bend is reported over its bends. A lance whose bends were not found holds the walls of its cut alone, and its bend_nodes and skin_nodes are None.

property cut_nodes: list[int]#

Get the walls of the lance’s cut: every node that is neither its bends’ nor its skin’s.

property cut_walls: Shell | None#

Get the walls of the lance’s cut as one shape, without its bends and skin.

What joins the lance to the cut features around it: a hole through its tab touches the skin, not the cut, and is an opening of its own.

Returns:

A shell of the cut walls, or None when the lance has none.

feature_type: FeatureType = 'lance'#
skin_nodes: list[int] | None#

volmdlr_tools.features.feature_types.sheet_metal.louvres module#

Sheet metal louvre module.

class volmdlr_tools.features.feature_types.sheet_metal.louvres.Louvre(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', cut_nodes: list[int] | None = None)#

Bases: FlangedCutout

Louvre feature type: a slit in the sheet with the material on one side of it pressed out into a hood.

A louvre can be found from its formed hood, from the walls of its slit, or from both; which of its faces are which is kept in formed_nodes and cut_nodes.

feature_type: FeatureType = 'louvre'#
property shape: None#

Get no opening outline: a louvre’s hood is pressed out on one side of a slit, not drawn round an opening.

Half a hood can draw the same corners as the collar of an obround opening, so a louvre does not read its faces as a flanged cutout does.

Returns:

None.

volmdlr_tools.features.feature_types.sheet_metal.deformations module#

Sheet metal emboss module.

class volmdlr_tools.features.feature_types.sheet_metal.deformations.Bead(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Emboss

Raised or sunk rib pressed into the sheet: one section swept along a path of straight runs and arcs in the sheet.

The section is for example round, a V or a flat-bottomed U. Each end of the path is capped, or runs out into the sheet.

feature_type: FeatureType = 'bead'#
property section: Literal['round', 'u', 'v'] | None#

Get the section of the bead, across the line it runs along, whatever line that is.

  • "round": arcs alone;

  • "u": a flat crest between two walls;

  • "v": two straight walls meeting on a round, with no flat crest.

Returns:

The section, or None when the faces are free-form or give no direction square to the sheet to read a flat face against.

class volmdlr_tools.features.feature_types.sheet_metal.deformations.Dimple(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Emboss

Round raised or sunk spot: a dome that turns about one axis and meets the sheet without a flat top.

feature_type: FeatureType = 'dimple'#
class volmdlr_tools.features.feature_types.sheet_metal.deformations.Emboss(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Raised or sunk shape pressed into the sheet round a closed outline.

outline names that outline and crown the top of the shape.

property crown: Literal['flat', 'rounded'] | None#

Get the top of the emboss: "flat" when a flat face square to the sheet tops it.

Returns:

"flat" or "rounded"; None when the faces give no direction square to the sheet.

feature_type: FeatureType = 'emboss'#
property outline: Literal['round', 'obround', 'rounded_rectangle', 'l_shape', 'cross', 'spline'] | None#

Get the outline the emboss is pressed round, seen square to the sheet.

Each arc of the outline is a corner the emboss’s walls and rounds turn about, and the outline is named by how many corners it has and how many of them turn inwards:

  • "round": one corner and no straight side, a circle;

  • "obround": two half circles joined by straight sides;

  • "rounded_rectangle": four corners turning outwards;

  • "l_shape": six corners, one turning inwards;

  • "cross": twelve corners, four turning inwards;

  • "spline": a free-form outline, its walls free-form faces.

Returns:

The outline, or None when the faces draw none of these. A corner turns inwards when its centre lies outside the emboss’s flat top, so an L or a cross with no flat top is None.

class volmdlr_tools.features.feature_types.sheet_metal.deformations.ExtrusionHole(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', cut_nodes: list[int] | None = None)#

Bases: FlangedCutout

Round hole whose rim is drawn out of the sheet into a collar turning about the hole’s axis.

feature_type: FeatureType = 'extrusion_hole'#
class volmdlr_tools.features.feature_types.sheet_metal.deformations.FlangedCutout(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', cut_nodes: list[int] | None = None)#

Bases: Feature

Flanged cutout feature type representing an open deformation with a cutout in sheet metal.

Its faces are of two kinds: the skin the press shaped (formed_nodes) and the walls the cut left through the sheet’s thickness (cut_nodes). Either may be empty when only one of them was found.

shape names the opening the collar is drawn round.

cut_nodes: list[int]#
feature_type: FeatureType = 'flanged_cutout'#
property formed_nodes: list[int]#

Get the nodes of the skin the press shaped: every node that is not a wall of the cut.

property shape: Literal['circle', 'obround', 'rounded_rectangle', 'spline'] | None#

Get the outline of the opening, seen square to the sheet, read from the collar swept round it.

Only the formed skin is read: the walls of the cut, among them the flat rim a straight collar ends in, are not swept round the opening.

Returns:

"circle", "obround" (two half circles joined by straight sides), "rounded_rectangle" or "spline" (a free-form outline); None for any other opening, or faces that draw none.

volmdlr_tools.features.feature_types.sheet_metal.gussets module#

Sheet metal gusset module.

class volmdlr_tools.features.feature_types.sheet_metal.gussets.Gusset(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Gusset feature type: a rib pressed across a sheet-metal bend to stiffen it, joining the two flanges of the bend.

It is pressed from the sheet itself, so the sheet keeps its thickness through it, and it cuts the bend’s cylinders into pieces on either side of it; the bend stays one bend over all of them (see volmdlr_tools.shapes.sheet_metal.SheetMetalShape.get_gusset_skins()). Its faces are its formed skin on both sides of the sheet.

Not the solid gusset of a moulded or machined part, a thin plate standing in the corner between a floor and a wall, which is recognised as a Rib (see doc/markdown/Ribs.md).

feature_type: FeatureType = 'gusset'#

volmdlr_tools.features.feature_types.sheet_metal.unknown module#

Module contents#

Sheet-metal features types module.

class volmdlr_tools.features.feature_types.sheet_metal.Bead(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Emboss

Raised or sunk rib pressed into the sheet: one section swept along a path of straight runs and arcs in the sheet.

The section is for example round, a V or a flat-bottomed U. Each end of the path is capped, or runs out into the sheet.

feature_type: FeatureType = 'bead'#
property section: Literal['round', 'u', 'v'] | None#

Get the section of the bead, across the line it runs along, whatever line that is.

  • "round": arcs alone;

  • "u": a flat crest between two walls;

  • "v": two straight walls meeting on a round, with no flat crest.

Returns:

The section, or None when the faces are free-form or give no direction square to the sheet to read a flat face against.

class volmdlr_tools.features.feature_types.sheet_metal.Bend(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Fold

Bend feature type: a fold with flat sheet carrying on from both sides of it.

The sheet turns through an angle and goes on as a flange either side. A half turn or more whose flanges both fold again further on — a U-turn in a run of flanges — is a bend too; folded back at the edge of the sheet it is a Hem, and rolled at the edge with no flange after it a Curl.

feature_type: FeatureType = 'bend'#
class volmdlr_tools.features.feature_types.sheet_metal.Corner(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Corner feature type.

A corner is a sheet metal feature consisting of a single face where both adjacent solid angles are convex and fall within the range (90°, 180°). According to Yang Yang et al., corners are identified using the convexity method.

category: FeatureCategory = 'cut'#
feature_type: FeatureType = 'corner'#
class volmdlr_tools.features.feature_types.sheet_metal.CornerRelief(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Relief

Corner relief feature type.

A corner relief is a small sheet metal feature consisting of a few faces connected by concave angles, typically located at corners where bends meet. According to Yang Yang et al., corner reliefs are identified using the concavity method and distinguished from slots/notches by their small size and location at bend intersections.

class volmdlr_tools.features.feature_types.sheet_metal.Curl(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Fold

Curl feature type: the edge of the sheet rolled round, with no flat leg after the roll.

The sheet ends on the fold itself. How far the edge is rolled is its bend_angle; a curl may stop short of meeting the sheet or roll on until it nearly does.

feature_type: FeatureType = 'curl'#
class volmdlr_tools.features.feature_types.sheet_metal.Dimple(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Emboss

Round raised or sunk spot: a dome that turns about one axis and meets the sheet without a flat top.

feature_type: FeatureType = 'dimple'#
class volmdlr_tools.features.feature_types.sheet_metal.Emboss(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Raised or sunk shape pressed into the sheet round a closed outline.

outline names that outline and crown the top of the shape.

property crown: Literal['flat', 'rounded'] | None#

Get the top of the emboss: "flat" when a flat face square to the sheet tops it.

Returns:

"flat" or "rounded"; None when the faces give no direction square to the sheet.

feature_type: FeatureType = 'emboss'#
property outline: Literal['round', 'obround', 'rounded_rectangle', 'l_shape', 'cross', 'spline'] | None#

Get the outline the emboss is pressed round, seen square to the sheet.

Each arc of the outline is a corner the emboss’s walls and rounds turn about, and the outline is named by how many corners it has and how many of them turn inwards:

  • "round": one corner and no straight side, a circle;

  • "obround": two half circles joined by straight sides;

  • "rounded_rectangle": four corners turning outwards;

  • "l_shape": six corners, one turning inwards;

  • "cross": twelve corners, four turning inwards;

  • "spline": a free-form outline, its walls free-form faces.

Returns:

The outline, or None when the faces draw none of these. A corner turns inwards when its centre lies outside the emboss’s flat top, so an L or a cross with no flat top is None.

class volmdlr_tools.features.feature_types.sheet_metal.ExtrusionHole(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', cut_nodes: list[int] | None = None)#

Bases: FlangedCutout

Round hole whose rim is drawn out of the sheet into a collar turning about the hole’s axis.

feature_type: FeatureType = 'extrusion_hole'#
class volmdlr_tools.features.feature_types.sheet_metal.FlangedCutout(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', cut_nodes: list[int] | None = None)#

Bases: Feature

Flanged cutout feature type representing an open deformation with a cutout in sheet metal.

Its faces are of two kinds: the skin the press shaped (formed_nodes) and the walls the cut left through the sheet’s thickness (cut_nodes). Either may be empty when only one of them was found.

shape names the opening the collar is drawn round.

cut_nodes: list[int]#
feature_type: FeatureType = 'flanged_cutout'#
property formed_nodes: list[int]#

Get the nodes of the skin the press shaped: every node that is not a wall of the cut.

property shape: Literal['circle', 'obround', 'rounded_rectangle', 'spline'] | None#

Get the outline of the opening, seen square to the sheet, read from the collar swept round it.

Only the formed skin is read: the walls of the cut, among them the flat rim a straight collar ends in, are not swept round the opening.

Returns:

"circle", "obround" (two half circles joined by straight sides), "rounded_rectangle" or "spline" (a free-form outline); None for any other opening, or faces that draw none.

class volmdlr_tools.features.feature_types.sheet_metal.Fold(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

A fold of the sheet about one axis: what a bend, a hem and a curl have in common.

Its recognized face set is the fold zone: the two coaxial cylindrical faces the sheet is wrapped around — inside and outside — plus the thickness faces of the sheet’s outer edge that close the zone where it stops along its axis, and, on a curl, the free edge running its whole length. The walls of a cut through or beside the fold — a hole or a window across it, a lance, a bridge, a jogged tab — belong to that cut, not to the fold, even where they are fan-shaped. The flat sheet either side is a neighbour the fold does not own, which is why flange length is a measurement (volmdlr_tools.features.measurements.bends) and not one of the parameters below (ADR 0001); only a hem also holds the flange it folds back, its leg. A fold a jog or a lance is formed with belongs to that feature (see BendHolder) and is not reported on its own.

Parameters are read off those cylinders and answer None on a face set that carries no coaxial cylinder pair, rather than raising: a sub-chain classified as a bend but grouping only thickness faces is a bend the recognizer described without its radius, and a rule must be able to report that it could not be checked.

What the fold is — a plain bend, a hem folded back onto the sheet, a curl rolled at its edge — is told by its subclass, never by a parameter, so a check written for bends does not reach hems and curls by inheritance.

All values are in the model’s own units — metres, like every model in this repo — and angles in radians.

property bend_angle: float | None#

Get the angle the sheet turns through, in radians.

The angle swept by the fold zone’s inside surface: pi/2 for a square corner (90 degrees), whatever the flange lengths either side. This is the included turn of the material, not the angle between the flanges, which is its supplement. A surface split into several faces is measured whole: their arcs are added, overlaps counted once.

Returns:

The swept angle in radians (e.g. 1.5708 for a 90-degree bend), or None when the face set carries no coaxial cylinder pair.

property bend_axis: Vector3D | None#

Get the unit direction the fold’s axis runs in.

Returns:

The direction of bend_line, or None when there is no bend line or it has no length, so no direction can be read off it.

property bend_line: LineSegment3D | None#

Get the fold’s axis, trimmed to the stretch of it the fold actually spans.

The geometric anchor of everything measured relative to a fold: its direction is the direction the fold runs in, and its length is how far the fold runs across the sheet. Taken from the inside cylinder, so the segment lies on the axis of the surface the sheet is wrapped around, and spanning every face of it.

Returns:

The axis segment, or None when the face set carries no coaxial cylinder pair.

property bend_zone_extent: float | None#

Get the width of sheet the fold consumes, measured across it on the inside surface.

The arc length of the inside surface between the two tangent lines, inside_radius * bend_angle — 6.28 mm for a 90-degree bend of 4 mm inside radius. This is the strip a flange loses to the fold, and the band a hole-to-bend distance is measured from the edge of.

Returns:

The arc length across the fold (e.g. 0.00628), or None when the face set carries no coaxial cylinder pair.

category: FeatureCategory = 'forming'#
feature_type: FeatureType = 'unknown'#
property inside_radius: float | None#

Get the radius of the fold’s inside surface — the tighter of its two cylinders.

The quantity bend-radius rules table against material grade and sheet thickness. Read off the inside cylinder rather than derived from the outside one and the thickness, so it stays exact on a part whose thickness the recognizer measures approximately.

Returns:

The inside radius (e.g. 0.004 for a 4 mm bend radius), or None when the face set carries no coaxial cylinder pair.

property thickness: float | None#

Get the thickness of the sheet across the fold.

How far the fold’s outside surface stands off its inside one, read off the fold itself, so it is known even where the sheet’s thickness as a whole is not.

Returns:

The thickness (e.g. 0.001 for a 1 mm sheet), or None when the face set carries no coaxial cylinder pair.

class volmdlr_tools.features.feature_types.sheet_metal.Gusset(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Gusset feature type: a rib pressed across a sheet-metal bend to stiffen it, joining the two flanges of the bend.

It is pressed from the sheet itself, so the sheet keeps its thickness through it, and it cuts the bend’s cylinders into pieces on either side of it; the bend stays one bend over all of them (see volmdlr_tools.shapes.sheet_metal.SheetMetalShape.get_gusset_skins()). Its faces are its formed skin on both sides of the sheet.

Not the solid gusset of a moulded or machined part, a thin plate standing in the corner between a floor and a wall, which is recognised as a Rib (see doc/markdown/Ribs.md).

feature_type: FeatureType = 'gusset'#
class volmdlr_tools.features.feature_types.sheet_metal.Hem(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', hem_type: Literal['flat', 'open', 'teardrop'] = 'open', leg_nodes: list[int] | None = None)#

Bases: Fold

Hem feature type: the edge of the sheet folded back over the sheet, its leg lying along it.

The fold turns about half a turn and flat sheet carries on beyond it, so the leg reaches back across the sheet from the edge. hem_type names its section:

  • "flat": folded flat against the sheet, with no gap under the leg;

  • "open": folded back with a gap between the leg and the sheet;

  • "teardrop": folded past half a turn, so the leg angles back down towards the sheet.

The leg is part of the hem: folding the edge back is what makes it, so its faces — both sides of the sheet, and the walls round its free edge — are in leg_nodes, and the fold itself in fold_nodes.

An edge rolled round with no flat leg is a Curl.

feature_type: FeatureType = 'hem'#
property fold_nodes: list[int]#

Get the nodes of the fold itself: every node that is not part of the leg.

classmethod from_faces_and_nodes(faces: list, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', hem_type: Literal['flat', 'open', 'teardrop'] = 'open', leg_nodes: list[int] | None = None) → Hem#

Create a hem from its faces and their nodes, saying which of them are its leg.

An unknown keyword is refused rather than dropped, so a misspelt hem_type cannot silently give an "open" hem.

hem_type: Literal['flat', 'open', 'teardrop']#
leg_nodes: list[int]#
class volmdlr_tools.features.feature_types.sheet_metal.Hook(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', *, bends: list[Fold] | None = None, skin_nodes: list[int] | None = None, width: float | None = None, flange_length: float | None = None, opening_angle: float | None = None, height: float | None = None)#

Bases: Lance

Hook feature type: a tab lanced out of the sheet and bent over at its crest, its end pointing back down.

A tab is sheared on three sides and bent out of the sheet about the fourth, its hinge; it rises at an angle, then turns back over a second bend, its crest, by more than it rose, so that its end flange points back towards the sheet and its free end stands above it. A tab turned back by exactly as much as it rose runs on parallel to the sheet and is a jogged tab, a Jog, not a hook.

Like a Lance, the hook owns every face of it: the walls of its cut, its two bends (bends, the hinge first, then the crest) and the skin of the tab on both sides of the sheet (skin_nodes). No Bend is reported over its bends. Its name tells whether the tab fills its opening, "ShearWithHook", or leaves a gap beside it, "CutoutWithHook".

A hook is a Lance subclass, so isinstance(hook, Lance) is true and code written for lances reads its cut walls, bends and skin. The processor files features by their exact type, though: FeatureProcessor.lances lists no hook, and FeatureProcessor.hooks lists them all. Test type(feature) is Lance to keep hooks out.

Its measurements, in the model’s own units and in radians, each None when the geometry does not determine it:

  • width: the width of the tab, along its bends;

  • flange_length: the length of the flat of its end flange, beyond the crest;

  • opening_angle: the angle the tab rises off the sheet at, its hinge’s bend angle;

  • height: how far the free end stands above the sheet: from the sheet’s skin on the side the tab rises to (the inside of its hinge), up to the lowest point of the end flange. It is signed: negative when that point sits below that skin, as when the end flange of a tab narrower than its window reaches back down into it.

feature_type: FeatureType = 'hook'#
class volmdlr_tools.features.feature_types.sheet_metal.Jog(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', offset: float | None = None, flat_length: float | None = None, bends: list[Fold] | None = None)#

Bases: BendHolder, Feature

Jog feature type: the sheet stepped aside by two opposite bends of equal angle.

The sheet bends one way and then back by the same angle, so it carries on parallel to where it was, shifted by a few thicknesses. Its faces are those of the flat between the two bends — both of its skins and its ends — and those of the two bends themselves: the jog owns its bends (bends, whose faces bend_nodes lists), and no Bend is reported over them, so each face of the part is held by a single feature.

A jog cut free on its sides inside the sheet, a jogged tab, is found from the walls of its cut and carries no measurement: its offset, flat_length, bends and bend_nodes are None.

All values are in the model’s own units.

category: FeatureCategory = 'forming'#
feature_type: FeatureType = 'jog'#
class volmdlr_tools.features.feature_types.sheet_metal.Lance(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', *, bends: list[Fold] | None = None, skin_nodes: list[int] | None = None)#

Bases: BendHolder, Feature

Lance feature type: material cut free on some sides and bent out of the sheet.

A tab lance is cut on three sides and bent about the fourth, its hinge; a bridge is cut along both its sides and raised as a strip on two legs, with a bend at each end of each leg. The lance owns every face of it: the walls of its cut, its bends (bends, whose faces bend_nodes lists), and its skin (skin_nodes) — the tab, or the strip and its legs, on both sides of the sheet. No Bend is reported over its bends. A lance whose bends were not found holds the walls of its cut alone, and its bend_nodes and skin_nodes are None.

property cut_nodes: list[int]#

Get the walls of the lance’s cut: every node that is neither its bends’ nor its skin’s.

property cut_walls: Shell | None#

Get the walls of the lance’s cut as one shape, without its bends and skin.

What joins the lance to the cut features around it: a hole through its tab touches the skin, not the cut, and is an opening of its own.

Returns:

A shell of the cut walls, or None when the lance has none.

feature_type: FeatureType = 'lance'#
skin_nodes: list[int] | None#
class volmdlr_tools.features.feature_types.sheet_metal.Louvre(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', cut_nodes: list[int] | None = None)#

Bases: FlangedCutout

Louvre feature type: a slit in the sheet with the material on one side of it pressed out into a hood.

A louvre can be found from its formed hood, from the walls of its slit, or from both; which of its faces are which is kept in formed_nodes and cut_nodes.

feature_type: FeatureType = 'louvre'#
property shape: None#

Get no opening outline: a louvre’s hood is pressed out on one side of a slit, not drawn round an opening.

Half a hood can draw the same corners as the collar of an obround opening, so a louvre does not read its faces as a flanged cutout does.

Returns:

None.

class volmdlr_tools.features.feature_types.sheet_metal.Notch(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', mouth: tuple[Point3D, Point3D] | None = None)#

Bases: Feature

A cut into the outer edge of a sheet, at the end of no bend.

Its walls turn into the material, and the edge of the sheet carries on along one line on both sides of it. A cut at the end of a bend is a relief instead, whatever its shape; a cut between two pieces of one fold, as between the knuckles of a hinge, ends neither piece and is a notch.

A notch is described by the outline it cuts, seen across the sheet:

  • "rectangular": two parallel sides and a bottom square to them, its inside corners sharp or rounded;

  • "v": two sides closing towards each other, meeting at a point or on a small round;

  • "u": two parallel sides joined by a half circle as wide as the notch;

  • "round": a single arc, a bite out of the edge;

  • "other": anything else.

An open slot is no outline of its own: it is a "u" or a "rectangular" notch deeper than it is wide.

A notch whose walls are free-form surfaces, as on a sheet shaped by forming, is still found, but it has no outline to read: it is "other" and its width, depth and radius are None.

category: FeatureCategory = 'cut'#
property depth: float | None#

Get how far the notch reaches into the sheet, from the line of the edge.

Returns:

The depth, or None when the walls cannot be read.

feature_type: FeatureType = 'notch'#
property outline: Literal['rectangular', 'v', 'u', 'round', 'other']#

Get the shape of the outline the notch cuts into the edge.

Returns:

"rectangular", "v", "u", "round", or "other" when the walls draw none of these or cannot be read.

property radius: float | None#

Get the radius of the notch’s arc.

Returns:

The radius of a "round" or a "u" notch, None for any other outline.

property width: float | None#

Get the width of the notch’s mouth, along the edge it is cut into.

Returns:

The distance between the two ends of the cut, or None when the walls cannot be read.

class volmdlr_tools.features.feature_types.sheet_metal.Perforation(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', *, holes: list[Cavity] | None = None, plate_nodes: list[int] | None = None, hole_size: float | None = None, pitch: float | None = None, second_pitch: float | None = None, lattice_angle: float | None = None, layout: PerforationLayout | str | None = None, minimum_ligament: float | None = None, open_area_ratio: float | None = None)#

Bases: Feature

Perforation feature type: a field of congruent holes punched through one flat plate of the sheet on a lattice.

Every hole has the same shape and size and is centred on a node of one lattice: a square or rectangular grid, rows staggered at 60 degrees, or any other. The field need not fill a parallelogram: an L-shaped field, or one bounded by a rectangle across staggered rows, is one perforation. Its holes are joined to one another one lattice step at a time; a hole on the same lattice beyond a gap of one empty node or more starts a field of its own.

The perforation owns its holes. They are no cavities of the processor’s cavities; each is still a Cavity in holes, with its own parameters, and the perforation’s nodes are their walls. plate_nodes are the skin faces of the plate the holes go through, on both sides of the sheet; the perforation does not own them.

Its measurements, in the model’s own units and in radians, each None when the geometry does not determine it:

  • hole_shape: the PerforationHoleShape of the holes, read off their cavity type, so it always says what holes hold;

  • hole_size: the width of a hole along the lattice’s first direction, the one pitch is measured along: a round hole’s diameter, a hexagon’s width across the flats facing its neighbours;

  • hole_count: how many holes the field holds;

  • pitch and second_pitch: the distance between the centres of two neighbouring holes along the lattice’s two directions, the shorter first;

  • lattice_angle: the angle between those two directions, from 60 to 90 degrees;

  • layout: the PerforationLayout that angle and those pitches make;

  • minimum_ligament: the narrowest web of material between two neighbouring holes, measured between their walls;

  • open_area_ratio: the share of the field that is open: the area of one hole over that of one lattice cell, the field’s outline being one cell around each hole.

feature_type: FeatureType = 'perforation'#
property hole_count: int#

Get how many holes the field holds.

property hole_shape: PerforationHoleShape | None#

Get the outline of the holes, after their cavity type, or None when the field holds no hole.

The lookup is by the first hole’s exact type: a RoundCavity is PerforationHoleShape.ROUND, and a cavity type with no shape of its own here, a subclass of a listed type among them, is PerforationHoleShape.OTHER.

holes: list[Cavity]#
plate_nodes: list[int]#
class volmdlr_tools.features.feature_types.sheet_metal.PerforationHoleShape(*values)#

Bases: Enum

The outline of a perforation’s holes, after the cavity type they were read as.

A plain enum, not a string: a hole’s SQUARE outline is no PerforationLayout.SQUARE lattice, and the two must never compare equal. Its value names it in a dictionary.

Variables:

OTHER – Holes of a cavity type with no name of its own here.

OTHER = 'other'#
POLYGONAL = 'polygonal'#
RECTANGULAR = 'rectangular'#
ROUND = 'round'#
SECTOR = 'sector'#
SLOTTED = 'slotted'#
SQUARE = 'square'#
class volmdlr_tools.features.feature_types.sheet_metal.PerforationLayout(*values)#

Bases: str, Enum

How the holes of a perforation are laid out: the shape of the lattice their centres sit on.

Variables:
  • SQUARE – In rows and columns at right angles, as far apart along both.

  • RECTANGULAR – In rows and columns at right angles, further apart along one than along the other.

  • STAGGERED – Each row shifted by half a pitch, every hole as far from its six neighbours: the 60-degree layout of round and hexagonal perforated sheet.

  • OBLIQUE – On any other lattice, such as staggered rows closer or further apart than 60 degrees make them.

OBLIQUE = 'oblique'#
RECTANGULAR = 'rectangular'#
SQUARE = 'square'#
STAGGERED = 'staggered'#
class volmdlr_tools.features.feature_types.sheet_metal.Relief(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '')#

Bases: Feature

Cut at the end of a bend that lets the bend stop inside the sheet.

shape names what the cut takes out of the sheet.

category: FeatureCategory = 'cut'#
feature_type: FeatureType = 'relief'#
property shape: Literal['round', 'square', 'obround'] | None#

Get the shape the relief cuts out of the sheet, read from the walls of its cut.

  • "square": flat walls alone;

  • "round": a round hole, one cylinder (or several on one axis) and no flat wall;

  • "obround": a slot, a cylinder between two flat walls tangent to it.

Where the cut of a round or obround relief crosses a bend, its free-form walls are passed over.

Returns:

The shape, or None for walls of any other kind, such as a square cut whose inner corners are rounded.

class volmdlr_tools.features.feature_types.sheet_metal.Tab(obj: TopoDS_Shape, nodes: list[int], base_nodes: list[int] | None = None, name: str = '', width: float | None = None, tip_nodes: list[int] | None = None, hole_nodes: list[int] | None = None, bend_nodes: list[int] | None = None)#

Bases: Feature

Tab feature type: an ear plate bent out of the sheet, ending in a round tip.

A tab is a flat flange beyond a single bend, running out to the sheet’s edge without folding again. Its free outline is two parallel sides running out from the bend and a round tip joining them, and it may carry one hole, such as the hole for a pin or a screw.

A tab is no Fold: it holds the flat of the flange, its two sides and its tip. Its nodes are both of its skins, its sides and the faces of its tip, which tip_nodes lists. Two features it stands with stay features of their own, and the tab only names their faces:

  • the bend it stands on stays a Bend, named by bend_nodes, so it is listed with the part’s bends and checked by the bend rules as any other;

  • the hole through it stays the cut feature recognition reads from its walls (a RoundCavity for a plain round hole), named by hole_nodes, so the hole rules — hole diameter, hole-to-bend and hole-to-edge distance — still check it.

All values are in the model’s own units.

category: FeatureCategory = 'forming'#
feature_type: FeatureType = 'tab'#
property has_hole: bool#

Whether a hole goes through the tab.