Skip to main content

Scene

Struct Scene 

Source
pub struct Scene<'m> { /* private fields */ }
Expand description

The read API entry point: a StepModel paired with its (lazy) RefGraph and a log of navigation warnings.

Implementations§

Source§

impl Scene<'_>

Model-wide by-type queries. Naming convention: all_* returns every instance of a type in the whole model (the storage is flat — one arena per type — so a model-level query is always “find all of this type”); navigating from a handle (e.g. solid.faces()) is unprefixed and scoped to that element.

Source

pub fn all_solids(&self) -> impl Iterator<Item = Solid<'_>> + '_

Every b-rep solid in the model — MANIFOLD_SOLID_BREP and BREP_WITH_VOIDS (solids with internal cavities).

Source

pub fn all_faces(&self) -> impl Iterator<Item = Face<'_>> + '_

Every face in the model (ADVANCED_FACE and FACE_SURFACE).

Source

pub fn all_edges(&self) -> impl Iterator<Item = Edge<'_>> + '_

Every edge in the model (EDGE_CURVE).

Source

pub fn all_vertices(&self) -> impl Iterator<Item = Vertex<'_>> + '_

Every vertex in the model (VERTEX_POINT).

Source

pub fn all_points(&self) -> impl Iterator<Item = Point<'_>> + '_

Every geometric point in the model (CARTESIAN_POINT).

Source§

impl Scene<'_>

Model-wide mesh enumeration.

Source

pub fn all_mesh_groups(&self) -> impl Iterator<Item = MeshGroup<'_>> + '_

Every mesh group in the model (TESSELLATED_SOLID and TESSELLATED_SHELL — one part’s bundle of mesh faces, with a link to the precise b-rep solid where the file provides one).

Source

pub fn all_meshes(&self) -> impl Iterator<Item = Mesh<'_>> + '_

Every tessellated mesh item in the model (COMPLEX_TRIANGULATED_FACE, COMPLEX_TRIANGULATED_SURFACE_SET and plain TESSELLATED_FACE).

Source§

impl Scene<'_>

Source

pub fn dimensions(&self) -> impl Iterator<Item = Dimension<'_>> + '_

Every dimension in the model. Covers the four base dimension types; the …_WITH_PATH / …_WITH_DATUM_FEATURE / DIRECTED_… subtypes are not yet surfaced.

Source§

impl Scene<'_>

Source

pub fn tolerances(&self) -> impl Iterator<Item = Tolerance<'_>> + '_

Every geometric tolerance in the model. Covers both standalone leaf entities (in their dedicated arenas) and complex multi-supertype instances (any ComplexUnit carrying a GEOMETRIC_TOLERANCE facet).

Source§

impl Scene<'_>

Source

pub fn datums(&self) -> impl Iterator<Item = Datum<'_>> + '_

Every datum in the model — DATUMs and COMMON_DATUMs (the reference features that carry an identifying letter). The physical DATUM_FEATURE a datum is established from is a different entity, reached later.

Source§

impl Scene<'_>

Source

pub fn features(&self) -> impl Iterator<Item = Feature<'_>> + '_

Every geometric feature in the model — the SHAPE_ASPECT subtypes that denote a region of the part’s shape (plain aspects, datum features, composite / derived / all-around / centre-of-symmetry / continuous aspects). Datum callouts, datum-system references, tolerance zones, and views are also SHAPE_ASPECTs in the schema but are not features here — datums are reached via Scene::datums, the rest via the raw model.

Source§

impl Scene<'_>

Source

pub fn all_products(&self) -> impl Iterator<Item = Product<'_>> + '_

Every product (PRODUCT) in the model.

Source

pub fn all_product_definitions( &self, ) -> impl Iterator<Item = ProductDef<'_>> + '_

Every product definition (PRODUCT_DEFINITION) in the model.

Source

pub fn root_definitions(&self) -> impl Iterator<Item = ProductDef<'_>> + '_

The assembly roots: definitions no NEXT_ASSEMBLY_USAGE_OCCURRENCE uses as a child (related). Start an assembly walk here — a single part file simply yields all of its definitions.

Source§

impl Scene<'_>

Model-wide mapped-item enumeration.

Source

pub fn all_mapped_instances( &self, ) -> impl Iterator<Item = MappedInstance<'_>> + '_

Every MAPPED_ITEM in the model — the second placement mechanism besides Occurrence: a representation’s geometry stamped from its origin frame onto a target frame (assembly component reuse, and drawing/PMI view instancing).

Source§

impl Scene<'_>

Source

pub fn units(&self) -> Units

The model’s length / angle units and precision.

Picks the first unit context found; a model normally has one global context. Units it cannot classify (or a missing context) come back as None fields rather than an error.

Source§

impl<'m> Scene<'m>

Source

pub fn model(&self) -> &'m StepModel

The underlying raw model (escape hatch for uncovered long-tail entities).

Source

pub fn warnings(&self) -> Vec<String>

Navigation anomalies recorded so far — cases a handle could not resolve into the shape it exposes (e.g. an occurrence transform whose item is not an AXIS2_PLACEMENT_3D). Surfaced here rather than silently dropped.

Auto Trait Implementations§

§

impl<'m> !Freeze for Scene<'m>

§

impl<'m> RefUnwindSafe for Scene<'m>

§

impl<'m> Send for Scene<'m>

§

impl<'m> Sync for Scene<'m>

§

impl<'m> Unpin for Scene<'m>

§

impl<'m> UnsafeUnpin for Scene<'m>

§

impl<'m> UnwindSafe for Scene<'m>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.