pub struct Route;Expand description
Routes a bundle of wires through points picked in order — from the
connector it starts at, through clips, to the connector it ends at —
as a tangent-continuous chain of lines and arcs (see crate::route),
and sweeps the bundle along it into a solid named route(R) for the
operation R. A route that bends tighter than the bundle may is
refused, naming the waypoints each bend lies between, its radius and
the radius allowed.
What the bundle is cut from is recorded as the cable route(R) of the
part’s cables (see Cable): every wire with its cut length, the
route’s length and a service loop at each end.
The points may be of parts placed in the part: the route follows them wherever their mates put them, rerouted whenever the program runs.
The solid is named like any path sweep (see
geop_lib_sweep::sweep_along): the profile is a
circle of four arcs c0–c3 meeting at p0–p3, the path’s curves
and joints are named as RoutePath says — route(R,c0,a1) is a
quarter of the bundle’s skin along the first arc after the second
waypoint — and its ends are route(R,start) and route(R,end).
Trait Implementations§
impl Copy for Route
Source§impl<'de> Deserialize<'de> for Route
impl<'de> Deserialize<'de> for Route
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 Route
impl Editable for Route
const INFO: OperationInfo = <Route as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<Route as PartOperation>::Session>
type EditingState = FormState<<Route 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 Route
impl ModelOperation for Route
Source§fn build(
model: &mut NamedModel,
reader: &Reader<'_>,
step: &str,
args: &RouteArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, reader: &Reader<'_>, step: &str, args: &RouteArgs, ) -> GeopResult<()>
The points are resolved in the part as the steps before left it.
Source§impl Operation for Route
impl Operation for Route
Source§const KIND: &'static str = <Route as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <Route as ::geop_core_editor::part_operation::PartOperation>::KIND
Source§type Args = <Route as PartOperation>::Args
type Args = <Route 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 Route
impl PartOperation for Route
Source§fn new_args(_: &Context<'_>) -> RouteArgs
fn new_args(_: &Context<'_>) -> RouteArgs
Nothing picked yet; one hookup wire, filling three quarters of the bundle, bent no tighter than five diameters.
Source§fn run(ctx: &mut StepContext<'_>, args: &RouteArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &RouteArgs) -> GeopResult<()>
Sweeps the bundle, then records its cable, and notes the bundle.
const INFO: OperationInfo
Source§type Args = RouteArgs
type Args = RouteArgs
Source§type Session = RouteSession
type Session = RouteSession
() for most.