pub struct PlacedSketch {
pub name: String,
pub plane: CoordinateSystem,
pub sketch: Sketch,
}Expand description
A sketch together with the plane it lies on: plane.u/plane.v are
the sketch’s x/y (unit, orthogonal), plane.w = u x v its unit
normal — and its name, the id of the step that drew it, which what is
built from it is named after.
The plane is resolved once, when the sketch is added — a sketch drawn on a face stays where that face was, even after a later operation reshapes or consumes the face.
Fields§
§name: String§plane: CoordinateSystem§sketch: SketchImplementations§
Source§impl PlacedSketch
impl PlacedSketch
Sourcepub fn curve_in_space(
&self,
curve: CurveId,
geometry: &Enclosure,
) -> GeopResult<NurbCurve3D>
pub fn curve_in_space( &self, curve: CurveId, geometry: &Enclosure, ) -> GeopResult<NurbCurve3D>
The curve curve of the sketch where its plane puts it: one NURBS
from its start to its end — a circle round from its seam — of the
sketch solved as geometry says (see Sketch::enclose).
Sourcepub fn path(&self) -> GeopResult<Chain<NurbCurve3D>>
pub fn path(&self) -> GeopResult<Chain<NurbCurve3D>>
The sketch’s one open chain of curves, or its one loop, in space, as a path runs along it: its pieces and joints named as a profile’s are. Fails for a sketch of more than one loop.
Sourcepub fn runs(&self) -> GeopResult<Vec<Profile>>
pub fn runs(&self) -> GeopResult<Vec<Profile>>
Every run of the sketch’s curves (see Sketch::runs) as a chain on
its plane, named after the sketch and its elements (see
chain_of_pieces). Where three or more curves meet, the runs share a
point but each has a name of its own for it: K,p2 for the first run
there, K,p2,c5 for the run starting with the curve c5.
Sourcepub fn curve_chain(&self, curve: CurveId) -> GeopResult<Chain<NurbCurve3D>>
pub fn curve_chain(&self, curve: CurveId) -> GeopResult<Chain<NurbCurve3D>>
The curve curve of the sketch, in space, as a chain of one curve
named after the sketch and it, its ends after the points there — a
closed one’s K,c3,seam.
Source§impl PlacedSketch
impl PlacedSketch
Trait Implementations§
Source§impl Clone for PlacedSketch
impl Clone for PlacedSketch
Source§fn clone(&self) -> PlacedSketch
fn clone(&self) -> PlacedSketch
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 PlacedSketch
impl Debug for PlacedSketch
Source§impl HasElements<Circle> for PlacedSketch
impl HasElements<Circle> for PlacedSketch
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 PlacedSketch
impl HasElements<Curve> for PlacedSketch
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 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 PlacedSketch
impl HasElements<Line> for PlacedSketch
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 PlacedSketch
impl HasElements<Path> for PlacedSketch
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 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<PlacedSketch> for PlacedSketch
impl HasElements<PlacedSketch> for PlacedSketch
Source§type Element<'a> = &'a PlacedSketch
type Element<'a> = &'a PlacedSketch
Source§fn element(&self, name: &str) -> GeopResult<&PlacedSketch>
fn element(&self, name: &str) -> GeopResult<&PlacedSketch>
name, or why there is none.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 PlacedSketch
impl HasElements<Plane> for PlacedSketch
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 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 PlacedSketch
impl HasElements<Point> for PlacedSketch
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 PlacedSketch
impl HasElements<Round> for PlacedSketch
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 PlacedSketch
Read whole: what is swept, as its regions or its curves.
impl Kind for PlacedSketch
Read whole: what is swept, as its regions or its curves.
Source§impl PartialEq for PlacedSketch
impl PartialEq for PlacedSketch
Source§impl SelectableElement<PlacedSketch> for PlacedSketch
impl SelectableElement<PlacedSketch> for PlacedSketch
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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Plane
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Path
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Point
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Line
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Circle
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Round
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.Source§impl SelectableElement<PlacedSketch> for Curve
impl SelectableElement<PlacedSketch> 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<PlacedSketch, Self>>
fn select( reader: &Reader<'_>, hit: &PickedElement, ) -> Option<ElementReference<PlacedSketch, 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<'_>,
element: &ElementReference<PlacedSketch, Self>,
) -> Vec<PickedElement>
fn drawn( _: &Reader<'_>, element: &ElementReference<PlacedSketch, Self>, ) -> Vec<PickedElement>
element, to light while it is selected:
the element itself, by default.impl StructuralPartialEq for PlacedSketch
Source§impl Target for PlacedSketch
Produced once, by the step that draws it.
impl Target for PlacedSketch
Produced once, by the step that draws it.
Source§const CHAIN: bool = false
const CHAIN: bool = false
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.