pub struct Revolve;Expand description
Revolves the areas of a sketch around a line in its plane, into a
solid named revolve(R) for the operation R — or combines that with
another solid (see Combine), the result named revolve(R) all the
same. Or, as faces (Output::Faces), sweeps the sketch’s curves into
faces standing on their own — the area’s outline, or a chain of curves
enclosing nothing.
How far it turns is an Extents in degrees: an angle, up to a full
turn, or up to the next face of the solid it is joined to or cut from —
on one side of the sketch’s plane, both alike, or each its own way.
The axis is any line (see RevolveAxis) in the sketch’s plane: a
line of the sketch, of another one, a datum axis, a frame’s axis, a
straight edge. The area, holes and all, lies on one side of it, and touches it
only where the constraints put it on the axis — which must then be a line
of the sketch itself (see Sketch::on_line), typically the axis line
itself. A point there is a pole, swept into nothing but itself, and an
edge there sweeps nothing: a full turn closes the solid over it, a
partial one leaves it the edge between its two caps.
The profile names what it sweeps (see revolve): with X a piece of
a sketch curve and P a joint of the sketch K, as for
crate::Extrude,
revolve(R,K,X,q0),q1, …: the faceXsweeps through each span of at most a quarter turn — four for a full turn — starting from the sketch plane;revolve(R,K,X,a0),a1, …:Xitself at each angle between the spans (a0is the profile where it was drawn, for a turn starting at the sketch plane);revolve(R,K,P,q0).. /revolve(R,K,P,a0)..: the circular edges and verticesPsweeps, andrevolve(R,K,P)for aPon the axis;revolve(R,start)/revolve(R,end): the caps of a partial turn.
A side going up to the next face is built on its own, as for
crate::Extrude.
Trait Implementations§
impl Copy for Revolve
Source§impl<'de> Deserialize<'de> for Revolve
impl<'de> Deserialize<'de> for Revolve
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 Revolve
impl Editable for Revolve
const INFO: OperationInfo = <Revolve as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<Revolve as PartOperation>::Session>
type EditingState = FormState<<Revolve 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 Revolve
impl ModelOperation for Revolve
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &RevolveArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &RevolveArgs, ) -> 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 Revolve
impl Operation for Revolve
Source§const KIND: &'static str = <Revolve as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <Revolve as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <Revolve as PartOperation>::Args
type Args = <Revolve 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 Revolve
impl PartOperation for Revolve
Source§fn new_args(context: &Context<'_>) -> RevolveArgs
fn new_args(context: &Context<'_>) -> RevolveArgs
The newest sketch a full turn, joined to the newest solid if there is one. Which line it turns around is the user’s to pick: a guess at one shows a part they did not ask for, and leaves the question unasked.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &RevolveArgs,
_: &FormState<()>,
) -> EditForm<'a, RevolveArgs>
fn form<'a>( context: &'a Context<'a>, args: &RevolveArgs, _: &FormState<()>, ) -> EditForm<'a, RevolveArgs>
The sketch and the axis, picked; how far; whether a face; and how to combine. Another sketch picked leaves no axis that was a line of the old one: the new one’s is to be picked.
const INFO: OperationInfo
Source§type Args = RevolveArgs
type Args = RevolveArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &RevolveArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &RevolveArgs) -> GeopResult<()>
ctx (see
StepContext::produce).