Skip to main content

Module project

Module project 

Source
Expand description

Projecting a placed PMI view onto its sheet: the model as edge LINES with hidden lines removed, plus EVERY annotation of the saved view, all in paper millimetres.

§Annotations

An annotation is laid out through the same pmi_present the 3D overlay and the STEP presentation use — in its own annotation plane when it has one — and the result is projected through the view camera exactly as the overlay draws it. There is no plane filter: a plane oblique to the view draws foreshortened, a plane EDGE-ON to it draws as a line and the row says so (AnnotationDrawing::note). Circles and arcs in the plane are polylines before they are projected, so they come out as the ellipses any parallel projection gives. Annotations are NOT hidden-line tested: they are drawn on top of the model, which is what the viewport overlay does and what a drawing wants — a dimension behind the part is still a dimension.

§The model lines

Drawn by the ANALYTIC hidden-line pass, super::hlr: candidate curves from the B-rep (edges and the silhouettes of curved faces), split where they cross in the projection plane, each piece shown or hidden by an exact depth comparison against the faces in front of it. A section cuts the B-rep with its plane exactly (super::hlr::section_curves) and a detail decides visibility inside its circle’s cylinder at its own scale. The result is cached per placement by what it depends on — the geometry, the camera, the scale and the clip — and never by where the placement sits on the paper, so a drag does not re-run it.

§Before the B-rep arrives

The exact pass needs every drawn solid’s B-rep, which the scene PULLS from the runner when a sheet first shows it. Until it lands — and for a handle the registry could not clone — the placement is drawn by the same pass on the DISPLAY instead (super::hlr::visible_mesh_lines): the display edges and the mesh’s silhouettes, split and decided against the display triangles. That is a stated approximation, never a silent one: ViewDrawing::hidden_line says mesh, and the PDF and SVG writers carry it into the files they write.

Structs§

AnchorPoint
One point of a placement’s projection a sheet dimension can anchor to.
AnnotationDrawing
One annotation, laid out at sheet scale.
ClipPlane
The half-space a SECTION placement draws: everything with (p \u{2212} point) \u{00B7} normal >= 0 is KEPT, and normal is the direction the section camera looks.
DetailDrawing
A detail placement’s own marks: the circle its drawing is clipped to and the DETAIL B / SCALE 4:1 caption under it.
DetailMark
One detail CIRCLE, drawn on the placement it was picked on: the circle round the region the detail redraws, and its letter beside it.
DetailSetup
What a DETAIL placement projects through, once its circle has been resolved against the source placement’s projection: the source’s own camera frame re-targeted on the circle’s centre, and the circle’s radius in MODEL units.
ExactLines
The analytic pass’s lines for one placement, RELATIVE to its position (paper millimetres from the placement point): the visible runs and, for a section, the cut curves. What a LinesJob answers with.
LineArtLayer
What a Line art instructions picture draws beyond its lines (paper mm): a light grey ground under the picture, the parts’ visible faces as flat triangles painted back to front (white where an earlier step placed the part, blue where the step adds it), each part’s outline in its tier’s heavier ink, and the insertion arrows (a thin black line from where the part starts to its seat, a filled black head at the seat).
LinesJob
ONE placement’s analytic pass, as the runner is asked to run it: everything exact_lines would compute on a miss, by reference to the runner’s own resident solids rather than a copy of them.
LinesSolid
One solid of an exact pass, by what the RUNNER holds it as: its name, the resident handle, the content fingerprint the main side read off its copy, and the poses the view applies to it.
Model
What a projection reads beside the sheet and its PMI views: the scene, the displays the viewport’s active view posed in place (un-posed, see Unposed), and the document’s expression sheet — a PMI row’s tolerance may be an expression, and a sheet dimension that inherits it needs its value.
SectionDrawing
A section placement’s own marks: the hatch over its cut faces and the SECTION A-A caption under the drawing.
SectionMark
One section LINE, drawn on the placement the cut was picked in: the line through the two anchors, an arrow at each end pointing the way the section looks, and the letter beside each arrow.
SectionSetup
What a SECTION placement projects through, once its cut has been resolved against the source placement’s projection: the derived camera frame, the half-space to keep, the second plane of a half section, and the letter.
SheetDrawing
A whole sheet, projected — the sheet viewport draws this and the SVG and PDF writers serialise it.
SheetText
A placed text run, centred on anchor.
SolidPose
One explode row’s pose of a drawn solid: p' = R((p − c) ∘ s) + c + t, the viewport’s own formula (pmi_ops), read off the view’s report.
ToleranceSource
A PMI dimension of a placement’s view with a tolerance block to hand on, by what it measures on the paper.
ViewDrawing
One placed view, projected. Paper millimetres throughout, measured from the paper’s TOP-LEFT corner with y running DOWN — SVG’s own frame, so the writer transforms nothing.
ViewFrame
The saved camera as an orthonormal frame: right / up span the projection plane, forward runs eye → target. Points are measured from the camera’s TARGET, which is the point the placement positions on the paper.

Enums§

Deferred
A deferred job’s answer.
Derived
A placement whose camera is DERIVED from another placement rather than read off its saved view.
HiddenLine
Which pass drew a placement’s model lines (ViewDrawing::hidden_line).
LinesClip
What an exact pass is restricted to, as a job carries it: a SECTION’s cap is the cut the job computes itself, so it carries only a half section’s second plane.
LinesMode
What a projection does on an exact-lines MISS.
Measures
What a ToleranceSource measures, projected.

Constants§

EDGE_ANGLE_DEG
Dihedral threshold for a drawn edge, degrees — EdgesGeometry(geo, 30), the value BREP_mcp_core::render_mesh matches three.js on. The analytic pass reads the same bar off the exact face normals along a B-rep edge.
EDGE_ON_COS
When an annotation plane is EDGE-ON to the view: the cosine of the angle between the plane’s normal and the viewing direction. Below this the plane projects to a line, and so does everything laid out in it. The bar is the kernel’s own (annotation_plane accepts a plane against its geometry at sin < 1e-3), read on the other axis.
HATCH_SPACING_MM
A section’s HATCH spacing, PAPER millimetres. A hatch is a drawing convention rather than a property of the model, so it is a paper distance at every sheet scale — a 2:1 section is hatched at the same pitch as a 1:1 one, which is what makes two sections of a drawing read as one drawing.
MM_PER_POINT
Points per millimetre: a PMI view’s text size is in POINTS, and a sheet is in millimetres.

Functions§

plane_is_edge_on
Whether an annotation plane is EDGE-ON to a view looking along forward: its normal perpendicular to the viewing direction, so the plane and everything laid out in it project onto one line. An annotation with no picked plane is laid out in the view’s own plane and is never edge-on.
project_sheet
The whole sheet: the paper’s furniture, then every placement projected, in order. context is what the border and title block need and a projection cannot know — the document’s name and the day (see super::frame::FrameContext). Every exact pass runs HERE, on the calling thread; project_sheet_with can hand them over instead.
project_sheet_with
project_sheet, with what an exact-lines miss does chosen by mode: the engine’s viewport hands the pass to the runner and draws the mesh approximation until the answer lands; an export computes it here.
project_view
Project one placed view. view is the saved PMI view it names and report that view’s resolved annotations (both None when the block no longer carries it, which is an error row rather than a dropped placement).
project_view_through
Project one placed view, optionally through a DERIVED camera — a section’s or a detail’s — instead of its saved one.
run_lines_job
Run job against the resident registry of THIS thread — the runner’s side of LinesMode::Defer. Refused when the registry no longer holds a handle, or holds different geometry under it than the main side fingerprinted (an assembly solve re-poses a resident solid in place): lines of the wrong geometry cached under this key would be a silent error.
sheet_solid_names
The names of every solid some placement of sheet draws: the solids whose topology its exact pass needs.

Type Aliases§

Unposed
The displays the viewport’s ACTIVE PMI view has posed in place, un-posed — the engine’s pmi_explode_originals. A sheet draws every placement with its OWN view’s poses, so it reads a display through this first.