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§
- Anchor
Point - One point of a placement’s projection a sheet dimension can anchor to.
- Annotation
Drawing - One annotation, laid out at sheet scale.
- Clip
Plane - The half-space a SECTION placement draws: everything with
(p \u{2212} point) \u{00B7} normal >= 0is KEPT, andnormalis the direction the section camera looks. - Detail
Drawing - A detail placement’s own marks: the circle its drawing is clipped to and
the
DETAIL B/SCALE 4:1caption under it. - Detail
Mark - One detail CIRCLE, drawn on the placement it was picked on: the circle round the region the detail redraws, and its letter beside it.
- Detail
Setup - 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.
- Exact
Lines - 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
LinesJobanswers with. - Lines
Job - 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. - Lines
Solid - 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. - Section
Drawing - A section placement’s own marks: the hatch over its cut faces and the
SECTION A-Acaption under the drawing. - Section
Mark - 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.
- Section
Setup - 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, and the letter.
- Sheet
Drawing - A whole sheet, projected — the sheet viewport draws this and the SVG and PDF writers serialise it.
- Sheet
Text - A placed text run, centred on
anchor. - Solid
Pose - 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. - Tolerance
Source - A PMI dimension of a placement’s view with a tolerance block to hand on, by what it measures on the paper.
- View
Drawing - 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.
- View
Frame - The saved camera as an orthonormal frame:
right/upspan the projection plane,forwardruns 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.
- Hidden
Line - Which pass drew a placement’s model lines (
ViewDrawing::hidden_line). - Lines
Clip - 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 has no data to carry.
- Lines
Mode - What a projection does on an exact-lines MISS.
- Measures
- What a
ToleranceSourcemeasures, projected.
Constants§
- EDGE_
ANGLE_ DEG - Dihedral threshold for a drawn edge, degrees —
EdgesGeometry(geo, 30), the valueBREP_mcp_core::render_meshmatches 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_planeaccepts a plane against its geometry atsin < 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.
contextis what the border and title block need and a projection cannot know — the document’s name and the day (seesuper::frame::FrameContext). Every exact pass runs HERE, on the calling thread;project_sheet_withcan hand them over instead. - project_
sheet_ with project_sheet, with what an exact-lines miss does chosen bymode: 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.
viewis the saved PMI view it names andreportthat view’s resolved annotations (bothNonewhen 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
jobagainst the resident registry of THIS thread — the runner’s side ofLinesMode::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
sheetdraws: 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.