Ribs#
Read the thin plates standing on a part, ribs, fins and gussets, with their draft, the blends at their top and their foot, and the profile each is drawn from.
Note
Prerequisites: Attributed Adjacency Graph (AAG), Part Reading
Ribs#
A rib, a fin or a gusset is a thin plate grown out of the body it stands on. It has two sides that face away from each other with material between them, a foot where it meets the body, and a free top. A moulded rib tapers: its two sides lean towards each other by the same draft angle. Its top is often rounded, and its foot blended into the body.
recognise_ribs(reading), in volmdlr_tools.reverse_engineering.techniques.ribs, reads the ribs of a part from such
pairs of sides, given the part’s PartReading. Each rib comes back as a RibPlate, in the terms a designer would
rebuild it with: a profile drawn on the rib’s mid plane, its thickness at the foot, its draft, a top that is flat or
round, and the radii of the blends at its top and its foot.
A pair of flat faces is a rib when:
the two faces face away from each other, with material between them, and each leans at most 15 degrees from the plane midway between them;
they overlap when seen across the rib;
the rib is thin: at most half as thick as the smaller of its height and its length. The blends at its top and its foot trim its flat sides, so they are counted back into its extent;
both sides meet the body at a foot, along a concave edge or a concave blend, and meet a free top, along a convex edge or a convex blend. A plate closed off by the body all round is a web between two bodies, not a rib.
Each face belongs to at most one rib, the thinnest pairs taken first.
Quick Start#
A plate 40 by 40 and 10 thick carries a rib 30 long and 4 thick at its foot, standing 8 high. Its sides lean 5
degrees towards each other, and the two edges of its top are rounded to radius 0.8
(download drafted_rib.step, in millimetres):
import math
from volmdlr.model import VolumeModel
from volmdlr_tools.features.part_reading import PartReading
from volmdlr_tools.reverse_engineering.techniques.ribs import recognise_ribs
body = VolumeModel.from_step("drafted_rib.step", reading_unit="MM").primitives[0]
(rib,) = recognise_ribs(PartReading(body))
print(round(rib.thickness, 6), round(math.degrees(rib.draft_angle), 6), round(rib.height, 6), round(rib.length, 6))
# 4.0 5.0 8.0 30.0
print(rib.top_kind, round(rib.top_radius, 6), rib.root_radius, rib.profile_closure)
# flat 0.8 None base
print([piece.kind for piece in rib.profile.primitives], round(rib.profile.signed_area, 2))
# ['line', 'line', 'line', 'line'] 234.4
The rib is 4 thick at its foot, with a draft of 5 degrees, 8 high and 30 long. Its top is flat, its two edges rounded to 0.8, and its foot is sharp. Its profile is closed along the plate it stands on. The ends of the rib lean too, so the profile is a trapezoid, 30 long at the foot and about 28.6 at the top.

The two sides of the rib in blue, its top, its ends and the rounds along its top in orange, and the top of the plate it stands on in teal.
RibPlate#
Member |
Description |
|---|---|
|
The two sides, the lower id first |
|
Every face of the rib: its sides, its top and end faces, the blends at its top and at its foot |
|
The faces the rib stands on, met at a sharp foot or through a blend |
|
A frame on the rib’s mid plane: |
|
The outline of the rib in the axes |
|
Why |
|
|
|
The thickness at the foot |
|
How far each side leans, in radians, positive when the rib gets thinner towards its top |
|
The same angle along the rib’s length, for a rib that narrows towards one end |
|
The extent of the profile along |
|
|
|
The radius of the blends along the top and along the foot, |
|
How far a side strays from the plane it is read as, zero for flat faces |
|
The profile with its foot carried depth into the body, so that the rebuilt rib runs into the body rather than ending exactly on it |
The profile is the rib alone, not the body under it: it is the part of the mid-plane section that lies on the rib’s
own top and end faces, closed along the faces the rib stands on. Where the rib stands on a round face, such as a hub
or a drum whose axis lies in the mid plane, the profile is closed along that face too. Where the ends of the top land
on something else, a straight chord stands in for the foot, and profile_closure says so.
recognise_ribs also takes:
max_thickness_ratio: the largest thickness of a rib next to the smaller of its height and its length, 0.5 by default;max_draft: the largest draft of one side, in radians, 15 degrees by default;tol: the length under which two lengths are equal, by default a small share of the part’s size;deadline: a moment, on the performance counter, after which no further rib is read.
It returns the ribs ordered by their sides, as a tuple whose timed_out says whether the time ran out before every
pair of sides was read. It raises ValueError when tol, max_thickness_ratio or max_draft is not positive.
Blended ribs#
A gusset in the corner between a floor and a wall stands on both. (The gusset of a sheet-metal part, a rib pressed
across a bend from the sheet itself, is not this one: it is a Gusset, see
Sheet Metal Features.) Moulded, its sloping top is rounded and its foot
blended into the floor and into the wall. The blends trim its flat sides, and the rounds at the two ends of its top
land on the blends of its foot rather than on the floor and the wall. The rib is still read as its sharp self: the
blends give their radii, and the profile is the triangle the gusset was drawn as.
Here the floor is 60 by 40 and 5 thick, and the wall 5 thick and 40 high. The gusset is 3 thick, with legs of 12
along the floor and up the wall. The two edges of its slope are rounded to 0.6, and its edges along the floor and the
wall are blended to 0.6 (download blended_gusset.step, in
millimetres):
body = VolumeModel.from_step("blended_gusset.step", reading_unit="MM").primitives[0]
(rib,) = recognise_ribs(PartReading(body))
print(round(rib.thickness, 6), round(rib.top_radius, 6), round(rib.root_radius, 6), rib.profile_closure)
# 3.0 0.6 0.6 base
print(round(rib.profile.signed_area, 6), len(rib.base_face_ids))
# 72.0 2
print(round(rib.height, 3), round(rib.length, 3))
# 8.485 16.971

The two sides of the gusset in blue, its sloping top and the rounds along it in orange, the blends along its foot in magenta, and the faces of the floor and the wall it stands on in teal.
The profile is the triangle with legs of 12, closed along the floor and the wall where the foot met them before it
was blended. The gusset stands on two faces, so its frame takes u along its slope and v square to it: its length
is the slope, 12√2, and its height half of that.
To rebuild a rib so that it runs into the body rather than ending exactly on it, carry its foot into the body with
reaching. The straight ends of the top are carried on along themselves to meet the moved foot, so the gusset’s
legs grow from 12 to 14:
print(round(abs(rib.reaching(1.0).signed_area), 6))
# 98.0
A rib whose top is one round from side to side, as a full-round rib’s is, has a "round" top. Its height runs to the
crown of the round. Here a rib 30 long and 3 thick stands on a plate 40 by 40 and 10 thick, its straight sides 6 high
and its top a half round of radius 1.5
(download full_round_rib.step, in millimetres):
body = VolumeModel.from_step("full_round_rib.step", reading_unit="MM").primitives[0]
(rib,) = recognise_ribs(PartReading(body))
print(rib.top_kind, rib.top_radius, round(rib.height, 6))
# round 1.5 7.5
Several ribs on one part#
Four gussets, 3 thick, stand round a hub of radius 8 and 30 high on a floor 80 by 80 and 5 thick, a quarter turn
apart. Each is a triangle running 25 up the hub and out to 30 from its axis along the floor
(download hub_with_four_gussets.step, in millimetres). Each
is read as a rib of its own. The mid plane of each holds the hub’s axis, so each profile is closed along the floor and
along the hub:
body = VolumeModel.from_step("hub_with_four_gussets.step", reading_unit="MM").primitives[0]
ribs = recognise_ribs(PartReading(body))
print(len(ribs), ribs.timed_out)
# 4 False
print({(round(rib.thickness, 6), rib.profile_closure, round(rib.profile.signed_area, 3)) for rib in ribs})
# {(3.0, 'base', 255.345)}
Each profile runs on into the hub to where the hub is half the gusset’s thickness off the mid plane, so it is a little larger than the triangle seen on the gusset’s side.
What is not a rib#
A block standing on a plate is a pair of sides with a foot and a top, but it is as thick as it is tall: it is no rib.
Loosen max_thickness_ratio and it is read as one. A plain block has no foot at all. Here a block 30 by 10 and 10
high stands on a plate 40 by 40 and 10 thick
(download block_on_a_plate.step), and the plain block is 40 by 40
and 10 thick (download plain_block.step, both in millimetres):
body = VolumeModel.from_step("block_on_a_plate.step", reading_unit="MM").primitives[0]
reading = PartReading(body)
print(recognise_ribs(reading), len(recognise_ribs(reading, max_thickness_ratio=1.5)))
# Readings((), timed_out=False) 1
plain = VolumeModel.from_step("plain_block.step", reading_unit="MM").primitives[0]
print(recognise_ribs(PartReading(plain)))
# Readings((), timed_out=False)
Blending the edges of a plate too thick for its extent does not make it a rib either: a blend gives back no more than it trimmed.
See Also#
Part Reading - The one reading of a part every technique takes
Straight Prisms - The straight extrusions a part is made of
Bosses and Local Features - Small features standing on or sunk into a part’s body