pub struct ScaleBody;Expand description
Scales the bodies bodies — solids, and sheets by one of their faces —
about the point about by factors along the world’s x, y and
z: in place, every entity keeping its name. Exact: a NURBS curve or
surface scaled is its control points scaled, weights and parametrization
kept, so every pcurve stays as it is. Unequal factors make a circle an
ellipse — exactly, as a NURBS. A negative factor mirrors (an odd number
of them turns every face around, so the normals still point out); a
factor of zero is refused.
Trait Implementations§
impl Copy for ScaleBody
Source§impl<'de> Deserialize<'de> for ScaleBody
impl<'de> Deserialize<'de> for ScaleBody
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 ScaleBody
impl Editable for ScaleBody
const INFO: OperationInfo = <ScaleBody as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<ScaleBody as PartOperation>::Session>
type EditingState = FormState<<ScaleBody 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 ScaleBody
impl ModelOperation for ScaleBody
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
_: &str,
args: &ScaleBodyArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, _: &str, args: &ScaleBodyArgs, ) -> 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 ScaleBody
impl Operation for ScaleBody
Source§const KIND: &'static str = <ScaleBody as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <ScaleBody as ::geop_core_editor::part_operation::PartOperation>::KIND
The name programs store its steps under.
Source§type Args = <ScaleBody as PartOperation>::Args
type Args = <ScaleBody 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 ScaleBody
impl PartOperation for ScaleBody
Source§fn new_args(context: &Context<'_>) -> ScaleBodyArgs
fn new_args(context: &Context<'_>) -> ScaleBodyArgs
The newest solid, about the origin, not scaled yet.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &ScaleBodyArgs,
_: &FormState<()>,
) -> EditForm<'a, ScaleBodyArgs>
fn form<'a>( context: &'a Context<'a>, args: &ScaleBodyArgs, _: &FormState<()>, ) -> EditForm<'a, ScaleBodyArgs>
The bodies, picked; the point scaled about and the factors.
const INFO: OperationInfo
Source§type Args = ScaleBodyArgs
type Args = ScaleBodyArgs
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: &ScaleBodyArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &ScaleBodyArgs) -> 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 ScaleBody
Auto Trait Implementations§
impl Freeze for ScaleBody
impl RefUnwindSafe for ScaleBody
impl Send for ScaleBody
impl Sync for ScaleBody
impl Unpin for ScaleBody
impl UnsafeUnpin for ScaleBody
impl UnwindSafe for ScaleBody
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