Expand `layout.rs` into new module directory

This commit is contained in:
Mikolaj Wielgus 2026-05-19 23:24:43 +02:00
parent 692ec68ec2
commit 2ed6e13a50
8 changed files with 18 additions and 11 deletions

View File

@ -11,12 +11,14 @@ use undoredo::{ApplyDelta, Delta, FlushDelta};
use crate::{
compounds::{ComponentId, NetId, PinId},
layout::{Layout, LayoutHalfDelta},
math::Vector2,
primitives::{
JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
ViaSpec,
layout::{
Layout, LayoutHalfDelta,
primitives::{
JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
ViaSpec,
},
},
math::Vector2,
};
#[derive(Clone, Debug, Getters)]

View File

@ -2,6 +2,8 @@
//
// SPDX-License-Identifier: MIT OR Apache-2.0
pub mod primitives;
use derive_getters::Getters;
use rstar::{
AABB, RTree,
@ -13,11 +15,11 @@ use undoredo::{Delta, Recorder};
use crate::{
compounds::{Component, ComponentId, Pin, PinId},
math::Vector2,
primitives::{
layout::primitives::{
Joint, JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
ViaSpec,
},
math::Vector2,
};
#[derive(Clone, Debug, Delta, Getters)]

View File

@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize};
use crate::compounds::{ComponentId, NetId, PinId};
use crate::math::Vector2;
use crate::primitives::{SegmentId, ViaId};
use super::{SegmentId, ViaId};
#[derive(
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,

View File

@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize};
use crate::compounds::{ComponentId, NetId, PinId};
use crate::math::Vector2;
use crate::primitives::JointId;
use super::JointId;
#[derive(
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,

View File

@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize};
use crate::compounds::{ComponentId, NetId, PinId};
use crate::math::Vector2;
use crate::primitives::JointId;
use super::JointId;
#[derive(
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,

View File

@ -10,7 +10,6 @@ mod layout;
mod math;
mod navmesher;
mod pathfinder;
pub mod primitives;
mod ratsnest;
mod router;
mod specctra;
@ -20,5 +19,6 @@ pub use crate::board::Board;
pub use crate::board::selections;
pub use crate::compounds::{Pin, PinId};
pub use crate::layout::Layout;
pub use crate::layout::primitives;
pub use crate::math::Vector2;
pub use crate::ratsnest::{Ratline, Ratsnest};