mirror of https://codeberg.org/topola/topola.git
layout: move `GeometryIndex` and `GeometryWeight` to own file
This commit is contained in:
parent
43df065120
commit
8b1d95491d
|
|
@ -7,12 +7,12 @@ use crate::{
|
|||
layout::{
|
||||
bend::{BendIndex, LooseBendWeight},
|
||||
dot::{DotIndex, FixedDotIndex, LooseDotIndex, LooseDotWeight},
|
||||
geometry::{GetBandIndex, MakePrimitive},
|
||||
graph::{GetBandIndex, MakePrimitive},
|
||||
primitive::GetOtherJoint,
|
||||
seg::{LoneLooseSegWeight, SeqLooseSegWeight},
|
||||
},
|
||||
layout::{Infringement, Layout, LayoutException},
|
||||
math::{Circle, NoTangents},
|
||||
primitive::GetOtherJoint,
|
||||
rules::{Conditions, Rules},
|
||||
wraparoundable::WraparoundableIndex,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ use crate::{
|
|||
bend::BendIndex,
|
||||
connectivity::BandIndex,
|
||||
dot::{DotIndex, FixedDotIndex, LooseDotIndex},
|
||||
geometry::{GetBandIndex, MakePrimitive},
|
||||
graph::{GetBandIndex, MakePrimitive},
|
||||
primitive::{GetCore, GetInnerOuter, GetOtherJoint, GetWeight, MakeShape},
|
||||
},
|
||||
math::{self, Circle, NoTangents},
|
||||
primitive::{GetCore, GetInnerOuter, GetOtherJoint, GetWeight, MakeShape},
|
||||
rules::{Conditions, Rules},
|
||||
segbend::Segbend,
|
||||
shape::{Shape, ShapeTrait},
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ use super::{
|
|||
};
|
||||
use crate::{
|
||||
graph::GetNodeIndex,
|
||||
layout::Layout,
|
||||
layout::{
|
||||
dot::{DotIndex, FixedDotIndex},
|
||||
geometry::{GeometryIndex, MakePrimitive},
|
||||
},
|
||||
graph::{GeometryIndex, MakePrimitive},
|
||||
primitive::{GetJoints, GetOtherJoint, MakeShape},
|
||||
Layout,
|
||||
},
|
||||
shape::ShapeTrait,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ use crate::{
|
|||
graph::{GenericIndex, GetNodeIndex},
|
||||
layout::{
|
||||
connectivity::{BandIndex, ComponentIndex},
|
||||
Layout,
|
||||
geometry::{BendWeightTrait, GetOffset, GetWidth},
|
||||
graph::{
|
||||
GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, GetComponentIndexMut,
|
||||
MakePrimitive, Retag,
|
||||
},
|
||||
primitive::{GenericPrimitive, Primitive},
|
||||
};
|
||||
|
||||
use super::geometry::{
|
||||
BendWeightTrait, GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex,
|
||||
GetComponentIndexMut, GetOffset, GetWidth, MakePrimitive, Retag,
|
||||
Layout,
|
||||
},
|
||||
};
|
||||
|
||||
use petgraph::stable_graph::NodeIndex;
|
||||
|
|
|
|||
|
|
@ -5,16 +5,17 @@ use crate::{
|
|||
graph::{GenericIndex, GetNodeIndex},
|
||||
layout::{
|
||||
connectivity::{BandIndex, ComponentIndex},
|
||||
geometry::{DotWeightTrait, GetPos, GetWidth},
|
||||
graph::{
|
||||
GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, GetComponentIndexMut,
|
||||
MakePrimitive, Retag,
|
||||
},
|
||||
primitive::{GenericPrimitive, Primitive},
|
||||
Layout,
|
||||
},
|
||||
math::Circle,
|
||||
primitive::{GenericPrimitive, Primitive},
|
||||
};
|
||||
|
||||
use super::geometry::{
|
||||
DotWeightTrait, GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex,
|
||||
GetComponentIndexMut, GetPos, GetWidth, MakePrimitive, Retag,
|
||||
};
|
||||
use petgraph::stable_graph::NodeIndex;
|
||||
|
||||
#[enum_dispatch(GetNodeIndex, MakePrimitive)]
|
||||
|
|
|
|||
|
|
@ -11,41 +11,14 @@ use petgraph::{
|
|||
use crate::{
|
||||
graph::{GenericIndex, GetNodeIndex},
|
||||
layout::{
|
||||
connectivity::{BandIndex, ComponentIndex},
|
||||
Layout,
|
||||
bend::{BendWeight, FixedBendWeight, LooseBendWeight},
|
||||
dot::{DotWeight, FixedDotWeight, LooseDotWeight},
|
||||
graph::{GeometryWeight, Retag},
|
||||
},
|
||||
math::Circle,
|
||||
primitive::Primitive,
|
||||
shape::{BendShape, DotShape, SegShape, Shape},
|
||||
};
|
||||
|
||||
use super::super::{
|
||||
bend::{FixedBendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
|
||||
dot::{FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||
seg::{
|
||||
FixedSegIndex, FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SeqLooseSegIndex,
|
||||
SeqLooseSegWeight,
|
||||
},
|
||||
};
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait Retag<GeometryIndex> {
|
||||
fn retag(&self, index: NodeIndex<usize>) -> GeometryIndex;
|
||||
}
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait GetComponentIndex {
|
||||
fn component(&self) -> ComponentIndex;
|
||||
}
|
||||
|
||||
pub trait GetComponentIndexMut {
|
||||
fn component_mut(&mut self) -> &mut ComponentIndex;
|
||||
}
|
||||
|
||||
pub trait GetBandIndex {
|
||||
fn band(&self) -> BandIndex;
|
||||
}
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait GetPos {
|
||||
fn pos(&self) -> Point;
|
||||
|
|
@ -61,78 +34,6 @@ pub trait GetOffset {
|
|||
fn offset(&self) -> f64;
|
||||
}
|
||||
|
||||
macro_rules! impl_weight {
|
||||
($weight_struct:ident, $weight_variant:ident, $index_struct:ident) => {
|
||||
impl Retag<GeometryIndex> for $weight_struct {
|
||||
fn retag(&self, index: NodeIndex<usize>) -> GeometryIndex {
|
||||
GeometryIndex::$weight_variant($index_struct::new(index))
|
||||
}
|
||||
}
|
||||
|
||||
pub type $index_struct = GenericIndex<$weight_struct>;
|
||||
|
||||
impl MakePrimitive for $index_struct {
|
||||
fn primitive<'a>(&self, layout: &'a Layout) -> Primitive<'a> {
|
||||
Primitive::$weight_variant(GenericPrimitive::new(*self, layout))
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! impl_fixed_weight {
|
||||
($weight_struct:ident, $weight_variant:ident, $index_struct:ident) => {
|
||||
impl_weight!($weight_struct, $weight_variant, $index_struct);
|
||||
|
||||
impl GetComponentIndex for $weight_struct {
|
||||
fn component(&self) -> ComponentIndex {
|
||||
self.component
|
||||
}
|
||||
}
|
||||
|
||||
impl GetComponentIndexMut for $weight_struct {
|
||||
fn component_mut(&mut self) -> &mut ComponentIndex {
|
||||
&mut self.component
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! impl_loose_weight {
|
||||
($weight_struct:ident, $weight_variant:ident, $index_struct:ident) => {
|
||||
impl_weight!($weight_struct, $weight_variant, $index_struct);
|
||||
|
||||
impl GetBandIndex for $weight_struct {
|
||||
fn band(&self) -> BandIndex {
|
||||
self.band
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[enum_dispatch(GetNodeIndex, MakePrimitive)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum GeometryIndex {
|
||||
FixedDot(FixedDotIndex),
|
||||
LooseDot(LooseDotIndex),
|
||||
FixedSeg(FixedSegIndex),
|
||||
LoneLooseSeg(LoneLooseSegIndex),
|
||||
SeqLooseSeg(SeqLooseSegIndex),
|
||||
FixedBend(FixedBendIndex),
|
||||
LooseBend(LooseBendIndex),
|
||||
}
|
||||
|
||||
#[enum_dispatch(GetWidth, Retag<GeometryIndex>)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum GeometryWeight {
|
||||
FixedDot(FixedDotWeight),
|
||||
LooseDot(LooseDotWeight),
|
||||
FixedSeg(FixedSegWeight),
|
||||
LoneLooseSeg(LoneLooseSegWeight),
|
||||
SeqLooseSeg(SeqLooseSegWeight),
|
||||
FixedBend(FixedBendWeight),
|
||||
LooseBend(LooseBendWeight),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum GeometryLabel {
|
||||
Connection,
|
||||
|
|
@ -140,11 +41,6 @@ pub enum GeometryLabel {
|
|||
Core,
|
||||
}
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait MakePrimitive {
|
||||
fn primitive<'a>(&self, layout: &'a Layout) -> Primitive<'a>;
|
||||
}
|
||||
|
||||
pub trait DotWeightTrait<GW>: GetPos + GetWidth + Into<GW> + Copy {}
|
||||
pub trait SegWeightTrait<GW>: GetWidth + Into<GW> + Copy {}
|
||||
pub trait BendWeightTrait<GW>: GetOffset + GetWidth + Into<GW> + Copy {}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,116 @@
|
|||
use enum_dispatch::enum_dispatch;
|
||||
|
||||
use petgraph::stable_graph::NodeIndex;
|
||||
|
||||
use crate::{
|
||||
graph::GetNodeIndex,
|
||||
layout::{
|
||||
connectivity::{BandIndex, ComponentIndex},
|
||||
Layout,
|
||||
},
|
||||
};
|
||||
|
||||
use super::{
|
||||
bend::{FixedBendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
|
||||
dot::{FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||
primitive::Primitive,
|
||||
seg::{
|
||||
FixedSegIndex, FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SeqLooseSegIndex,
|
||||
SeqLooseSegWeight,
|
||||
},
|
||||
};
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait Retag<GeometryIndex> {
|
||||
fn retag(&self, index: NodeIndex<usize>) -> GeometryIndex;
|
||||
}
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait GetComponentIndex {
|
||||
fn component(&self) -> ComponentIndex;
|
||||
}
|
||||
|
||||
pub trait GetComponentIndexMut {
|
||||
fn component_mut(&mut self) -> &mut ComponentIndex;
|
||||
}
|
||||
|
||||
pub trait GetBandIndex {
|
||||
fn band(&self) -> BandIndex;
|
||||
}
|
||||
|
||||
#[enum_dispatch]
|
||||
pub trait MakePrimitive {
|
||||
fn primitive<'a>(&self, layout: &'a Layout) -> Primitive<'a>;
|
||||
}
|
||||
|
||||
macro_rules! impl_weight {
|
||||
($weight_struct:ident, $weight_variant:ident, $index_struct:ident) => {
|
||||
impl Retag<GeometryIndex> for $weight_struct {
|
||||
fn retag(&self, index: NodeIndex<usize>) -> GeometryIndex {
|
||||
GeometryIndex::$weight_variant($index_struct::new(index))
|
||||
}
|
||||
}
|
||||
|
||||
pub type $index_struct = GenericIndex<$weight_struct>;
|
||||
|
||||
impl MakePrimitive for $index_struct {
|
||||
fn primitive<'a>(&self, layout: &'a Layout) -> Primitive<'a> {
|
||||
Primitive::$weight_variant(GenericPrimitive::new(*self, layout))
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! impl_fixed_weight {
|
||||
($weight_struct:ident, $weight_variant:ident, $index_struct:ident) => {
|
||||
impl_weight!($weight_struct, $weight_variant, $index_struct);
|
||||
|
||||
impl GetComponentIndex for $weight_struct {
|
||||
fn component(&self) -> ComponentIndex {
|
||||
self.component
|
||||
}
|
||||
}
|
||||
|
||||
impl GetComponentIndexMut for $weight_struct {
|
||||
fn component_mut(&mut self) -> &mut ComponentIndex {
|
||||
&mut self.component
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! impl_loose_weight {
|
||||
($weight_struct:ident, $weight_variant:ident, $index_struct:ident) => {
|
||||
impl_weight!($weight_struct, $weight_variant, $index_struct);
|
||||
|
||||
impl GetBandIndex for $weight_struct {
|
||||
fn band(&self) -> BandIndex {
|
||||
self.band
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[enum_dispatch(GetNodeIndex, MakePrimitive)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum GeometryIndex {
|
||||
FixedDot(FixedDotIndex),
|
||||
LooseDot(LooseDotIndex),
|
||||
FixedSeg(FixedSegIndex),
|
||||
LoneLooseSeg(LoneLooseSegIndex),
|
||||
SeqLooseSeg(SeqLooseSegIndex),
|
||||
FixedBend(FixedBendIndex),
|
||||
LooseBend(LooseBendIndex),
|
||||
}
|
||||
|
||||
#[enum_dispatch(GetWidth, Retag<GeometryIndex>)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum GeometryWeight {
|
||||
FixedDot(FixedDotWeight),
|
||||
LooseDot(LooseDotWeight),
|
||||
FixedSeg(FixedSegWeight),
|
||||
LoneLooseSeg(LoneLooseSegWeight),
|
||||
SeqLooseSeg(SeqLooseSegWeight),
|
||||
FixedBend(FixedBendWeight),
|
||||
LooseBend(LooseBendWeight),
|
||||
}
|
||||
|
|
@ -17,21 +17,23 @@ use crate::graph::{GenericIndex, GetNodeIndex};
|
|||
use crate::guide::Guide;
|
||||
use crate::layout::bend::BendIndex;
|
||||
use crate::layout::dot::DotWeight;
|
||||
use crate::layout::geometry::{BendWeightTrait, DotWeightTrait, Geometry, SegWeightTrait};
|
||||
use crate::layout::seg::{SegIndex, SeqLooseSegWeight};
|
||||
use crate::layout::geometry::{
|
||||
BendWeightTrait, DotWeightTrait, Geometry, GeometryLabel, SegWeightTrait,
|
||||
};
|
||||
use crate::layout::{
|
||||
bend::{FixedBendIndex, LooseBendIndex, LooseBendWeight},
|
||||
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||
geometry::{
|
||||
GeometryIndex, GeometryLabel, GeometryWeight, GetComponentIndex, MakePrimitive, Retag,
|
||||
graph::{GeometryIndex, GeometryWeight, GetComponentIndex, MakePrimitive, Retag},
|
||||
primitive::{
|
||||
GenericPrimitive, GetConnectable, GetCore, GetInnerOuter, GetJoints, GetLimbs,
|
||||
GetOtherJoint, GetWeight, MakeShape,
|
||||
},
|
||||
seg::{
|
||||
FixedSegIndex, FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SegIndex,
|
||||
SeqLooseSegIndex, SeqLooseSegWeight,
|
||||
},
|
||||
seg::{FixedSegIndex, FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SeqLooseSegIndex},
|
||||
};
|
||||
use crate::math::NoTangents;
|
||||
use crate::primitive::{
|
||||
GenericPrimitive, GetConnectable, GetCore, GetInnerOuter, GetJoints, GetLimbs, GetOtherJoint,
|
||||
GetWeight, MakeShape,
|
||||
};
|
||||
use crate::segbend::Segbend;
|
||||
use crate::shape::{Shape, ShapeTrait};
|
||||
use crate::wraparoundable::{GetWraparound, Wraparoundable, WraparoundableIndex};
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ use crate::{
|
|||
layout::{
|
||||
bend::LooseBendIndex,
|
||||
dot::{DotIndex, LooseDotIndex},
|
||||
geometry::{GeometryIndex, MakePrimitive},
|
||||
graph::{GeometryIndex, MakePrimitive},
|
||||
primitive::{GetJoints, LoneLooseSeg, LooseBend, LooseDot, Primitive, SeqLooseSeg},
|
||||
seg::{LoneLooseSegIndex, SeqLooseSegIndex},
|
||||
},
|
||||
primitive::{GetJoints, LoneLooseSeg, LooseBend, LooseDot, Primitive, SeqLooseSeg},
|
||||
};
|
||||
|
||||
#[enum_dispatch]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
#[macro_use]
|
||||
pub mod geometry;
|
||||
pub mod graph;
|
||||
pub mod band;
|
||||
pub mod bend;
|
||||
pub mod connectivity;
|
||||
pub mod dot;
|
||||
pub mod geometry;
|
||||
pub mod loose;
|
||||
pub mod primitive;
|
||||
pub mod seg;
|
||||
|
||||
mod layout;
|
||||
|
|
|
|||
|
|
@ -9,14 +9,10 @@ use crate::layout::seg::{
|
|||
};
|
||||
use crate::layout::{
|
||||
bend::{BendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
|
||||
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||
geometry::{
|
||||
GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, GetOffset, GetWidth,
|
||||
MakePrimitive, Retag,
|
||||
},
|
||||
};
|
||||
use crate::layout::{
|
||||
connectivity::{BandIndex, ComponentIndex, GetNet},
|
||||
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||
geometry::{GetOffset, GetWidth},
|
||||
graph::{GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, MakePrimitive, Retag},
|
||||
loose::{Loose, LooseIndex},
|
||||
Layout,
|
||||
};
|
||||
|
|
@ -4,15 +4,16 @@ use crate::{
|
|||
graph::{GenericIndex, GetNodeIndex},
|
||||
layout::{
|
||||
connectivity::{BandIndex, ComponentIndex},
|
||||
Layout,
|
||||
geometry::{GetWidth, SegWeightTrait},
|
||||
graph::{
|
||||
GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, GetComponentIndexMut,
|
||||
MakePrimitive, Retag,
|
||||
},
|
||||
primitive::{GenericPrimitive, Primitive},
|
||||
Layout,
|
||||
},
|
||||
};
|
||||
|
||||
use super::geometry::{
|
||||
GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, GetComponentIndexMut, GetWidth,
|
||||
MakePrimitive, Retag, SegWeightTrait,
|
||||
};
|
||||
use petgraph::stable_graph::NodeIndex;
|
||||
|
||||
#[enum_dispatch(GetNodeIndex, MakePrimitive)]
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ mod astar;
|
|||
mod draw;
|
||||
mod graph;
|
||||
mod guide;
|
||||
#[macro_use]
|
||||
mod layout;
|
||||
mod math;
|
||||
mod mesh;
|
||||
mod primitive;
|
||||
mod router;
|
||||
mod rules;
|
||||
mod segbend;
|
||||
|
|
@ -28,12 +28,12 @@ use draw::DrawException;
|
|||
use geo::point;
|
||||
use layout::connectivity::BandIndex;
|
||||
use layout::dot::FixedDotWeight;
|
||||
use layout::geometry::{GeometryIndex, MakePrimitive};
|
||||
use layout::graph::{GeometryIndex, MakePrimitive};
|
||||
use layout::primitive::MakeShape;
|
||||
use layout::seg::FixedSegWeight;
|
||||
use layout::{Infringement, Layout, LayoutException};
|
||||
use mesh::{Mesh, MeshEdgeReference, VertexIndex};
|
||||
use petgraph::visit::{EdgeRef, IntoEdgeReferences};
|
||||
use primitive::MakeShape;
|
||||
use router::RouterObserver;
|
||||
|
||||
use sdl2::event::Event;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use petgraph::visit::{self, NodeIndexable};
|
|||
use petgraph::{stable_graph::NodeIndex, visit::EdgeRef};
|
||||
use spade::{HasPosition, InsertionError, Point2};
|
||||
|
||||
use crate::primitive::{GetCore, Primitive};
|
||||
use crate::triangulation::TriangulationEdgeReference;
|
||||
use crate::{
|
||||
graph::GetNodeIndex,
|
||||
|
|
@ -15,9 +14,9 @@ use crate::{
|
|||
layout::{
|
||||
bend::{FixedBendIndex, LooseBendIndex},
|
||||
dot::FixedDotIndex,
|
||||
geometry::{GeometryIndex, MakePrimitive},
|
||||
graph::{GeometryIndex, MakePrimitive},
|
||||
primitive::{GetCore, MakeShape, Primitive},
|
||||
},
|
||||
primitive::MakeShape,
|
||||
shape::ShapeTrait,
|
||||
triangulation::{GetVertexIndex, Triangulation},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ use crate::layout::Layout;
|
|||
use crate::layout::{
|
||||
connectivity::BandIndex,
|
||||
dot::FixedDotIndex,
|
||||
geometry::{GeometryIndex, MakePrimitive},
|
||||
graph::{GeometryIndex, MakePrimitive},
|
||||
primitive::MakeShape,
|
||||
};
|
||||
|
||||
use crate::mesh::{Mesh, MeshEdgeReference, VertexIndex};
|
||||
|
||||
use crate::primitive::MakeShape;
|
||||
use crate::rules::Rules;
|
||||
use crate::shape::ShapeTrait;
|
||||
use crate::tracer::{Trace, Tracer};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use crate::{
|
||||
layout::Layout,
|
||||
layout::{
|
||||
bend::LooseBendIndex, dot::LooseDotIndex, geometry::GeometryIndex, seg::SeqLooseSegIndex,
|
||||
},
|
||||
use crate::layout::{
|
||||
bend::LooseBendIndex,
|
||||
dot::LooseDotIndex,
|
||||
graph::GeometryIndex,
|
||||
primitive::{GetInterior, GetJoints, GetOtherJoint, LooseBend, LooseDot},
|
||||
seg::SeqLooseSegIndex,
|
||||
Layout,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@ use petgraph::stable_graph::NodeIndex;
|
|||
|
||||
use crate::{
|
||||
graph::GetNodeIndex,
|
||||
layout::Layout,
|
||||
layout::{
|
||||
bend::{BendIndex, FixedBendIndex, LooseBendIndex},
|
||||
dot::FixedDotIndex,
|
||||
geometry::{GeometryIndex, MakePrimitive},
|
||||
},
|
||||
graph::{GeometryIndex, MakePrimitive},
|
||||
primitive::{
|
||||
FixedBend, FixedDot, GetFirstRail, GetInnerOuter, GetLayout, LooseBend, Primitive,
|
||||
},
|
||||
Layout,
|
||||
},
|
||||
};
|
||||
|
||||
#[enum_dispatch]
|
||||
|
|
|
|||
Loading…
Reference in New Issue