pub struct PlacedView {
pub id: String,
pub view: String,
pub position: [f64; 2],
pub scale: f64,
pub projection: String,
pub flatten_text: bool,
pub three_d: bool,
pub section: Option<SectionCut>,
pub detail: Option<DetailCircle>,
}Expand description
A saved PMI view placed on a sheet.
Fields§
§id: String§view: StringThe PMI view’s id (VIEW3).
position: [f64; 2]Millimetres from the paper’s TOP-LEFT corner (SVG’s own origin), of the point the saved camera targets — the view’s centre, not its corner, so changing the scale grows the drawing about where it was placed.
scale: f64Paper millimetres per model unit.
projection: Stringorthographic — the only kind this slice draws.
flatten_text: boolRotate every text run — and every framed symbol, frame and cells together — FLAT to the sheet, about its own anchor, at its sheet-scale size. ON by default, because that is the drawing convention: a drawing’s text reads left to right whatever plane the annotation was authored in. Off, each run is drawn as the projection gives it: foreshortened, rotated, and on an edge-on plane collapsed onto a line.
three_d: boolDraw this placement LIVE in the Sheets + 3D PDF as well: a 3D box over the
drawing that Acrobat and Foxit turn and zoom, opening on this
placement’s camera and scale (pdf3d). Every other reader, and the
SVG, show the drawing alone. Off by default, and absent from a saved
placement that is off, so a document that never asks for 3D saves
exactly as before.
section: Option<SectionCut>This placement is a SECTION VIEW: its camera is derived from a cutting plane picked on ANOTHER placement, and it draws the model clipped at that plane with the cut faces hatched. Absent on a plain placement, which is every one saved before sections existed.
detail: Option<DetailCircle>This placement is a DETAIL VIEW: a circled region of ANOTHER placement redrawn at this placement’s own scale, through the source’s camera and clipped to the circle. Absent on a plain placement and on a section; a placement is at most one of the two.
Implementations§
Source§impl PlacedView
impl PlacedView
Sourcepub fn params(&self) -> Value
pub fn params(&self) -> Value
The params the placement’s form edits — the Placed view, Section
view or Detail view schema’s, whichever this placement is. A
section’s cutting line (cut) and a detail’s centre and rim are
the picked anchors its reference rows show.
Sourcepub fn picked(&self, field: &str) -> Vec<String>
pub fn picked(&self, field: &str) -> Vec<String>
The anchors picked for a derived placement’s reference field (cut,
centre, rim), blanks left out — empty for a field this placement
does not have.
Sourcepub fn schema_type(&self) -> &'static str
pub fn schema_type(&self) -> &'static str
Which catalogue object this placement’s form is: sheetView,
sectionView or detailView.
Trait Implementations§
Source§impl Clone for PlacedView
impl Clone for PlacedView
Source§impl Debug for PlacedView
impl Debug for PlacedView
Source§impl<'de> Deserialize<'de> for PlacedView
impl<'de> Deserialize<'de> for PlacedView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PlacedView
impl PartialEq for PlacedView
Source§impl Serialize for PlacedView
impl Serialize for PlacedView
impl StructuralPartialEq for PlacedView
Auto Trait Implementations§
impl Forget for PlacedView
impl Freeze for PlacedView
impl Move for PlacedView
impl RefUnwindSafe for PlacedView
impl Send for PlacedView
impl Sync for PlacedView
impl Unpin for PlacedView
impl UnsafeUnpin for PlacedView
impl UnwindSafe for PlacedView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.