pub struct Sweep;Expand description
Sweeps the areas of a sketch — the profile — along the curves of
another sketch or of a 3-D sketch — the path — into a solid named sweep(W) for the
operation W, kept as a new body or combined with another solid (see
Combine). Or, as faces (Output::Faces), sweeps the profile’s
curves into faces standing on their own — the area’s outline, or a chain
of curves enclosing nothing.
The path is the path sketch’s one chain of curves, or its one loop, which
sweeps a ring, or an edge of the part — a 3-D sketch’s chain runs
through space, and the profile turns with it as little as it can. The
profile travels along it from where it is drawn, square to the path as
it was there (see geop_lib_sweep::sweep_along): draw it
at the start of the path, its plane across it. An open path starts at
its end nearer the profile, a closed one at its joint nearest the
profile. The path is tangent-continuous, except where two lines meet at
an angle, which the sweep mitres.
Named after the profile’s elements — X a piece of a curve and P a
joint of the profile sketch K, as for crate::Extrude — and the
path’s — C a piece of a curve and J a joint of the path sketch L:
sweep(W,K,X,L,C): the faceXsweeps alongC;sweep(W,K,X,L,J):Xwhere the path passesJ;sweep(W,K,P,L,C)/sweep(W,K,P,L,J): the edgePsweeps alongC, and its vertex atJ;sweep(W,start)/sweep(W,end): the caps of an open path.
Along an open path the profile can change as it goes (see
Control): twisted and scaled evenly along the path, or shaped by one
or two guide rails — sketches whose one chain of curves starts on the
profile’s plane, at a point of the profile, and runs along beside the
path: that point of the profile follows the rail, the whole profile
turned and scaled with it. And it can keep facing the way it is drawn
rather than turn with the path (Orientation::FixedNormal).
Trait Implementations§
impl Copy for Sweep
Source§impl<'de> Deserialize<'de> for Sweep
impl<'de> Deserialize<'de> for Sweep
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 Sweep
impl Editable for Sweep
const INFO: OperationInfo = <Sweep as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<Sweep as PartOperation>::Session>
type EditingState = FormState<<Sweep 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 Sweep
impl ModelOperation for Sweep
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &SweepArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &SweepArgs, ) -> 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 Sweep
impl Operation for Sweep
Source§const KIND: &'static str = <Sweep as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <Sweep as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <Sweep as PartOperation>::Args
type Args = <Sweep 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 Sweep
impl PartOperation for Sweep
Source§fn new_args(context: &Context<'_>) -> SweepArgs
fn new_args(context: &Context<'_>) -> SweepArgs
The newest sketch along the sketch before it — joined to the newest solid if there is one.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &SweepArgs,
_: &FormState<()>,
) -> EditForm<'a, SweepArgs>
fn form<'a>( context: &'a Context<'a>, args: &SweepArgs, _: &FormState<()>, ) -> EditForm<'a, SweepArgs>
The profile and the path, picked; the rails, if any; how the profile turns, twists and scales; whether a face; and how to combine.
const INFO: OperationInfo
Source§type Args = SweepArgs
type Args = SweepArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &SweepArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &SweepArgs) -> GeopResult<()>
ctx (see
StepContext::produce).