Skip to main content

project_view_through

Function project_view_through 

Source
pub fn project_view_through(
    model: &Model<'_>,
    placed: &PlacedView,
    view: Option<&PmiView>,
    report: Option<&PmiViewReport>,
    derived: Option<Derived>,
    letter: Option<&str>,
    mode: &mut LinesMode<'_>,
) -> ViewDrawing
Expand description

Project one placed view, optionally through a DERIVED camera — a section’s or a detail’s — instead of its saved one.

With a SECTION, the frame is the derived one, the model is cut by the section plane exactly (super::hlr::section_curves), and the pass keeps only what is at or beyond the plane with the cut region as a cap in front of what lies behind it. The candidate, split and visibility code and the ANCHOR space are the very same as a plain placement’s.

With a DETAIL, the frame is the source’s camera re-targeted on the circle’s centre (so this placement’s position is where the centre lands), and visibility is decided inside the circle’s cylinder at the detail’s own scale; clip_to_circle then trims only a chord that bows past the rim.

Both draw the model ONLY: the saved view’s annotations were laid out against THAT view’s camera and scale, and a section’s camera is a different one, while a detail’s circle would cut a dimension or a frame in half.

letter captions a plain placement of a SECTIONED saved view (super::Sheet::view_letters); a derived view carries its own.