pub struct LinearPattern;Expand description
Copies the bodies bodies — solids, and sheets by one of their faces —
or the features features in a row along a direction, or in a grid
along two: count instances along each, the bodies or features
themselves the first, each Spacing::Step from the last or spread
evenly over Spacing::Extent.
A feature — a cut, a boss, a hole — is done again at each instance:
its tools copied and combined with the solid it lies on as it combined
them (see [crate::features]), its cosmetic threads copied with it.
The copies are kept as new bodies, or combined as geop_ops_model::Combine says:
joined to, cut from or intersected with the target, the bodies
themselves too unless they are the target — so a tool built as a new
body, patterned and cut from a plate, drills a row of holes. Combined,
the result is named linear_pattern(P) for the operation P.
The copy of each entity named X in the instance i along the first
direction is named linear_pattern(P,i,X) — i counting from 1, the
bodies themselves being 0 — and in the instance i, j of a grid
linear_pattern(P,i.j,X): “copy 3’s top face” is
linear_pattern(P,3,extrude(E,end)) however the bodies change.
Trait Implementations§
Source§impl Clone for LinearPattern
impl Clone for LinearPattern
Source§fn clone(&self) -> LinearPattern
fn clone(&self) -> LinearPattern
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 LinearPattern
Source§impl Debug for LinearPattern
impl Debug for LinearPattern
Source§impl Default for LinearPattern
impl Default for LinearPattern
Source§fn default() -> LinearPattern
fn default() -> LinearPattern
Source§impl<'de> Deserialize<'de> for LinearPattern
impl<'de> Deserialize<'de> for LinearPattern
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 LinearPattern
impl Editable for LinearPattern
const INFO: OperationInfo = <LinearPattern as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<LinearPattern as PartOperation>::Session>
type EditingState = FormState<<LinearPattern 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 LinearPattern
impl ModelOperation for LinearPattern
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &LinearPatternArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &LinearPatternArgs, ) -> 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 LinearPattern
impl Operation for LinearPattern
Source§const KIND: &'static str = <LinearPattern as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <LinearPattern as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <LinearPattern as PartOperation>::Args
type Args = <LinearPattern 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 LinearPattern
impl PartOperation for LinearPattern
Source§fn new_args(_: &Context<'_>) -> LinearPatternArgs
fn new_args(_: &Context<'_>) -> LinearPatternArgs
Three times a unit apart along the origin’s x axis, kept as new
bodies.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &LinearPatternArgs,
_: &FormState<()>,
) -> EditForm<'a, LinearPatternArgs>
fn form<'a>( context: &'a Context<'a>, args: &LinearPatternArgs, _: &FormState<()>, ) -> EditForm<'a, LinearPatternArgs>
The bodies or the features, picked; each direction — the second turned on or off — with its count and spacing, both dragged by handles; and how to combine copies of bodies.
const INFO: OperationInfo
Source§type Args = LinearPatternArgs
type Args = LinearPatternArgs
Source§type Session = ()
type Session = ()
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &LinearPatternArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &LinearPatternArgs) -> GeopResult<()>
ctx (see
StepContext::produce).