pub struct DeformBody;Expand description
Tapers, pinches, shears, twists or bends the bodies bodies — solids,
and sheets by one of their faces — about the axis through origin along
axis, over the zone from start to end along it (measured from
origin): in place, every entity keeping its name. Before the zone a
body stays where it is; past it, it is carried on as the zone’s end
leaves it — turned rigidly by a twist or a bend, scaled across the axis
by a taper or a pinch. A shear is affine: one map along the whole axis,
so nothing is divided at the zone’s ends.
Where a body crosses an end of the zone, its faces are first divided
there (as a curve projected onto them divides them), so that each piece
lies on one side. Every curve and surface is then composed with the
deformation on its control points (see
geop_core_geometry::deform): exactly for a taper, to within a proven
bound that widens the result for a twist or a bend. Each surface keeps
its parametrization, so every pcurve stays as it is.
Refused: a zone that does not run forward, a taper to a factor that is not positive, a bend of a whole turn or more or one that would wind material past its centre, and a zone end through a corner of a body that crosses it (move the zone).
Trait Implementations§
Source§impl Clone for DeformBody
impl Clone for DeformBody
Source§fn clone(&self) -> DeformBody
fn clone(&self) -> DeformBody
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 DeformBody
Source§impl Debug for DeformBody
impl Debug for DeformBody
Source§impl Default for DeformBody
impl Default for DeformBody
Source§fn default() -> DeformBody
fn default() -> DeformBody
Source§impl<'de> Deserialize<'de> for DeformBody
impl<'de> Deserialize<'de> for DeformBody
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 DeformBody
impl Editable for DeformBody
const INFO: OperationInfo = <DeformBody as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<DeformBody as PartOperation>::Session>
type EditingState = FormState<<DeformBody 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 DeformBody
impl ModelOperation for DeformBody
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &DeformBodyArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &DeformBodyArgs, ) -> 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 DeformBody
impl Operation for DeformBody
Source§const KIND: &'static str = <DeformBody as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <DeformBody as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <DeformBody as PartOperation>::Args
type Args = <DeformBody 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 DeformBody
impl PartOperation for DeformBody
Source§fn new_args(context: &Context<'_>) -> DeformBodyArgs
fn new_args(context: &Context<'_>) -> DeformBodyArgs
The newest solid, tapered along z over its whole height to half
its width.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &DeformBodyArgs,
_: &FormState<()>,
) -> EditForm<'a, DeformBodyArgs>
fn form<'a>( context: &'a Context<'a>, args: &DeformBodyArgs, _: &FormState<()>, ) -> EditForm<'a, DeformBodyArgs>
The bodies, picked; the deformation, the axis, the zone and the amount — the toward direction for a pinch, a shear or a bend.
const INFO: OperationInfo
Source§type Args = DeformBodyArgs
type Args = DeformBodyArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &DeformBodyArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &DeformBodyArgs) -> GeopResult<()>
ctx (see
StepContext::produce).