pub struct Loft;Expand description
Lofts through the profiles of two or more sketches, in order, into a
solid named loft(L) for the operation L — each sketch’s one area, a
single loop — kept as a new body or combined with another solid (see
Combine). Or, as faces (Output::Faces), into faces standing on
their own: through the sketches’ loops, or through open chains of curves
— between two curves, the ruled surface joining them.
Two profiles are joined by ruled walls, more by walls running smoothly
through them all (see geop_lib_sweep::loft). A sketch of a single
point, first or last, is a point the loft comes to: the walls run into
it, as a cone into its apex, the vertex loft(L,K) for the sketch K.
Through its first profile again at the end, it closes on itself: a ring
running smoothly round through three profiles or more, with no caps.
The profiles’ corners
— the sketch points where their curves meet at an angle — are lofted
into each other, in order round the loops, so every profile with
corners needs as many: a D and a triangle are refused, naming both. A
profile without corners, a circle, is lined up as a whole. Between two
corners, the curves are cut alike, each where another profile has a
joint at the same fraction of the way along: a piece X cut gives
X#cut1, X#cut2, …, with the joints X@cut1, …. Sketch points on
the profiles’ loops picked among the LoftArgs::matches say instead
which points are lofted into each other: each profile’s first with the
others’ first, its second with their second, and so on — the curve such
a point lies on split there, its second half named X#P.
Or guide curves (LoftArgs::guides) say which points match: sketches
whose one chain of curves runs from a point of the first profile through
every other to the last. Each guide’s point on each profile is matched,
as a joint K,G of the profile K for the guide G, and between
the profiles the walls follow the guides (see geop_lib_sweep::loft) rather
than run straight.
Named after the first sketch’s elements — X a piece of a curve and P
a joint of the sketch K — and the sketches K, M, … themselves:
loft(L,K,X): the wall fromX—loft(L,K,X,M>N)for the one between the sketchesMandN, when there are more than two;loft(L,K,X,M): the curve of the sketchMthe wallXmeets there;loft(L,K,P)(orloft(L,K,P,M>N)) /loft(L,K,P,M): the edge fromPbetween two profiles, and its vertex onM;loft(L,start)/loft(L,end): the caps, the first and last profile.
Trait Implementations§
impl Copy for Loft
Source§impl<'de> Deserialize<'de> for Loft
impl<'de> Deserialize<'de> for Loft
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 Loft
impl Editable for Loft
const INFO: OperationInfo = <Loft as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<Loft as PartOperation>::Session>
type EditingState = FormState<<Loft 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 Loft
impl ModelOperation for Loft
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &LoftArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &LoftArgs, ) -> 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 Loft
impl Operation for Loft
Source§const KIND: &'static str = <Loft as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <Loft as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <Loft as PartOperation>::Args
type Args = <Loft 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 Loft
impl PartOperation for Loft
Source§fn new_args(context: &Context<'_>) -> LoftArgs
fn new_args(context: &Context<'_>) -> LoftArgs
Through the two newest sketches, joined to the newest solid if there is one.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &LoftArgs,
_: &FormState<()>,
) -> EditForm<'a, LoftArgs>
fn form<'a>( context: &'a Context<'a>, args: &LoftArgs, _: &FormState<()>, ) -> EditForm<'a, LoftArgs>
The sketches, picked in order; the points matched on them, or the guide curves; whether a face; and how to combine.
const INFO: OperationInfo
Source§type Args = LoftArgs
type Args = LoftArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &LoftArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &LoftArgs) -> GeopResult<()>
ctx (see
StepContext::produce).