Skip to main content

Analysis

Struct Analysis 

Source
pub struct Analysis {
Show 33 fields pub schema: String, pub binding: Binding, pub product_name: Option<String>, pub bom: Option<Metadata>, pub source_stem: Option<String>, pub envelope: [[f64; 3]; 2], pub solid_count: Option<usize>, pub body_faces: Option<Vec<usize>>, pub stock_faces: Vec<usize>, pub face_accounting: Option<Vec<FaceGroup>>, pub recognition: Option<Recognition>, pub features: Vec<Feature>, pub blend_sites: BTreeMap<String, Vec<[f64; 3]>>, pub radius_arcs: BTreeMap<String, Vec<RadiusArc>>, pub profile_arcs: BTreeMap<String, Vec<ProfileArc>>, pub radius_reliefs: Vec<Relief>, pub iso_bounds: [f64; 4], pub edge_ink: Option<EdgeInk>, pub modelled_thread_ink: BTreeMap<String, Evidence>, pub levels: Vec<f64>, pub level_supports: Vec<LevelSupport>, pub risers: Vec<Riser>, pub principal_profiles: Vec<Source>, pub outer_profiles: Vec<Source>, pub unrecognised: Vec<Unrecognised>, pub unexplained_shapes: Vec<Shape>, pub pmi: Option<Reading>, pub face_attachments: Vec<FaceAttachment>, pub parts: Vec<FilePart>, pub part_keys: BTreeMap<String, usize>, pub coincident: Vec<CoincidentBody>, pub principal: bool, pub squared: Option<Squared>,
}
Expand description

What the part is: regenerable from its STEP file, never edited.

Fields§

§schema: String§binding: Binding§product_name: Option<String>

STEP product name for the single part or selected assembly member. Older analyses omit it and use the binding’s file stem for the default drawing title.

§bom: Option<Metadata>

File-stated bill-of-materials data, independent of geometric PMI.

§source_stem: Option<String>

Source file stem when an assembly selection makes binding.part the product name.

§envelope: [[f64; 3]; 2]

The part’s box in its own frame, mm.

§solid_count: Option<usize>

Absent in older analyses; several solids make completeness findings informational.

§body_faces: Option<Vec<usize>>

With several solids, the faces of the one solid that fills the part’s box, when exactly one does: support-plane chains are walked on it alone (#220).

§stock_faces: Vec<usize>

Principal outer stock faces, credited only when the overall sizes are stated and Analysis::face_accounting is absent.

§face_accounting: Option<Vec<FaceGroup>>

quiddity’s account of every face, by file face index (#207); absent for analyses whose recognition carries none.

§recognition: Option<Recognition>

Where the features came from; absent when none were recognised.

§features: Vec<Feature>§blend_sites: BTreeMap<String, Vec<[f64; 3]>>

Exact trimmed-surface attachment points for recognised blends, in the part frame.

§radius_arcs: BTreeMap<String, Vec<RadiusArc>>

Cylindrical radius profiles and their material side, from the trimmed faces.

§profile_arcs: BTreeMap<String, Vec<ProfileArc>>

Exact circular boundary spans of partial radius features.

§radius_reliefs: Vec<Relief>

Small, grouped shallow relief regions whose profiles are governed by the model.

§iso_bounds: [f64; 4]

The isometric’s projected box (visible and hidden edges), [x0, y0, x1, y1] mm at 1:1, about the projection of the envelope’s centre: what the isometric is fitted by. All zero when the projection has no edges (the plan then reports iso_projection_empty).

§edge_ink: Option<EdgeInk>

The part’s edges and faces, compactly, from which the planner proves a region of a view blank before placing a label inside it (projected_ink). Absent in older analyses, which then keep every label outside the views.

§modelled_thread_ink: BTreeMap<String, Evidence>

Claimed thread edge/curved-face indices in the immutable raw projection evidence.

§levels: Vec<f64>

The heights (z, mm) of the part’s horizontal face levels: what a prismatic part’s height ladder dimensions (crate::demand::face_levels).

§level_supports: Vec<LevelSupport>

Each horizontal face level’s support (quiddity’s FaceLevel records, read in the part’s frame): its height and the x and y extents of its faces, per solid.

§risers: Vec<Riser>

The walls and ramps that rise between the levels (quiddity’s RiserEvidence, read in the part’s frame): where a prismatic part’s steps are located along x and y.

§principal_profiles: Vec<Source>

Each solid’s principal boundary faces (each solid of a part of several, else the whole part), with their loops’ edges: what lint’s principal profile check judges (crate::lint::profiles), read from the part as draftwright’s lint reads it.

§outer_profiles: Vec<Source>

Provider-issued ordered planar outer profiles, with exact body and support identities.

§unrecognised: Vec<Unrecognised>

The families of features the recogniser did not give, so the part may have features of them that the Analysis lacks: empty for Python quiddity’s recognition, which the bridge reads in full; for Rust quiddity’s (analyse_native), the families its document has that crate::bridge::native does not read yet, and those it does not carry. The plan reports them (features_not_recognised).

§unexplained_shapes: Vec<Shape>

Recognisable shapes among the faces quiddity’s accounting leaves unexplained (#213): protrusions, cuts, edge chamfers and tooth patterns (crate::unexplained). The plan warns of each whose faces no feature claims (shape_not_recognised).

§pmi: Option<Reading>

The part’s AP242 semantic PMI (crate::pmi::attach): its records, each with where it attaches, and every source not read; or why the file’s PMI could not be read. Absent when the file has none. The plan lowers it to feature control frames and datum feature symbols (crate::pmi_lowering).

§face_attachments: Vec<FaceAttachment>

Each face’s attachment, by face index (crate::pmi::face_attachments): where a datum or geometric tolerance the Spec authors on it attaches, as an AP242 record on the same faces would (crate::spec_gdt). Added to version 7 as an optional field; an Analysis without it refuses Spec-authored GD&T (analyse again).

§parts: Vec<FilePart>

The file’s distinct parts, when it holds more than one (an assembly): absent for a file of one part. With no part chosen (binding.part_index absent) they are drawn together as one, and the plan warns (assembly_drawn_whole).

§part_keys: BTreeMap<String, usize>

Persistent identities when the source has multiple parts. Single-part documents keep the existing schema shape; their product name identifies their sole part.

§coincident: Vec<CoincidentBody>

The file’s bodies that coincide with an earlier one (#212), when no part was chosen: when every body of an assembly coincides with the first, that part is read alone (binding.part_index) and these are not drawn; otherwise the file is drawn whole, these with it. The plan reports them (coincident_bodies).

§principal: bool

Whether the part binding.part_index names was chosen as the assembly’s principal part (#219), with no part chosen: its body the largest, holding every other within its box, drawn alone. The other parts are not drawn, and the plan says so (assembly_principal_drawn).

§squared: Option<Squared>

The rotation that set the part, a fraction of a degree to SQUARE_WITHIN off the file’s axes, square to them in its own frame (#216): the part is read, drawn and dimensioned so moved, and the plan says so (part_squared_to_axes).

Implementations§

Source§

impl Analysis

Source

pub fn ladder_axis(&self, parameter: &str) -> Option<usize>

The part axis of a live ladder item, determined from its face/riser geometry.

Source§

impl Analysis

Source

pub fn dimension_references(&self) -> &BTreeMap<String, Vec<Reference>>

Inventory to copy into an authored dimension. Empty in older Analyses: analyse again.

Source

pub fn dimension_reference_face(&self, key: &str, axis: usize) -> Option<usize>

Resolve a planar dimension reference to its unique trimmed physical face. Coplanar faces with different bounds remain distinct stations in lint.

Source

pub fn dimension_reference_axis_face(&self, key: &str) -> Option<usize>

Resolve an explicit cylindrical face axis to its unique trimmed physical face. Bounds and surface identity, rather than discovery membership, establish ownership.

Source

pub fn dimension_reference(&self, key: &str) -> Result<Reference, String>

Source

pub fn measure_references( &self, refs: &[String], kind: &str, along: Option<&str>, ) -> Result<Measurement, String>

Measure only geometry and a quantity request. Used independently by lint from ink claims.

Trait Implementations§

Source§

impl Clone for Analysis

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 Analysis

Source§

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

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

impl<'de> Deserialize<'de> for Analysis

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Analysis

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

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<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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
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> Same for T

Source§

type Output = T

Should always be Self
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.