pub struct FlatPattern;Expand description
Unfolds the sheet-metal body named solid into its flat pattern, for
the operation P: every bend laid flat as a strip as wide as its
developed length (angle * (radius + k_factor * thickness), see
crate::SheetMetalRules), every flat face moved with it, the body’s
first face where it was. The flat body is the solid flat_pattern(P),
and each of its entities is named after the one it is the unfolded
copy of, flat_pattern(P,X) for X — so a bend’s faces are
flat_pattern(P,X,a) for its faces X,a, and the lines it is bent
along the edges between it and its flat faces. The body is replaced by
its flat pattern unless keep.
The bend lines — down the middle of each bend’s strip — are also the
sketch flat_pattern(P,bend_lines), on the flat pattern’s A side, one
line per bend in the order the bends were made; and what each bend is
is recorded for the flat body as FlatPatternData (see
crate::body::sheets).
Only a body whose bends were recorded as it was built — by a base flange and its flanges — unfolds, and only while it is still made of just the faces they built: a body some other step has changed is refused, naming the faces that are not sheet metal.
Trait Implementations§
Source§impl Clone for FlatPattern
impl Clone for FlatPattern
Source§fn clone(&self) -> FlatPattern
fn clone(&self) -> FlatPattern
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 FlatPattern
Source§impl Debug for FlatPattern
impl Debug for FlatPattern
Source§impl Default for FlatPattern
impl Default for FlatPattern
Source§fn default() -> FlatPattern
fn default() -> FlatPattern
Source§impl<'de> Deserialize<'de> for FlatPattern
impl<'de> Deserialize<'de> for FlatPattern
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 FlatPattern
impl Editable for FlatPattern
const INFO: OperationInfo = <FlatPattern as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<FlatPattern as PartOperation>::Session>
type EditingState = FormState<<FlatPattern 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 FlatPattern
impl ModelOperation for FlatPattern
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
_: &FlatPatternArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, _: &FlatPatternArgs, ) -> 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 FlatPattern
impl Operation for FlatPattern
Source§const KIND: &'static str = <FlatPattern as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <FlatPattern as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <FlatPattern as PartOperation>::Args
type Args = <FlatPattern 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 FlatPattern
impl PartOperation for FlatPattern
Source§fn new_args(context: &Context<'_>) -> FlatPatternArgs
fn new_args(context: &Context<'_>) -> FlatPatternArgs
The newest sheet-metal body.
Source§fn run(ctx: &mut StepContext<'_>, args: &FlatPatternArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &FlatPatternArgs) -> GeopResult<()>
Unfolds the body, and draws its bend lines as a sketch.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &FlatPatternArgs,
_: &FormState<()>,
) -> EditForm<'a, FlatPatternArgs>
fn form<'a>( context: &'a Context<'a>, args: &FlatPatternArgs, _: &FormState<()>, ) -> EditForm<'a, FlatPatternArgs>
The body, picked, and whether to keep it.
const INFO: OperationInfo
Source§type Args = FlatPatternArgs
type Args = FlatPatternArgs
Source§type Session = ()
type Session = ()
() for most.