Skip to main content

ViewDrawing

Struct ViewDrawing 

Source
pub struct ViewDrawing {
Show 17 fields pub id: String, pub view: String, pub name: String, pub position: [f64; 2], pub scale: f64, pub error: String, pub edges: Vec<Vec<[f64; 2]>>, pub annotations: Vec<AnnotationDrawing>, pub anchors: Vec<AnchorPoint>, pub text_mm: f64, pub section: Option<SectionDrawing>, pub section_marks: Vec<SectionMark>, pub detail: Option<DetailDrawing>, pub detail_marks: Vec<DetailMark>, pub bounds: [f64; 4], pub hidden_line: String, pub tolerances: Vec<ToleranceSource>,
}
Expand description

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.

Fields§

§id: String

The placed view’s id (SV2).

§view: String

The saved PMI view it places (VIEW1).

§name: String

The saved view’s name, for the panel and the SVG group label.

§position: [f64; 2]§scale: f64§error: String

Empty when the view projected; the reason it did not otherwise (no such saved view, no captured camera, a perspective camera).

§edges: Vec<Vec<[f64; 2]>>

The model as VISIBLE edge lines, one polyline per visible run.

§annotations: Vec<AnnotationDrawing>

Every enabled, resolved annotation of the saved view, projected.

§anchors: Vec<AnchorPoint>

Every point of this projection a SHEET dimension can be anchored to — each named vertex, each named edge’s two ends and its midpoint, and the centre of each circular edge. The anchor space is the MODEL’s topology, so the hidden-line pass has no vote on it: a candidate whose ink the pass removed is still here, and a dimension anchored to it still draws.

§text_mm: f64

The saved view’s text size in PAPER millimetres — what a sheet dimension on this placement is drawn at, so it reads at the size of the annotations it sits among.

§section: Option<SectionDrawing>

This placement IS a section view: the cut face’s hatch and its caption (SectionDrawing). None on a plain placement.

§section_marks: Vec<SectionMark>

The section LINES drawn on THIS placement — one per section view cut through it. A plain placement that nothing sections has none.

§detail: Option<DetailDrawing>

This placement IS a detail view: its boundary circle and its caption (DetailDrawing). None on every other placement.

§detail_marks: Vec<DetailMark>

The detail CIRCLES drawn on THIS placement — one per detail view drawn from it.

§bounds: [f64; 4]

[x0, y0, x1, y1] over everything drawn — empty geometry gives the placement point twice.

§hidden_line: String

Which hidden-line pass drew Self::edges: analytic (the exact pass on the B-rep, super::hlr::visible_edges) or mesh (the same pass on the display, super::hlr::visible_mesh_lines — the stated approximation while a drawn solid’s B-rep has not reached the scene). Empty on a placement that did not project.

§tolerances: Vec<ToleranceSource>

The saved view’s PMI dimensions that carry a tolerance block (or read as a reference dimension), by what they MEASURE on this paper: what a sheet dimension anchored to the same points inherits (super::dimension). Engine-side only — the drawing does not publish them; a dimension that inherits says so on its own row.

Trait Implementations§

Source§

impl Clone for ViewDrawing

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ViewDrawing

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ViewDrawing

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ViewDrawing

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ViewDrawing

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,