pub struct SheetCut;Expand description
Cuts through a sheet-metal body along a sketch, for the operation C:
the body is consumed and rebuilt as sheet_cut(C), every face, edge and
vertex it had keeping its name except those the cut splits or takes
away.
Every area of sketch is projected onto the flat face face, along
its normal, and cut out straight through the sheet: a hole where it
lies inside the face, a notch where it reaches over the face’s outline,
and where it reaches past the face into a bend — and on into the next
flat — it is cut through the bend as the bend lies unrolled, so that
the flat pattern shows it exactly as drawn. The cut is recorded with the
body’s bends: the body still unfolds.
The edges the cut makes are named after the sketch’s pieces: piece X
of sketch K gives sheet_cut(C,K,X) — ...,0, ...,1 along it where
the body’s edges split it — with its edges ...,a and ...,b and its
wall as crate::thicken says. An edge of the body the cut splits
becomes E,0, E,1, … along it.
Refused, by name: a sketch not parallel to the face, an area with a hole in it (whose island would fall out), a cut that crosses an edge at its end, touches one or runs along one, crosses a curve that is no line or arc, splits a face in two or takes one away, or misses the sheet.
Trait Implementations§
impl Copy for SheetCut
Source§impl<'de> Deserialize<'de> for SheetCut
impl<'de> Deserialize<'de> for SheetCut
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 SheetCut
impl Editable for SheetCut
const INFO: OperationInfo = <SheetCut as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<SheetCut as PartOperation>::Session>
type EditingState = FormState<<SheetCut 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 SheetCut
impl ModelOperation for SheetCut
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
_: &SheetCutArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, _: &SheetCutArgs, ) -> 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 SheetCut
impl Operation for SheetCut
Source§const KIND: &'static str = <SheetCut as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <SheetCut as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <SheetCut as PartOperation>::Args
type Args = <SheetCut 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 SheetCut
impl PartOperation for SheetCut
Source§fn new_args(context: &Context<'_>) -> SheetCutArgs
fn new_args(context: &Context<'_>) -> SheetCutArgs
The newest sketch, on the face it lies on.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &SheetCutArgs,
_: &FormState<()>,
) -> EditForm<'a, SheetCutArgs>
fn form<'a>( context: &'a Context<'a>, args: &SheetCutArgs, _: &FormState<()>, ) -> EditForm<'a, SheetCutArgs>
The sketch, picked, and the face, if not the one the sketch lies on.
const INFO: OperationInfo
Source§type Args = SheetCutArgs
type Args = SheetCutArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &SheetCutArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &SheetCutArgs) -> GeopResult<()>
ctx (see
StepContext::produce).