pub struct BaseFlange;Expand description
Starts a sheet-metal body from a sketch, for the operation B: a solid
named base_flange(B), with the sheet-metal rules every later flange
and the flat pattern of it follow.
- A sketch’s area becomes a plate
thicknessthick, from the sketch’s plane along its normal (against it, ifflip). Its faces arebase_flange(B,plate,a)on the sketch’s plane andbase_flange(B,plate,b)across, and the edge of the area swept by pieceXof sketchK(c3,c3#1) gives the wallbase_flange(B,K,X)and the edgesbase_flange(B,K,X,a)/base_flange(B,K,X,b)around it. - A sketch’s chain of lines and arcs becomes a bent strip, its lines
flat and every corner between two of them a bend of the inner radius
bend_radius— the lines are where the faces would meet if the bends were sharp — every arc, tangent to its lines, a bend of its own radius. The chain is the strip’s A side, the material on its right (seen from the sketch’s normal; its left ifflip), and it runsdepthalong the sketch’s normal. Linec3of sketchKgives the flat facesbase_flange(B,K,c3,a)/(...,b), its edges at either end of the stripbase_flange(B,K,c3,start)/(...,end)and where it ends at pointp2base_flange(B,K,c3,p2); the bend at cornerp2isbase_flange(B,K,p2,a)/(...,b), the one of arcc4base_flange(B,K,c4,...).
Every edge E named so has its wall E if it lies on the sheet’s
outline, and the vertex it starts at is E,v,a / E,v,b (see
crate::thicken).
Trait Implementations§
Source§impl Clone for BaseFlange
impl Clone for BaseFlange
Source§fn clone(&self) -> BaseFlange
fn clone(&self) -> BaseFlange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BaseFlange
Source§impl Debug for BaseFlange
impl Debug for BaseFlange
Source§impl Default for BaseFlange
impl Default for BaseFlange
Source§fn default() -> BaseFlange
fn default() -> BaseFlange
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BaseFlange
impl<'de> Deserialize<'de> for BaseFlange
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 BaseFlange
impl Editable for BaseFlange
const INFO: OperationInfo = <BaseFlange as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<BaseFlange as PartOperation>::Session>
type EditingState = FormState<<BaseFlange 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 BaseFlange
impl ModelOperation for BaseFlange
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
_: &BaseFlangeArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, _: &BaseFlangeArgs, ) -> 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 BaseFlange
impl Operation for BaseFlange
Source§const KIND: &'static str = <BaseFlange as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <BaseFlange as ::geop_core_editor::part_operation::PartOperation>::KIND
The name programs store its steps under.
Source§type Args = <BaseFlange as PartOperation>::Args
type Args = <BaseFlange 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 BaseFlange
impl PartOperation for BaseFlange
Source§fn new_args(context: &Context<'_>) -> BaseFlangeArgs
fn new_args(context: &Context<'_>) -> BaseFlangeArgs
The newest sketch, with the default rules, a unit deep.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &BaseFlangeArgs,
_: &FormState<()>,
) -> EditForm<'a, BaseFlangeArgs>
fn form<'a>( context: &'a Context<'a>, args: &BaseFlangeArgs, _: &FormState<()>, ) -> EditForm<'a, BaseFlangeArgs>
The sketch, picked; for a chain how deep; whether flipped; and the rules.
const INFO: OperationInfo
Source§type Args = BaseFlangeArgs
type Args = BaseFlangeArgs
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: &BaseFlangeArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &BaseFlangeArgs) -> 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.
Source§impl PartialEq for BaseFlange
impl PartialEq for BaseFlange
Source§impl Serialize for BaseFlange
impl Serialize for BaseFlange
impl StructuralPartialEq for BaseFlange
Auto Trait Implementations§
impl Freeze for BaseFlange
impl RefUnwindSafe for BaseFlange
impl Send for BaseFlange
impl Sync for BaseFlange
impl Unpin for BaseFlange
impl UnsafeUnpin for BaseFlange
impl UnwindSafe for BaseFlange
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