pub enum EntityRef {
Vertex {
name: String,
},
Edge {
name: String,
},
Face {
name: String,
},
Datum {
name: String,
component: Option<DatumComponent>,
},
Solid {
name: String,
},
Sketch {
name: String,
},
SketchCurve {
sketch: String,
curve: CurveId,
},
SketchPoint {
sketch: String,
point: PointId,
},
}Expand description
Something picked in the viewport, to build on or to use.
Variants§
Vertex
Edge
Face
A face: planar, its plane — normal pointing out of its solid, sketch
origin the world origin’s projection onto it and sketch x the world
axis most parallel to it, projected, so sketches on parallel faces
line up. Round, its axis.
Datum
A datum — or, of a frame, one of its axes or planes (see
geop_core_math::primitives::Datum::component). Every part has
the frame ORIGIN.
Solid
A solid, as a whole.
Sketch
A sketch: its plane.
SketchCurve
A curve of a sketch, by its id in the sketch.
SketchPoint
A point of a sketch, by its id in the sketch.
Implementations§
Source§impl EntityRef
impl EntityRef
Sourcepub fn datum_component(
name: impl Into<String>,
component: DatumComponent,
) -> Self
pub fn datum_component( name: impl Into<String>, component: DatumComponent, ) -> Self
A component of the frame datum name.
Source§impl EntityRef
impl EntityRef
Sourcepub fn resolve_datum<S: Scalar>(&self, part: &Part<S>) -> GeopResult<Datum<S>>
pub fn resolve_datum<S: Scalar>(&self, part: &Part<S>) -> GeopResult<Datum<S>>
The datum it refers to in part — for a component of a frame, that
component as a datum of its own. Fails if it is no datum of the
part.
Sourcepub fn resolve_plane<S: Scalar>(
&self,
part: &Part<S>,
) -> GeopResult<CoordinateSystem<S>>
pub fn resolve_plane<S: Scalar>( &self, part: &Part<S>, ) -> GeopResult<CoordinateSystem<S>>
The plane it lies in, as a frame with u/v a sketch’s x/y on
it and w = u x v its normal: a planar face’s — 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 — a datum plane’s, a frame’s plane’s, or a sketch’s. Fails
for anything else.