pub struct MoveBody;Expand description
Moves the bodies bodies — solids, and sheets by one of their faces —
turned by angle degrees about axis, if any (counter-clockwise
looking against it), then shifted by translation. Moved, every entity
keeps its name; with copy, the bodies stay and a moved copy of them is
made, the copy of each entity named X named move(M,X) for the
operation M.
What is moved — the copy, or the bodies themselves — is kept as it is,
or combined as Combine says, the result then named move(M): a copy
joined to the bodies, or the bodies moved into place and cut from
another solid.
Trait Implementations§
impl Copy for MoveBody
Source§impl<'de> Deserialize<'de> for MoveBody
impl<'de> Deserialize<'de> for MoveBody
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 MoveBody
impl Editable for MoveBody
const INFO: OperationInfo = <MoveBody as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<MoveBody as PartOperation>::Session>
type EditingState = FormState<<MoveBody 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 MoveBody
impl ModelOperation for MoveBody
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &MoveBodyArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &MoveBodyArgs, ) -> GeopResult<()>
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 MoveBody
impl Operation for MoveBody
Source§const KIND: &'static str = <MoveBody as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <MoveBody as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <MoveBody as PartOperation>::Args
type Args = <MoveBody 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 MoveBody
impl PartOperation for MoveBody
Source§fn new_args(context: &Context<'_>) -> MoveBodyArgs
fn new_args(context: &Context<'_>) -> MoveBodyArgs
The newest solid, not moved yet.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &MoveBodyArgs,
_: &FormState<()>,
) -> EditForm<'a, MoveBodyArgs>
fn form<'a>( context: &'a Context<'a>, args: &MoveBodyArgs, _: &FormState<()>, ) -> EditForm<'a, MoveBodyArgs>
The bodies, picked; the shift along each axis, dragged by a gizmo where the bodies’ middle is moved to; the axis to turn about and the angle; whether to copy; and how to combine.
Source§fn canvas(
_: &Context<'_>,
edit: Edit<'_, MoveBodyArgs, ()>,
event: &CanvasEvent,
)
fn canvas( _: &Context<'_>, edit: Edit<'_, MoveBodyArgs, ()>, event: &CanvasEvent, )
The gizmo dragged: the shift, as it was when the drag started, moved by as much.
const INFO: OperationInfo
Source§type Args = MoveBodyArgs
type Args = MoveBodyArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &MoveBodyArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &MoveBodyArgs) -> GeopResult<()>
ctx (see
StepContext::produce).