pub struct NamedModel { /* private fields */ }Expand description
A part’s boundary-representation topology and the name of every vertex,
edge, face and solid in it: what the steps of a program build, one
revision each (see model).
The fields are private: the only way to change the topology is through
its methods, each of which forwards straight to the identically named
Model operation, registers every entity it created under the name
the caller supplied, and forgets the name of every one it deleted. That
keeps the invariant NamedModel::check_names checks — every entity
has exactly one name, and every name one entity — true by construction
rather than by each caller’s diligence.
Both halves share their structure with the revisions made from them, so a revision costs what it changes, and comparing two revisions what tells them apart.
Implementations§
Source§impl NamedModel
impl NamedModel
Sourcepub fn draw(
&self,
target: &str,
rasterizer: &mut Rasterizer,
view: &mut PartView,
) -> GeopResult<()>
pub fn draw( &self, target: &str, rasterizer: &mut Rasterizer, view: &mut PartView, ) -> GeopResult<()>
Draws its vertices, edges and faces, and lists its solids, into
view, as elements of the target target: its faces meshed by
rasterizer, which meshes again only those it has not meshed alike.
Source§impl NamedModel
impl NamedModel
Sourcepub fn insert_vertex(
&mut self,
point: Vector3,
name: impl Into<String>,
) -> GeopResult<VertexId>
pub fn insert_vertex( &mut self, point: Vector3, name: impl Into<String>, ) -> GeopResult<VertexId>
Forwards to geop_core_topology::Model::insert_vertex: a vertex on
nothing yet, about to be split into an edge (see
NamedModel::split_edge_at_vertex).
Sourcepub fn insert_edge(
&mut self,
edge: Edge,
name: impl Into<String>,
) -> GeopResult<EdgeId>
pub fn insert_edge( &mut self, edge: Edge, name: impl Into<String>, ) -> GeopResult<EdgeId>
Forwards to geop_core_topology::Model::insert_edge: an edge on no
face yet, about to be spliced into its faces (see
NamedModel::splice_edge_into_face).
Sourcepub fn merge_vertex(
&mut self,
vertex_into_id: VertexId,
vertex_deleted_id: VertexId,
) -> GeopResult<()>
pub fn merge_vertex( &mut self, vertex_into_id: VertexId, vertex_deleted_id: VertexId, ) -> GeopResult<()>
Forwards to geop_core_topology::Model::merge_vertex, forgetting
the name of the vertex it deletes. The survivor keeps its own name.
Sourcepub fn merge_edge(
&mut self,
edge_into_id: EdgeId,
edge_deleted_id: EdgeId,
reversed: bool,
) -> GeopResult<()>
pub fn merge_edge( &mut self, edge_into_id: EdgeId, edge_deleted_id: EdgeId, reversed: bool, ) -> GeopResult<()>
Forwards to geop_core_topology::Model::merge_edge, forgetting the
name of the edge it deletes. The survivor keeps its own name.
Sourcepub fn reverse_face(&mut self, face_id: FaceId) -> GeopResult<()>
pub fn reverse_face(&mut self, face_id: FaceId) -> GeopResult<()>
Forwards to geop_core_topology::Model::reverse_face. Creates and
deletes nothing.
Sourcepub fn splice_edge_into_face(
&mut self,
edge_id: EdgeId,
face_id: FaceId,
max_nodes: usize,
min_subdivision_size: Scalar,
new_face_name: impl Into<String>,
) -> GeopResult<Option<FaceId>>
pub fn splice_edge_into_face( &mut self, edge_id: EdgeId, face_id: FaceId, max_nodes: usize, min_subdivision_size: Scalar, new_face_name: impl Into<String>, ) -> GeopResult<Option<FaceId>>
Forwards to geop_core_topology::Model::splice_edge_into_face.
Whether that creates a face depends on how the edge’s ends sit on the
face’s boundary, which a caller imprinting a traced curve cannot know
beforehand — so new_face_name is the name for the face if one is
created, and unused otherwise.
Sourcepub fn split_edge_at_vertex(
&mut self,
edge_id: EdgeId,
edge_t: Scalar,
vertex_id: VertexId,
max_nodes: usize,
min_subdivision_size: Scalar,
new_edge_name: impl Into<String>,
) -> GeopResult<EdgeId>
pub fn split_edge_at_vertex( &mut self, edge_id: EdgeId, edge_t: Scalar, vertex_id: VertexId, max_nodes: usize, min_subdivision_size: Scalar, new_edge_name: impl Into<String>, ) -> GeopResult<EdgeId>
Forwards to geop_core_topology::Model::split_edge_at_vertex,
naming the new edge it creates: the (vertex -> end) segment, while
edge_id keeps the (start -> vertex) one and its name.
Sourcepub fn build_body(
&mut self,
spec: BodySpec,
names: BodyNames,
) -> GeopResult<BuiltBody>
pub fn build_body( &mut self, spec: BodySpec, names: BodyNames, ) -> GeopResult<BuiltBody>
Forwards to geop_core_topology::Model::build_body, naming
everything it builds after names, index for index. Fails, leaving
the part unchanged, if a name is missing, repeated or taken.
Sourcepub fn copy_faces(
&mut self,
faces: &[FaceId],
solid: Option<String>,
rename: impl Fn(&str) -> String,
) -> GeopResult<BuiltBody>
pub fn copy_faces( &mut self, faces: &[FaceId], solid: Option<String>, rename: impl Fn(&str) -> String, ) -> GeopResult<BuiltBody>
Copies faces, with every edge and vertex they use, into a body of
their own that shares nothing with the originals (see
geop_core_topology::Model::body_spec): a solid named solid, if
given, or else a sheet. The copy of each entity named X is named
rename(X).
Sourcepub fn copy_body(
&mut self,
body: Body,
rename: impl Fn(&str) -> String,
) -> GeopResult<BuiltBody>
pub fn copy_body( &mut self, body: Body, rename: impl Fn(&str) -> String, ) -> GeopResult<BuiltBody>
Copies the whole of body — a solid, its shells kept apart, or a
sheet — into a body of its own that shares nothing with it. The copy
of each entity named X, the solid included, is named rename(X).
Sourcepub fn body_record(&self, body: Body) -> GeopResult<(BodySpec, BodyNames)>
pub fn body_record(&self, body: Body) -> GeopResult<(BodySpec, BodyNames)>
The whole of body — a solid, its shells kept apart, or a sheet —
as a body to build again (see NamedModel::build_body), with the names
of its entities: what NamedModel::copy_body builds, kept to build
later.
Sourcepub fn source_names(&self, sources: &SpecSources) -> GeopResult<BodyNames>
pub fn source_names(&self, sources: &SpecSources) -> GeopResult<BodyNames>
The names of the entities sources says a body to build was made
from (see geop_core_topology::Model::body_spec), index for index,
with no solid.
Sourcepub fn merge_faces_on_one_surface(
&mut self,
body: Body,
edge_may_go: impl Fn(EdgeId) -> bool,
vertex_may_go: impl Fn(VertexId) -> bool,
) -> GeopResult<Body>
pub fn merge_faces_on_one_surface( &mut self, body: Body, edge_may_go: impl Fn(EdgeId) -> bool, vertex_may_go: impl Fn(VertexId) -> bool, ) -> GeopResult<Body>
Takes the topology body does not need out of it (see
BodySpec::merged): faces that lie on one surface made one, and
vertices between two edges of the same two faces dropped, the edges
made one. Returns the body as it is now, rebuilt if anything was
taken out, the very same otherwise.
What is made one keeps the name of the oldest of what it is made
of; the names of the others stand for it from then on (see
crate::names::NameRegistry::alias), so a step that refers to any
of them still finds it. An edge between two faces made one is gone,
and so is its name; so is a vertex dropped. Only an edge edge_may_go
lets and a vertex vertex_may_go lets are taken out.
Sourcepub fn transform_body(
&mut self,
body: Body,
map: &dyn Deformation,
) -> GeopResult<()>
pub fn transform_body( &mut self, body: Body, map: &dyn Deformation, ) -> GeopResult<()>
Forwards to geop_core_topology::Model::transform_body. Creates
and deletes nothing, so every entity keeps its name.
Sourcepub fn assemble_solid(
&mut self,
consumed: &[Body],
keep: &[FaceId],
solid_name: impl Into<String>,
) -> GeopResult<Option<SolidId>>
pub fn assemble_solid( &mut self, consumed: &[Body], keep: &[FaceId], solid_name: impl Into<String>, ) -> GeopResult<Option<SolidId>>
Forwards to geop_core_topology::Model::assemble_solid, naming the
solid it creates (if any) and forgetting the names of everything it
deletes.
Sourcepub fn assemble_sheet(
&mut self,
consumed: &[Body],
keep: &[FaceId],
) -> GeopResult<Option<ShellId>>
pub fn assemble_sheet( &mut self, consumed: &[Body], keep: &[FaceId], ) -> GeopResult<Option<ShellId>>
Forwards to geop_core_topology::Model::assemble_sheet, forgetting
the names of everything it deletes.
Sourcepub fn delete_bodies(&mut self, bodies: &[Body]) -> GeopResult<()>
pub fn delete_bodies(&mut self, bodies: &[Body]) -> GeopResult<()>
Deletes bodies whole, with every entity in them, forgetting their
names.
Sourcepub fn replace_with_solid(
&mut self,
bodies: &[Body],
spec: BodySpec,
names: BodyNames,
) -> GeopResult<SolidId>
pub fn replace_with_solid( &mut self, bodies: &[Body], spec: BodySpec, names: BodyNames, ) -> GeopResult<SolidId>
Deletes bodies and builds the solid spec in their place, named
after names (see NamedModel::build_body), which may take up
the names of what it replaces. Fails if spec builds no solid.
Sourcepub fn merge_solids(&mut self, into: SolidId, from: SolidId) -> GeopResult<()>
pub fn merge_solids(&mut self, into: SolidId, from: SolidId) -> GeopResult<()>
Forwards to geop_core_topology::Model::merge_solids, forgetting
the name of the solid it deletes.
Source§impl NamedModel
impl NamedModel
Sourcepub fn record_feature_tool(&mut self, step: &str, tool: FeatureTool)
pub fn record_feature_tool(&mut self, step: &str, tool: FeatureTool)
Records tool as one more tool of the feature of the step step.
Sourcepub fn feature(&self, step: &str) -> GeopResult<&Feature>
pub fn feature(&self, step: &str) -> GeopResult<&Feature>
The feature of the step step. Fails, saying which steps are
features, for a step that combined nothing.
Sourcepub fn features(&self) -> impl Iterator<Item = (&str, &Feature)>
pub fn features(&self) -> impl Iterator<Item = (&str, &Feature)>
Every feature, by its step, in the order the steps ran.
Sourcepub fn feature_faces(&self) -> FeatureFaces<'_>
pub fn feature_faces(&self) -> FeatureFaces<'_>
Which feature made each face, as FeatureFaces::of tells.
Source§impl NamedModel
impl NamedModel
Sourcepub fn frame_of_face(&self, face: FaceId) -> GeopResult<CoordinateSystem>
pub fn frame_of_face(&self, face: FaceId) -> GeopResult<CoordinateSystem>
The plane of the flat face face, as a frame: normal pointing out of
its solid, origin the world origin’s projection onto it and u the
world axis most parallel to it, so sketches on parallel faces line
up.
Sourcepub fn edge_chain(&self, edge: EdgeId) -> GeopResult<Chain<NurbCurve3D>>
pub fn edge_chain(&self, edge: EdgeId) -> GeopResult<Chain<NurbCurve3D>>
The one curve edge is, as a chain named after it and its
vertices.
Sourcepub fn body(&self, name: &str) -> GeopResult<TopologyBody>
pub fn body(&self, name: &str) -> GeopResult<TopologyBody>
The body name is: a solid’s, or the one a face is part of.
Source§impl NamedModel
impl NamedModel
Sourcepub fn solid_meshes(&self, quality: usize) -> GeopResult<SolidMeshes>
pub fn solid_meshes(&self, quality: usize) -> GeopResult<SolidMeshes>
Every solid, by name, as triangles, meshed quality fine (see
rasterize), in name order so a file written from them does not
depend on how the model stores them.
Source§impl NamedModel
impl NamedModel
Sourcepub fn topology(&self) -> &Model
pub fn topology(&self) -> &Model
The topology, to query. Changing it goes through the model’s own methods, so that names stay in sync.
pub fn names(&self) -> &NameRegistry
pub fn name_of(&self, id: impl Into<RefId>) -> Option<&str>
Sourcepub fn name(&self, id: impl Into<RefId>) -> GeopResult<&str>
pub fn name(&self, id: impl Into<RefId>) -> GeopResult<&str>
The name of id — an error, naming the id, if it has none.
pub fn id_of(&self, name: &str) -> Option<RefId>
Sourcepub fn names_mentioned(&self, text: &str) -> Vec<String>
pub fn names_mentioned(&self, text: &str) -> Vec<String>
The vertices, edges and faces text — a validation report, which
knows only ids — mentions, as id = name, sorted.
Sourcepub fn rename(
&mut self,
id: impl Into<RefId>,
new_name: impl Into<String>,
) -> GeopResult<()>
pub fn rename( &mut self, id: impl Into<RefId>, new_name: impl Into<String>, ) -> GeopResult<()>
Gives id the name new_name instead — see NameRegistry::rename
for the one situation this is for.
Sourcepub fn restore_name(
&mut self,
id: impl Into<RefId>,
earlier: &str,
) -> GeopResult<()>
pub fn restore_name( &mut self, id: impl Into<RefId>, earlier: &str, ) -> GeopResult<()>
Gives id back the name earlier of what it turned out to be — a
face a boolean only trimmed, though its splits left it a piece’s
name — its name so far standing for it too, so that what referred
to it by that still finds it.
Sourcepub fn stand_for(
&mut self,
id: impl Into<RefId>,
earlier: &str,
) -> GeopResult<()>
pub fn stand_for( &mut self, id: impl Into<RefId>, earlier: &str, ) -> GeopResult<()>
Lets the name earlier, of something now part of id, stand for it,
id keeping its own name.
Sourcepub fn check_names(&self) -> GeopResult<()>
pub fn check_names(&self) -> GeopResult<()>
Checks the invariant every method keeps: every vertex, edge, face and solid has a name, and every name belongs to one of them.
Source§impl NamedModel
impl NamedModel
pub fn vertex_id(&self, name: &str) -> GeopResult<VertexId>
pub fn edge_id(&self, name: &str) -> GeopResult<EdgeId>
pub fn face_id(&self, name: &str) -> GeopResult<FaceId>
pub fn solid_id(&self, name: &str) -> GeopResult<SolidId>
Sourcepub fn solid_of_face(&self, face: FaceId, why: &str) -> GeopResult<SolidId>
pub fn solid_of_face(&self, face: FaceId, why: &str) -> GeopResult<SolidId>
The solid face is part of. An error for a face of a sheet, naming
the face and saying why it has to be a solid’s.
Sourcepub fn solid_name_of_face(&self, face: FaceId, why: &str) -> GeopResult<String>
pub fn solid_name_of_face(&self, face: FaceId, why: &str) -> GeopResult<String>
The name of the solid face is part of, as Self::solid_of_face.
Sourcepub fn sheet_of_face(&self, face: FaceId, why: &str) -> GeopResult<ShellId>
pub fn sheet_of_face(&self, face: FaceId, why: &str) -> GeopResult<ShellId>
The sheet face is part of. An error for a face of a solid, naming
the face and saying why it has to stand on its own.
Sourcepub fn plane_of_face(&self, face: FaceId, why: &str) -> GeopResult<Plane>
pub fn plane_of_face(&self, face: FaceId, why: &str) -> GeopResult<Plane>
The plane face lies in. An error for a face that is not planar,
naming the face and saying why it has to be.
Sourcepub fn solid_names(&self) -> Vec<String>
pub fn solid_names(&self) -> Vec<String>
Every solid’s name, oldest first.
Sourcepub fn newest_solid(&self) -> Option<String>
pub fn newest_solid(&self) -> Option<String>
The newest solid’s name, if there is any: what a field picking a solid starts out holding.
Sourcepub fn sheet_face_names(&self) -> Vec<String>
pub fn sheet_face_names(&self) -> Vec<String>
The name of every face standing on its own — of a sheet, part of no solid — oldest first.
Trait Implementations§
Source§impl Clone for NamedModel
impl Clone for NamedModel
Source§fn clone(&self) -> NamedModel
fn clone(&self) -> NamedModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NamedModel
impl Debug for NamedModel
Source§impl Default for NamedModel
impl Default for NamedModel
Source§impl HasElements<Body> for NamedModel
impl HasElements<Body> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§fn element(&self, name: &str) -> GeopResult<TopologyBody>
fn element(&self, name: &str) -> GeopResult<TopologyBody>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Circle> for NamedModel
impl HasElements<Circle> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Curve> for NamedModel
impl HasElements<Curve> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = Chain<NurbCurve<4>>
type Element<'a> = Chain<NurbCurve<4>>
Source§fn element(&self, name: &str) -> GeopResult<Chain<NurbCurve3D>>
fn element(&self, name: &str) -> GeopResult<Chain<NurbCurve3D>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Edge> for NamedModel
impl HasElements<Edge> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = ModelElement<'a, EdgeId>
type Element<'a> = ModelElement<'a, EdgeId>
Source§fn element(&self, name: &str) -> GeopResult<ModelElement<'_, EdgeId>>
fn element(&self, name: &str) -> GeopResult<ModelElement<'_, EdgeId>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<EdgeChain> for NamedModel
impl HasElements<EdgeChain> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = ChainElement<'a>
type Element<'a> = ChainElement<'a>
Source§fn element(&self, name: &str) -> GeopResult<ChainElement<'_>>
fn element(&self, name: &str) -> GeopResult<ChainElement<'_>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Face> for NamedModel
impl HasElements<Face> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = ModelElement<'a, FaceId>
type Element<'a> = ModelElement<'a, FaceId>
Source§fn element(&self, name: &str) -> GeopResult<ModelElement<'_, FaceId>>
fn element(&self, name: &str) -> GeopResult<ModelElement<'_, FaceId>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<FeatureElement> for NamedModel
impl HasElements<FeatureElement> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§fn element(&self, name: &str) -> GeopResult<Self::Element<'_>>
fn element(&self, name: &str) -> GeopResult<Self::Element<'_>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Line> for NamedModel
impl HasElements<Line> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<NamedModel> for NamedModel
impl HasElements<NamedModel> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = &'a NamedModel
type Element<'a> = &'a NamedModel
Source§fn element(&self, name: &str) -> GeopResult<&NamedModel>
fn element(&self, name: &str) -> GeopResult<&NamedModel>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Path> for NamedModel
An edge of a face — of a solid or of a sheet — as the one curve it is;
an edge of a wire as the run of the wire’s edges it is in, from end to
end or round (see geop_core_topology::Model::wire_chains), named
after its edges and the vertices between them. (A 3-D sketch’s wire is
picked as the sketch, whose path is named after its elements.)
impl HasElements<Path> for NamedModel
An edge of a face — of a solid or of a sheet — as the one curve it is;
an edge of a wire as the run of the wire’s edges it is in, from end to
end or round (see geop_core_topology::Model::wire_chains), named
after its edges and the vertices between them. (A 3-D sketch’s wire is
picked as the sketch, whose path is named after its elements.)
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = Chain<NurbCurve<4>>
type Element<'a> = Chain<NurbCurve<4>>
Source§fn element(&self, name: &str) -> GeopResult<Chain<NurbCurve3D>>
fn element(&self, name: &str) -> GeopResult<Chain<NurbCurve3D>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Plane> for NamedModel
impl HasElements<Plane> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = CoordinateSystem
type Element<'a> = CoordinateSystem
Source§fn element(&self, name: &str) -> GeopResult<CoordinateSystem>
fn element(&self, name: &str) -> GeopResult<CoordinateSystem>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Point> for NamedModel
impl HasElements<Point> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Round> for NamedModel
impl HasElements<Round> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Solid> for NamedModel
impl HasElements<Solid> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = ModelElement<'a, SolidId>
type Element<'a> = ModelElement<'a, SolidId>
Source§fn element(&self, name: &str) -> GeopResult<ModelElement<'_, SolidId>>
fn element(&self, name: &str) -> GeopResult<ModelElement<'_, SolidId>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl HasElements<Vertex> for NamedModel
impl HasElements<Vertex> for NamedModel
Source§const SINGLETON: Option<&'static str>
const SINGLETON: Option<&'static str>
Source§type Element<'a> = ModelElement<'a, VertexId>
type Element<'a> = ModelElement<'a, VertexId>
Source§fn element(&self, name: &str) -> GeopResult<ModelElement<'_, VertexId>>
fn element(&self, name: &str) -> GeopResult<ModelElement<'_, VertexId>>
name, or why there is none.Source§fn undefined() -> Option<&'static Self>
fn undefined() -> Option<&'static Self>
Source§fn names_target(name: &str) -> bool
fn names_target(name: &str) -> bool
name could be one of this type: what
tells a pick of an element of it from one of a target of another
type with elements of the same kind (ElementReference::from_picked).
The singleton’s name, for a singleton; any name, by default.Source§impl Kind for NamedModel
The model read whole: a kind of its own, its one element the empty
name.
impl Kind for NamedModel
The model read whole: a kind of its own, its one element the empty name.
Source§impl PartialEq for NamedModel
Equal when the topology, the names and the features are: a model built
again into the same value is the same model, however it was built — what
a version rebuilt unchanged, and a part built from scratch, are compared
by. A feature shared with the other model is equal without a look.
impl PartialEq for NamedModel
Equal when the topology, the names and the features are: a model built again into the same value is the same model, however it was built — what a version rebuilt unchanged, and a part built from scratch, are compared by. A feature shared with the other model is equal without a look.
Source§impl SelectableElement<NamedModel> for Vertex
impl SelectableElement<NamedModel> for Vertex
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
_: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( _: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<T, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<T, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Edge
impl SelectableElement<NamedModel> for Edge
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
_: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( _: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<T, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<T, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Face
impl SelectableElement<NamedModel> for Face
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
_: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( _: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<T, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<T, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Solid
A solid is picked by a face of it, and lit as all of its faces.
impl SelectableElement<NamedModel> for Solid
A solid is picked by a face of it, and lit as all of its faces.
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
solid: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, solid: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for EdgeChain
An edge chain is picked by an edge of it, held by the smallest name of
its edges, and lit as all of them.
impl SelectableElement<NamedModel> for EdgeChain
An edge chain is picked by an edge of it, held by the smallest name of its edges, and lit as all of them.
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
chain: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, chain: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for FeatureElement
impl SelectableElement<NamedModel> for FeatureElement
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(reader: &Reader<'_>, hit: &PickedElement) -> Option<FeatureRef>
fn select(reader: &Reader<'_>, hit: &PickedElement) -> Option<FeatureRef>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(reader: &Reader<'_>, feature: &FeatureRef) -> Vec<PickedElement>
fn drawn(reader: &Reader<'_>, feature: &FeatureRef) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Point
impl SelectableElement<NamedModel> for Point
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Line
impl SelectableElement<NamedModel> for Line
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Plane
impl SelectableElement<NamedModel> for Plane
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Round
impl SelectableElement<NamedModel> for Round
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Circle
impl SelectableElement<NamedModel> for Circle
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Curve
impl SelectableElement<NamedModel> for Curve
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Path
impl SelectableElement<NamedModel> for Path
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
element: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, element: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<NamedModel> for Body
A body is picked by a face of it: a solid’s face selects the solid, a
sheet’s face itself; it is lit as the solid’s faces, or the face.
impl SelectableElement<NamedModel> for Body
A body is picked by a face of it: a solid’s face selects the solid, a sheet’s face itself; it is lit as the solid’s faces, or the face.
Source§const PICKED_FROM: &'static [&'static str]
const PICKED_FROM: &'static [&'static str]
crate::editing::hit::Scene::pick): its own kind, for an element
drawn as itself.Source§fn select(
reader: &Reader<'_>,
hit: &PickedElement,
) -> Option<ElementReference<NamedModel, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>
hit, of one of Self::PICKED_FROM,
selects, read through reader: hit itself, for an element drawn
as itself; none, for a hit that selects none.Source§fn drawn(
reader: &Reader<'_>,
body: &ElementReference<NamedModel, Self>,
) -> Vec<PickedElement>
fn drawn( reader: &Reader<'_>, body: &ElementReference<NamedModel, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl Target for NamedModel
Every step that builds into the model produces it from the last; it is
kept between processes, exactly, its entities shared between revisions
([crate::kept]).
impl Target for NamedModel
Every step that builds into the model produces it from the last; it is
kept between processes, exactly, its entities shared between revisions
([crate::kept]).
Source§const CHAIN: bool = true
const CHAIN: bool = true
crate::reader::Reader::previous):
the model, the datums, the parameters’ values, the listings — what
a program accumulates. A target that is not a chain — a sketch, a
placed part — has one producer, and a second is an error naming
both.