layout: move guide, segbend files to layout module

This commit is contained in:
Mikolaj Wielgus 2024-02-01 22:23:04 +00:00
parent 847309adae
commit 01d285efb0
8 changed files with 14 additions and 10 deletions

View File

@ -3,11 +3,11 @@ use geo::{EuclideanLength, Point};
use thiserror::Error;
use crate::{
guide::{Guide, Head, HeadTrait, SegbendHead},
layout::{
bend::{BendIndex, LooseBendWeight},
dot::{DotIndex, FixedDotIndex, LooseDotIndex, LooseDotWeight},
graph::{GetBandIndex, MakePrimitive},
guide::{Guide, Head, HeadTrait, SegbendHead},
primitive::GetOtherJoint,
seg::{LoneLooseSegWeight, SeqLooseSegWeight},
},

View File

@ -13,9 +13,10 @@ use crate::{
},
math::{self, Circle, NoTangents},
rules::{Conditions, Rules},
segbend::Segbend,
};
use super::segbend::Segbend;
#[enum_dispatch]
pub trait HeadTrait {
fn face(&self) -> DotIndex;

View File

@ -14,13 +14,14 @@ use super::connectivity::{
};
use super::geometry::with_rtree::GeometryWithRtree;
use super::loose::{GetNextLoose, Loose, LooseIndex};
use super::segbend::Segbend;
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, GeometryLabel, GetPos, SegWeightTrait,
};
use crate::layout::guide::Guide;
use crate::layout::{
bend::{FixedBendIndex, LooseBendIndex, LooseBendWeight},
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
@ -36,7 +37,6 @@ use crate::layout::{
},
};
use crate::math::NoTangents;
use crate::segbend::Segbend;
use crate::wraparoundable::{GetWraparound, Wraparoundable, WraparoundableIndex};
use super::bend::BendWeight;

View File

@ -5,9 +5,11 @@ pub mod bend;
pub mod connectivity;
pub mod dot;
pub mod geometry;
pub mod guide;
mod layout;
pub mod loose;
pub mod primitive;
pub mod seg;
pub mod segbend;
pub use layout::*;

View File

@ -11,14 +11,12 @@ macro_rules! dbg_dot {
mod astar;
mod draw;
mod graph;
mod guide;
#[macro_use]
mod layout;
mod math;
mod mesh;
mod router;
mod rules;
mod segbend;
mod tracer;
mod triangulation;
mod wraparoundable;

View File

@ -6,7 +6,7 @@ use thiserror::Error;
use crate::astar::{astar, AstarStrategy, PathTracker};
use crate::draw::DrawException;
use crate::guide::HeadTrait;
use crate::layout::guide::HeadTrait;
use crate::layout::Layout;
use crate::layout::{
connectivity::BandIndex,

View File

@ -2,9 +2,12 @@ use contracts::debug_ensures;
use crate::{
draw::{Draw, DrawException},
layout::{
bend::LooseBendIndex,
dot::FixedDotIndex,
guide::{BareHead, Head, SegbendHead},
layout::Layout,
layout::{bend::LooseBendIndex, dot::FixedDotIndex},
Layout,
},
mesh::{Mesh, VertexIndex},
rules::Rules,
};