mirror of https://codeberg.org/topola/topola.git
Expand `layout.rs` into new module directory
This commit is contained in:
parent
692ec68ec2
commit
2ed6e13a50
|
|
@ -11,12 +11,14 @@ use undoredo::{ApplyDelta, Delta, FlushDelta};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
compounds::{ComponentId, NetId, PinId},
|
compounds::{ComponentId, NetId, PinId},
|
||||||
layout::{Layout, LayoutHalfDelta},
|
layout::{
|
||||||
math::Vector2,
|
Layout, LayoutHalfDelta,
|
||||||
primitives::{
|
primitives::{
|
||||||
JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
||||||
ViaSpec,
|
ViaSpec,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
math::Vector2,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Getters)]
|
#[derive(Clone, Debug, Getters)]
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||||
|
|
||||||
|
pub mod primitives;
|
||||||
|
|
||||||
use derive_getters::Getters;
|
use derive_getters::Getters;
|
||||||
use rstar::{
|
use rstar::{
|
||||||
AABB, RTree,
|
AABB, RTree,
|
||||||
|
|
@ -13,11 +15,11 @@ use undoredo::{Delta, Recorder};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
compounds::{Component, ComponentId, Pin, PinId},
|
compounds::{Component, ComponentId, Pin, PinId},
|
||||||
math::Vector2,
|
layout::primitives::{
|
||||||
primitives::{
|
|
||||||
Joint, JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
Joint, JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
||||||
ViaSpec,
|
ViaSpec,
|
||||||
},
|
},
|
||||||
|
math::Vector2,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Delta, Getters)]
|
#[derive(Clone, Debug, Delta, Getters)]
|
||||||
|
|
@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
use crate::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
use crate::primitives::{SegmentId, ViaId};
|
|
||||||
|
use super::{SegmentId, ViaId};
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,
|
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,
|
||||||
|
|
@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
use crate::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
use crate::primitives::JointId;
|
|
||||||
|
use super::JointId;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,
|
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,
|
||||||
|
|
@ -8,7 +8,8 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
use crate::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
use crate::primitives::JointId;
|
|
||||||
|
use super::JointId;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,
|
Clone, Constructor, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize,
|
||||||
|
|
@ -10,7 +10,6 @@ mod layout;
|
||||||
mod math;
|
mod math;
|
||||||
mod navmesher;
|
mod navmesher;
|
||||||
mod pathfinder;
|
mod pathfinder;
|
||||||
pub mod primitives;
|
|
||||||
mod ratsnest;
|
mod ratsnest;
|
||||||
mod router;
|
mod router;
|
||||||
mod specctra;
|
mod specctra;
|
||||||
|
|
@ -20,5 +19,6 @@ pub use crate::board::Board;
|
||||||
pub use crate::board::selections;
|
pub use crate::board::selections;
|
||||||
pub use crate::compounds::{Pin, PinId};
|
pub use crate::compounds::{Pin, PinId};
|
||||||
pub use crate::layout::Layout;
|
pub use crate::layout::Layout;
|
||||||
|
pub use crate::layout::primitives;
|
||||||
pub use crate::math::Vector2;
|
pub use crate::math::Vector2;
|
||||||
pub use crate::ratsnest::{Ratline, Ratsnest};
|
pub use crate::ratsnest::{Ratline, Ratsnest};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue