Parting Lines#
Find where a moulded or forged part’s walls change the way they lean, the line its two halves meet along, and the direction they are drawn off.
Note
Prerequisites: Attributed Adjacency Graph (AAG)
Parting Lines#
A part made in a two-part mould, or forged between two dies, has its walls drafted so that each half can be drawn off: above the line where the halves meet the walls lean one way, below it they lean the other. That line is the parting line, and the direction the halves are drawn along is the pull direction.
find_parting_lines(aag), in volmdlr_tools.graph.parting_lines, finds the parting lines of a part from its
attributed adjacency graph, with no pull direction given: the part may lie in its file at any angle. For each line
it gives the pull direction, the edges the line runs along, the faces above and below it, the faces running
straight through its plane, and the draft on each side.

From left to right: a plate whose hole alone is drafted from both sides, its outer walls running straight through the plane; a block with rounded corners lying at an angle; a parted block with a straight bore through it.
Quick Start#
A block parted at z = 10, 8 high above and 10 high below, every wall drafted 3 degrees away from the parting plane
(download drafted_block.step, in millimetres):
import math
from volmdlr.model import VolumeModel
from volmdlr_tools.graph.faces import AttributedAdjacencyGraph
from volmdlr_tools.graph.parting_lines import find_parting_lines
block = VolumeModel.from_step("drafted_block.step", reading_unit="MM").primitives[0]
(line,) = find_parting_lines(AttributedAdjacencyGraph(shape=block))
print(line.direction, line.levels, line.kind)
# (0.0, 0.0, 1.0) (10.0,) outline
print(len(line.edge_indices), len(line.upper_face_indices), len(line.lower_face_indices))
# 4 5 5
print(round(math.degrees(line.upper_draft), 2), round(math.degrees(line.lower_draft), 2))
# 3.0 3.0
The line runs along the four edges of the rectangle at z = 10, and each half keeps its four walls and its cap.
PartingLine#
Member |
Description |
|---|---|
|
The unit pull direction; the upper faces lie on its side of the line. Its largest component is positive, so a part standing upright is pulled along +Z |
|
Where the parting planes stand along |
|
The edges the line runs along |
|
The faces above and below the line |
|
The faces running straight through the parting plane, such as a bore or an outer wall that is not drafted; they belong to neither side |
|
The median lean of the walls off |
|
|
What makes a parting line#
The edges of a parting line are convex, and each turns by a small angle: the two drafts added together, no more than 40 degrees. Each such edge says on its own which way the part is pulled: square to the edge, between the normals of its two faces. A line is read where:
Edges agreeing on that direction close into a loop, lie square to one direction, and have their walls leaning off it in opposite senses, each wall by one angle all along its edge.
The line carries on along every other edge lying in the same plane whose two faces stand on opposite sides of it, such as a stretch of wall that is not drafted, or the edge of a second outline in that plane.
The faces above the line and the faces below it are not joined without crossing it. Faces running straight through the plane are set apart first, so a straight bore does not join the two halves.
A wall drafted one way only, from a neutral plane at its foot, has no parting line; neither has a chamfer, whose two faces do not lean apart off one direction, nor a drafted slab standing on a straight one, whose edge is concave.
Holes parted on their own#
Where the outer walls of a part run straight and only its holes are drafted, from both sides, the holes still meet
in a plane. The line is then reported with kind set to "holes", and the outer walls among its
through_face_indices. Round a hole the walls face in, towards its middle; round the outside of a part they face
out, and that is how the two kinds are told apart.
Limits#
A parting line that steps from one plane to another is not read.
A line is only found from a loop of drafted edges that closes. A line drafted along part of its length and straight along the rest is found only when its drafted edges close a loop somewhere in the same plane.