layout: move connectivity, band, loose to layout module

This commit is contained in:
Mikolaj Wielgus 2024-01-30 00:43:56 +00:00
parent ca23d45673
commit 43df065120
13 changed files with 39 additions and 29 deletions

View File

@ -2,10 +2,10 @@ use enum_dispatch::enum_dispatch;
use geo::Line;
use crate::{
connectivity::BandIndex,
layout::Layout,
layout::{
bend::BendIndex,
connectivity::BandIndex,
dot::{DotIndex, FixedDotIndex, LooseDotIndex},
geometry::{GetBandIndex, MakePrimitive},
},

View File

@ -1,12 +1,14 @@
use crate::{
use super::{
connectivity::{BandIndex, BandWeight, ConnectivityWeight, GetNet},
loose::{GetNextLoose, LooseIndex},
};
use crate::{
graph::GetNodeIndex,
layout::Layout,
layout::{
dot::{DotIndex, FixedDotIndex},
geometry::{GeometryIndex, MakePrimitive},
},
loose::{GetNextLoose, LooseIndex},
primitive::{GetJoints, GetOtherJoint, MakeShape},
shape::ShapeTrait,
};

View File

@ -1,9 +1,11 @@
use enum_dispatch::enum_dispatch;
use crate::{
connectivity::{BandIndex, ComponentIndex},
graph::{GenericIndex, GetNodeIndex},
layout::Layout,
layout::{
connectivity::{BandIndex, ComponentIndex},
Layout,
},
primitive::{GenericPrimitive, Primitive},
};

View File

@ -2,9 +2,11 @@ use enum_dispatch::enum_dispatch;
use geo::Point;
use crate::{
connectivity::{BandIndex, ComponentIndex},
graph::{GenericIndex, GetNodeIndex},
layout::Layout,
layout::{
connectivity::{BandIndex, ComponentIndex},
Layout,
},
math::Circle,
primitive::{GenericPrimitive, Primitive},
};

View File

@ -9,9 +9,11 @@ use petgraph::{
};
use crate::{
connectivity::{BandIndex, ComponentIndex},
graph::{GenericIndex, GetNodeIndex},
layout::Layout,
layout::{
connectivity::{BandIndex, ComponentIndex},
Layout,
},
math::Circle,
primitive::Primitive,
shape::{BendShape, DotShape, SegShape, Shape},

View File

@ -3,16 +3,16 @@ use enum_dispatch::enum_dispatch;
use geo::Point;
use petgraph::stable_graph::StableDiGraph;
use petgraph::visit::EdgeRef;
use petgraph::Direction::Incoming;
use rstar::primitives::GeomWithData;
use rstar::{RTree, RTreeObject};
use thiserror::Error;
use crate::band::Band;
use crate::connectivity::{
use super::band::Band;
use super::connectivity::{
BandIndex, BandWeight, ComponentIndex, ComponentWeight, ConnectivityGraph, ConnectivityLabel,
ConnectivityWeight, GetNet,
};
use super::loose::{GetNextLoose, Loose, LooseIndex};
use crate::graph::{GenericIndex, GetNodeIndex};
use crate::guide::Guide;
use crate::layout::bend::BendIndex;
@ -27,7 +27,6 @@ use crate::layout::{
},
seg::{FixedSegIndex, FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SeqLooseSegIndex},
};
use crate::loose::{GetNextLoose, Loose, LooseIndex};
use crate::math::NoTangents;
use crate::primitive::{
GenericPrimitive, GetConnectable, GetCore, GetInnerOuter, GetJoints, GetLimbs, GetOtherJoint,

View File

@ -1,7 +1,10 @@
#[macro_use]
pub mod geometry;
pub mod band;
pub mod bend;
pub mod connectivity;
pub mod dot;
pub mod loose;
pub mod seg;
mod layout;

View File

@ -1,9 +1,11 @@
use enum_dispatch::enum_dispatch;
use crate::{
connectivity::{BandIndex, ComponentIndex},
graph::{GenericIndex, GetNodeIndex},
layout::Layout,
layout::{
connectivity::{BandIndex, ComponentIndex},
Layout,
},
primitive::{GenericPrimitive, Primitive},
};

View File

@ -9,13 +9,10 @@ macro_rules! dbg_dot {
}
mod astar;
mod band;
mod connectivity;
mod draw;
mod graph;
mod guide;
mod layout;
mod loose;
mod math;
mod mesh;
mod primitive;
@ -27,9 +24,9 @@ mod tracer;
mod triangulation;
mod wraparoundable;
use connectivity::BandIndex;
use draw::DrawException;
use geo::point;
use layout::connectivity::BandIndex;
use layout::dot::FixedDotWeight;
use layout::geometry::{GeometryIndex, MakePrimitive};
use layout::seg::FixedSegWeight;

View File

@ -1,24 +1,25 @@
use enum_dispatch::enum_dispatch;
use petgraph::stable_graph::NodeIndex;
use petgraph::Direction::{Incoming, Outgoing};
use crate::connectivity::{BandIndex, ComponentIndex, GetNet};
use crate::graph::{GenericIndex, GetNodeIndex};
use crate::layout::dot::DotWeight;
use crate::layout::seg::{
FixedSegIndex, FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SegIndex,
SeqLooseSegIndex, SeqLooseSegWeight,
FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SegIndex, SeqLooseSegIndex,
SeqLooseSegWeight,
};
use crate::layout::Layout;
use crate::layout::{
bend::{BendIndex, FixedBendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
bend::{BendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
geometry::{
GeometryIndex, GeometryLabel, GeometryWeight, GetBandIndex, GetComponentIndex, GetOffset,
GetWidth, MakePrimitive, Retag,
GeometryIndex, GeometryWeight, GetBandIndex, GetComponentIndex, GetOffset, GetWidth,
MakePrimitive, Retag,
},
};
use crate::loose::{Loose, LooseIndex};
use crate::layout::{
connectivity::{BandIndex, ComponentIndex, GetNet},
loose::{Loose, LooseIndex},
Layout,
};
use crate::shape::{Shape, ShapeTrait};

View File

@ -5,11 +5,11 @@ use spade::InsertionError;
use thiserror::Error;
use crate::astar::{astar, AstarStrategy, PathTracker};
use crate::connectivity::BandIndex;
use crate::draw::DrawException;
use crate::guide::HeadTrait;
use crate::layout::Layout;
use crate::layout::{
connectivity::BandIndex,
dot::FixedDotIndex,
geometry::{GeometryIndex, MakePrimitive},
};