pub struct MoveFace;Expand description
Shifts the faces faces of a solid by translation, along the world’s
x, y and z: each is put on its surface shifted, and the solid
rebuilt around them — a face pulled out of a box makes it longer, a
face of a hole shifted moves the hole. A face takes along the faces it
runs smoothly into: the other pieces of a hole’s wall, a fillet along
it. The solid is consumed and the
result named move_face(M) for the operation M; every face, edge and
vertex keeps its name.
Trait Implementations§
impl Copy for MoveFace
Source§impl<'de> Deserialize<'de> for MoveFace
impl<'de> Deserialize<'de> for MoveFace
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Editable for MoveFace
impl Editable for MoveFace
const INFO: OperationInfo = <MoveFace as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<MoveFace as PartOperation>::Session>
type EditingState = FormState<<MoveFace as PartOperation>::Session>
What the editor keeps about a step while it is edited, beyond its
arguments, starting from the default whenever a step is opened.
Source§fn new_args(context: &Context<'_>) -> Self::Args
fn new_args(context: &Context<'_>) -> Self::Args
The arguments of a new step: sensible defaults, taking the part it
is inserted into into account.
Source§fn presentation(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
) -> Form
fn presentation( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, ) -> Form
What the editor shows while the step is edited. Never fails: an
editor needs the form most exactly when the arguments do not build,
so whatever is wrong is said in it.
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)
The step’s arguments and editing state after
event.Source§impl ModelOperation for MoveFace
impl ModelOperation for MoveFace
Source§fn build(
model: &mut NamedModel,
_: &Reader<'_>,
step: &str,
args: &MoveFaceArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, _: &Reader<'_>, step: &str, args: &MoveFaceArgs, ) -> GeopResult<()>
Builds the step
step — what everything it makes is named after —
into model, reading whatever else it builds on through reader,
so the step is rebuilt when that changes.Source§impl Operation for MoveFace
impl Operation for MoveFace
Source§const KIND: &'static str = <MoveFace as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <MoveFace as ::geop_core_editor::part_operation::PartOperation>::KIND
The name programs store its steps under.
Source§type Args = <MoveFace as PartOperation>::Args
type Args = <MoveFace as PartOperation>::Args
What a step of the operation is given. It is saved with the program,
so it names targets and elements, never holds their internal ids.
Source§fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
Declares what the step produces, through
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 MoveFace
impl PartOperation for MoveFace
Source§fn new_args(_: &Context<'_>) -> MoveFaceArgs
fn new_args(_: &Context<'_>) -> MoveFaceArgs
Nothing picked yet, not shifted.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &MoveFaceArgs,
_: &FormState<()>,
) -> EditForm<'a, MoveFaceArgs>
fn form<'a>( context: &'a Context<'a>, args: &MoveFaceArgs, _: &FormState<()>, ) -> EditForm<'a, MoveFaceArgs>
The faces, picked; the shift along each axis, dragged by a gizmo where the faces’ middle is moved to.
Source§fn canvas(
_: &Context<'_>,
edit: Edit<'_, MoveFaceArgs, ()>,
event: &CanvasEvent,
)
fn canvas( _: &Context<'_>, edit: Edit<'_, MoveFaceArgs, ()>, event: &CanvasEvent, )
The gizmo dragged: the shift moved by as much.
const INFO: OperationInfo
Source§type Args = MoveFaceArgs
type Args = MoveFaceArgs
What a step is given. It is saved with the program, so it names
targets and elements, never holds their internal ids.
Source§type Session = ()
type Session = ()
What the editor keeps while a step is edited besides its arguments
and the visuals selected:
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &MoveFaceArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &MoveFaceArgs) -> GeopResult<()>
Declares what the step produces, through
ctx (see
StepContext::produce).Source§fn begin_event(session: &mut Self::Session)
fn begin_event(session: &mut Self::Session)
What the session forgets at the start of every event, before the
event is handled: nothing, by default.
impl StructuralPartialEq for MoveFace
Auto Trait Implementations§
impl Freeze for MoveFace
impl RefUnwindSafe for MoveFace
impl Send for MoveFace
impl Sync for MoveFace
impl Unpin for MoveFace
impl UnsafeUnpin for MoveFace
impl UnwindSafe for MoveFace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more