mirror of https://codeberg.org/topola/topola.git
layout: move guide, segbend files to layout module
This commit is contained in:
parent
847309adae
commit
01d285efb0
|
|
@ -3,11 +3,11 @@ use geo::{EuclideanLength, Point};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
guide::{Guide, Head, HeadTrait, SegbendHead},
|
|
||||||
layout::{
|
layout::{
|
||||||
bend::{BendIndex, LooseBendWeight},
|
bend::{BendIndex, LooseBendWeight},
|
||||||
dot::{DotIndex, FixedDotIndex, LooseDotIndex, LooseDotWeight},
|
dot::{DotIndex, FixedDotIndex, LooseDotIndex, LooseDotWeight},
|
||||||
graph::{GetBandIndex, MakePrimitive},
|
graph::{GetBandIndex, MakePrimitive},
|
||||||
|
guide::{Guide, Head, HeadTrait, SegbendHead},
|
||||||
primitive::GetOtherJoint,
|
primitive::GetOtherJoint,
|
||||||
seg::{LoneLooseSegWeight, SeqLooseSegWeight},
|
seg::{LoneLooseSegWeight, SeqLooseSegWeight},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,10 @@ use crate::{
|
||||||
},
|
},
|
||||||
math::{self, Circle, NoTangents},
|
math::{self, Circle, NoTangents},
|
||||||
rules::{Conditions, Rules},
|
rules::{Conditions, Rules},
|
||||||
segbend::Segbend,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use super::segbend::Segbend;
|
||||||
|
|
||||||
#[enum_dispatch]
|
#[enum_dispatch]
|
||||||
pub trait HeadTrait {
|
pub trait HeadTrait {
|
||||||
fn face(&self) -> DotIndex;
|
fn face(&self) -> DotIndex;
|
||||||
|
|
@ -14,13 +14,14 @@ use super::connectivity::{
|
||||||
};
|
};
|
||||||
use super::geometry::with_rtree::GeometryWithRtree;
|
use super::geometry::with_rtree::GeometryWithRtree;
|
||||||
use super::loose::{GetNextLoose, Loose, LooseIndex};
|
use super::loose::{GetNextLoose, Loose, LooseIndex};
|
||||||
|
use super::segbend::Segbend;
|
||||||
use crate::graph::{GenericIndex, GetNodeIndex};
|
use crate::graph::{GenericIndex, GetNodeIndex};
|
||||||
use crate::guide::Guide;
|
|
||||||
use crate::layout::bend::BendIndex;
|
use crate::layout::bend::BendIndex;
|
||||||
use crate::layout::dot::DotWeight;
|
use crate::layout::dot::DotWeight;
|
||||||
use crate::layout::geometry::{
|
use crate::layout::geometry::{
|
||||||
BendWeightTrait, DotWeightTrait, Geometry, GeometryLabel, GetPos, SegWeightTrait,
|
BendWeightTrait, DotWeightTrait, Geometry, GeometryLabel, GetPos, SegWeightTrait,
|
||||||
};
|
};
|
||||||
|
use crate::layout::guide::Guide;
|
||||||
use crate::layout::{
|
use crate::layout::{
|
||||||
bend::{FixedBendIndex, LooseBendIndex, LooseBendWeight},
|
bend::{FixedBendIndex, LooseBendIndex, LooseBendWeight},
|
||||||
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||||
|
|
@ -36,7 +37,6 @@ use crate::layout::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use crate::math::NoTangents;
|
use crate::math::NoTangents;
|
||||||
use crate::segbend::Segbend;
|
|
||||||
use crate::wraparoundable::{GetWraparound, Wraparoundable, WraparoundableIndex};
|
use crate::wraparoundable::{GetWraparound, Wraparoundable, WraparoundableIndex};
|
||||||
|
|
||||||
use super::bend::BendWeight;
|
use super::bend::BendWeight;
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,11 @@ pub mod bend;
|
||||||
pub mod connectivity;
|
pub mod connectivity;
|
||||||
pub mod dot;
|
pub mod dot;
|
||||||
pub mod geometry;
|
pub mod geometry;
|
||||||
|
pub mod guide;
|
||||||
mod layout;
|
mod layout;
|
||||||
pub mod loose;
|
pub mod loose;
|
||||||
pub mod primitive;
|
pub mod primitive;
|
||||||
pub mod seg;
|
pub mod seg;
|
||||||
|
pub mod segbend;
|
||||||
|
|
||||||
pub use layout::*;
|
pub use layout::*;
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,12 @@ macro_rules! dbg_dot {
|
||||||
mod astar;
|
mod astar;
|
||||||
mod draw;
|
mod draw;
|
||||||
mod graph;
|
mod graph;
|
||||||
mod guide;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod layout;
|
mod layout;
|
||||||
mod math;
|
mod math;
|
||||||
mod mesh;
|
mod mesh;
|
||||||
mod router;
|
mod router;
|
||||||
mod rules;
|
mod rules;
|
||||||
mod segbend;
|
|
||||||
mod tracer;
|
mod tracer;
|
||||||
mod triangulation;
|
mod triangulation;
|
||||||
mod wraparoundable;
|
mod wraparoundable;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use thiserror::Error;
|
||||||
|
|
||||||
use crate::astar::{astar, AstarStrategy, PathTracker};
|
use crate::astar::{astar, AstarStrategy, PathTracker};
|
||||||
use crate::draw::DrawException;
|
use crate::draw::DrawException;
|
||||||
use crate::guide::HeadTrait;
|
use crate::layout::guide::HeadTrait;
|
||||||
use crate::layout::Layout;
|
use crate::layout::Layout;
|
||||||
use crate::layout::{
|
use crate::layout::{
|
||||||
connectivity::BandIndex,
|
connectivity::BandIndex,
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,12 @@ use contracts::debug_ensures;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
draw::{Draw, DrawException},
|
draw::{Draw, DrawException},
|
||||||
guide::{BareHead, Head, SegbendHead},
|
layout::{
|
||||||
layout::Layout,
|
bend::LooseBendIndex,
|
||||||
layout::{bend::LooseBendIndex, dot::FixedDotIndex},
|
dot::FixedDotIndex,
|
||||||
|
guide::{BareHead, Head, SegbendHead},
|
||||||
|
Layout,
|
||||||
|
},
|
||||||
mesh::{Mesh, VertexIndex},
|
mesh::{Mesh, VertexIndex},
|
||||||
rules::Rules,
|
rules::Rules,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue