diff --git a/src/drawing/cane.rs b/src/drawing/cane.rs index dff077c..f266125 100644 --- a/src/drawing/cane.rs +++ b/src/drawing/cane.rs @@ -1,22 +1,23 @@ -use crate::drawing::{ +use super::{ bend::LooseBendIndex, dot::LooseDotIndex, graph::PrimitiveIndex, primitive::{GetInterior, GetJoints, GetOtherJoint, LooseBend, LooseDot}, + rules::AccessRules, seg::SeqLooseSegIndex, Drawing, }; -use super::rules::AccessRules; - +/// A cane is a sequence consisting of a seg followed by a dot followed by a +/// bend, with the dot joining the seg with the bend as a joint. +/// +/// The name "cane" comes from the iconic cane: a slender walking stick that +/// ends with a round bend that is its handle. Topola's canes are of similar +/// shape. #[derive(Debug, Clone, Copy)] -/// Geometrical structure to define Navigation Cord Head pub struct Cane { - /// Loose segment of the Cane pub seg: SeqLooseSegIndex, - /// Loose dot of the Cane structure pub dot: LooseDotIndex, - /// Bend of the Cane pub bend: LooseBendIndex, } diff --git a/src/drawing/head.rs b/src/drawing/head.rs index ffe2531..88a9e9c 100644 --- a/src/drawing/head.rs +++ b/src/drawing/head.rs @@ -15,13 +15,11 @@ pub trait GetFace { fn face(&self) -> DotIndex; } +/// The head is the working part of the running end of the currently routed +/// band. Both bare and cane heads have a face, which is the fixed dot that +/// terminates the running end. #[enum_dispatch(GetFace)] #[derive(Debug, Clone, Copy)] -/// Defines possible Head objects -/// -/// Head is the working end of routed band, which can be -/// either Bare when nothing has been routed yet, or Cane -/// when routed process has been started pub enum Head { Bare(BareHead), Cane(CaneHead), @@ -33,10 +31,12 @@ impl<'a, CW: Copy, R: AccessRules> MakeRef<'a, HeadRef<'a, CW, R>, Drawing, - /// Type of Navigaction Cord head + /// Head of the routed band. pub head: Head, - /// Width of the cord + /// Width of the routed band. pub width: f64, } diff --git a/src/router/navmesh.rs b/src/router/navmesh.rs index 10f15b3..6ad5050 100644 --- a/src/router/navmesh.rs +++ b/src/router/navmesh.rs @@ -255,7 +255,7 @@ impl Navmesh { trianvertex.into(), ); } - }; + } } for edge in triangulation.edge_references() {