pub struct AddSketch3d;Expand description
Adds a sketch in space to the part, named by the operation’s id: points,
lines, arcs through three points and splines through points, with the
constraints of a 3-D sketch (see geop_core_sketch::space). The step
K defines the part’s 3-D sketch K (see sketch3d),
a path as a whole, and builds it as a wire: an edge for every curve
drawn, construction curves aside, and a vertex for every point a curve
of it ends at, every point two curves pass through, and every point that
stands on its own. Points made one by a coincidence are one vertex,
named after the lowest of their ids: the edge of curve c3 is named
sketch3d(K,c3), the vertex of point p1 sketch3d(K,p1). A curve
passing through a point another curve passes through too — a spline
drawn through it, an arc’s middle point — is cut there, into edges named
after the curve and the point each starts at: sketch3d(K,c3,p0),
sketch3d(K,c3,p1). Curves that meet anywhere else, or two points at
one place that are not one, are refused by name (see
geop_core_sketch::space::Sketch3d::check_wire).
What it is given from the part — a point at a vertex or a datum point, a
point on an edge, a line parallel to an axis or a straight edge — is
brought up to date every time it is built (see Reference3d), so the
sketch follows the part.
Trait Implementations§
Source§impl Clone for AddSketch3d
impl Clone for AddSketch3d
Source§fn clone(&self) -> AddSketch3d
fn clone(&self) -> AddSketch3d
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AddSketch3d
Source§impl Debug for AddSketch3d
impl Debug for AddSketch3d
Source§impl Default for AddSketch3d
impl Default for AddSketch3d
Source§fn default() -> AddSketch3d
fn default() -> AddSketch3d
Source§impl<'de> Deserialize<'de> for AddSketch3d
impl<'de> Deserialize<'de> for AddSketch3d
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Editable for AddSketch3d
impl Editable for AddSketch3d
const INFO: OperationInfo = <AddSketch3d as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<AddSketch3d as PartOperation>::Session>
type EditingState = FormState<<AddSketch3d as PartOperation>::Session>
Source§fn new_args(context: &Context<'_>) -> Self::Args
fn new_args(context: &Context<'_>) -> Self::Args
Source§fn presentation(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
) -> Form
fn presentation( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, ) -> Form
Source§fn process_user_event(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
event: Event,
) -> (Self::Args, Self::EditingState)
fn process_user_event( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, event: Event, ) -> (Self::Args, Self::EditingState)
event.Source§impl ModelOperation for AddSketch3d
impl ModelOperation for AddSketch3d
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
_: &AddSketch3dArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, _: &AddSketch3dArgs, ) -> GeopResult<()>
Builds the 3-D sketch the step defined as a wire (see
AddSketch3d).
Source§impl Operation for AddSketch3d
impl Operation for AddSketch3d
Source§const KIND: &'static str = <AddSketch3d as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <AddSketch3d as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <AddSketch3d as PartOperation>::Args
type Args = <AddSketch3d as PartOperation>::Args
Source§fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
ctx (see
StepContext::produce): cheap, since it runs in every run. What
takes work is done in the makes, which run only when what they read
changed.Source§impl PartOperation for AddSketch3d
impl PartOperation for AddSketch3d
Source§fn new_args(_: &Context<'_>) -> AddSketch3dArgs
fn new_args(_: &Context<'_>) -> AddSketch3dArgs
An empty sketch: the first click starts drawing.
Source§fn run(ctx: &mut StepContext<'_>, args: &AddSketch3dArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &AddSketch3dArgs) -> GeopResult<()>
Defines the 3-D sketch named after the step, and builds it as a wire.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &AddSketch3dArgs,
editing: &Sketch3dEditing,
) -> EditForm<'a, AddSketch3dArgs, Sketch3dSession>
fn form<'a>( context: &'a Context<'a>, args: &AddSketch3dArgs, editing: &Sketch3dEditing, ) -> EditForm<'a, AddSketch3dArgs, Sketch3dSession>
The tools, the coordinates of a point, the constraints: see
[crate::editor].
const INFO: OperationInfo
Source§type Args = AddSketch3dArgs
type Args = AddSketch3dArgs
Source§type Session = Sketch3dSession
type Session = Sketch3dSession
() for most.