Skip to main content

NamedModel

Struct NamedModel 

Source
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

Source

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

Source

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).

Source

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).

Source

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.

Source

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.

Source

pub fn reverse_face(&mut self, face_id: FaceId) -> GeopResult<()>

Forwards to geop_core_topology::Model::reverse_face. Creates and deletes nothing.

Source

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.

Source

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.

Source

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.

Source

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).

Source

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).

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn delete_bodies(&mut self, bodies: &[Body]) -> GeopResult<()>

Deletes bodies whole, with every entity in them, forgetting their names.

Source

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.

Source

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

Source

pub fn record_feature_tool(&mut self, step: &str, tool: FeatureTool)

Records tool as one more tool of the feature of the step step.

Source

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.

Source

pub fn features(&self) -> impl Iterator<Item = (&str, &Feature)>

Every feature, by its step, in the order the steps ran.

Source

pub fn feature_faces(&self) -> FeatureFaces<'_>

Which feature made each face, as FeatureFaces::of tells.

Source§

impl NamedModel

Source

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.

Source

pub fn edge_chain(&self, edge: EdgeId) -> GeopResult<Chain<NurbCurve3D>>

The one curve edge is, as a chain named after it and its vertices.

Source

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

Source

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

Source

pub fn new() -> Self

A model with nothing in it.

Source

pub fn topology(&self) -> &Model

The topology, to query. Changing it goes through the model’s own methods, so that names stay in sync.

Source

pub fn names(&self) -> &NameRegistry

Source

pub fn name_of(&self, id: impl Into<RefId>) -> Option<&str>

Source

pub fn name(&self, id: impl Into<RefId>) -> GeopResult<&str>

The name of id — an error, naming the id, if it has none.

Source

pub fn id_of(&self, name: &str) -> Option<RefId>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

pub fn vertex_id(&self, name: &str) -> GeopResult<VertexId>

Source

pub fn edge_id(&self, name: &str) -> GeopResult<EdgeId>

Source

pub fn face_id(&self, name: &str) -> GeopResult<FaceId>

Source

pub fn solid_id(&self, name: &str) -> GeopResult<SolidId>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Every solid’s name, oldest first.

Source

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.

Source

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

Source§

fn clone(&self) -> NamedModel

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 NamedModel

Source§

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

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

impl Default for NamedModel

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl HasElements<Body> for NamedModel

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Body

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<TopologyBody>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Arc

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Arc>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Chain<NurbCurve<4>>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Chain<NurbCurve3D>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = ModelElement<'a, EdgeId>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<ModelElement<'_, EdgeId>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = ChainElement<'a>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<ChainElement<'_>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = ModelElement<'a, FaceId>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<ModelElement<'_, FaceId>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = &'a Feature

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Self::Element<'_>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Axis

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Axis>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = &'a NamedModel

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<&NamedModel>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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.)

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Chain<NurbCurve<4>>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Chain<NurbCurve3D>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = CoordinateSystem

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<CoordinateSystem>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Vector<3>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Vector3>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = Axis

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<Axis>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = ModelElement<'a, SolidId>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<ModelElement<'_, SolidId>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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

Source§

const SINGLETON: Option<&'static str>

The name of the one target of this type a part has, if it has only one — the topology, say: a reference into it is saved as the element’s name alone.
Source§

type Element<'a> = ModelElement<'a, VertexId>

What an element resolves to: a borrow of it, or what it gives.
Source§

fn element(&self, name: &str) -> GeopResult<ModelElement<'_, VertexId>>

The element name, or why there is none.
Source§

fn undefined() -> Option<&'static Self>

What the target reads as where no step made it, if it reads as anything then — the datums every part starts with. None by default: reading it fails.
Source§

fn names_target(name: &str) -> bool

Whether the target named 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.

Source§

const NAME: &'static str = "model"

The kind’s name, as a pick says what it picked: "edge".
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.

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 SelectableElement<NamedModel> for Vertex

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see crate::editing::hit::Scene::pick): its own kind, for an element drawn as itself.
Source§

fn select( _: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Edge

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see crate::editing::hit::Scene::pick): its own kind, for an element drawn as itself.
Source§

fn select( _: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Face

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see crate::editing::hit::Scene::pick): its own kind, for an element drawn as itself.
Source§

fn select( _: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<NamedModel, Self>>

The element a click on 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>

What an editor draws of 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.

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of 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.

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for FeatureElement

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see crate::editing::hit::Scene::pick): its own kind, for an element drawn as itself.
Source§

fn select(reader: &Reader<'_>, hit: &PickedElement) -> Option<FeatureRef>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Point

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Line

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Plane

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Round

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Circle

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Curve

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of element, to light while it is selected: the element itself, by default.
Source§

impl SelectableElement<NamedModel> for Path

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of 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.

Source§

const PICKED_FROM: &'static [&'static str]

The kinds of what an editor draws that a click picks one from (see 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>>

The element a click on 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>

What an editor draws of 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]).

Source§

const CHAIN: bool = true

Whether several steps may produce a target of this type, each from what the steps before left (see 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.
Source§

const KEEPER: Option<Keeper<Self>>

How its values are written to be kept between processes (see crate::kept): none for a target made again in every process — one that is cheap to make, or holds what cannot be written.

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> 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> 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 = 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.