mirror of https://codeberg.org/topola/topola.git
Move `topola/src/compounds/` directory under `topola/src/layout/`
This commit is contained in:
parent
a947a72a02
commit
58be28cc8b
|
|
@ -12,10 +12,10 @@ use derive_getters::Getters;
|
||||||
use undoredo::{Delta, Recorder};
|
use undoredo::{Delta, Recorder};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
compounds::{ComponentId, NetId, PinId},
|
|
||||||
layout::LayerId,
|
layout::LayerId,
|
||||||
layout::{
|
layout::{
|
||||||
Layout, LayoutHalfDelta,
|
Layout, LayoutHalfDelta,
|
||||||
|
compounds::{ComponentId, NetId, PinId},
|
||||||
primitives::{
|
primitives::{
|
||||||
JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
||||||
ViaSpec,
|
ViaSpec,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
board::{Board, selections::ComponentSelection},
|
board::{Board, selections::ComponentSelection},
|
||||||
compounds::ComponentId,
|
layout::compounds::ComponentId,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl Board {
|
impl Board {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||||
|
|
||||||
use crate::{Board, Vector2, compounds::ComponentId, selections::ComponentSelection};
|
use crate::{Board, Vector2, layout::compounds::ComponentId, selections::ComponentSelection};
|
||||||
|
|
||||||
impl Board {
|
impl Board {
|
||||||
pub fn move_components_by(
|
pub fn move_components_by(
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
use derive_more::{Constructor, From};
|
use derive_more::{Constructor, From};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::primitives::{JointId, PolygonId, SegmentId, ViaId};
|
use crate::layout::primitives::{JointId, PolygonId, SegmentId, ViaId};
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone,
|
Clone,
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
use derive_more::{Constructor, From};
|
use derive_more::{Constructor, From};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::primitives::{JointId, PolygonId, SegmentId, ViaId};
|
use crate::layout::primitives::{JointId, PolygonId, SegmentId, ViaId};
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone,
|
Clone,
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||||
|
|
||||||
|
pub mod compounds;
|
||||||
pub mod primitives;
|
pub mod primitives;
|
||||||
mod transforms;
|
mod transforms;
|
||||||
|
|
||||||
|
|
@ -17,7 +18,7 @@ use undoredo::aliases::RTreeHalfDelta;
|
||||||
use undoredo::{Delta, Recorder};
|
use undoredo::{Delta, Recorder};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
compounds::{Component, ComponentId, Pin, PinId},
|
layout::compounds::{Component, ComponentId, Pin, PinId},
|
||||||
layout::primitives::{
|
layout::primitives::{
|
||||||
Joint, JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
Joint, JointId, JointSpec, Polygon, PolygonId, Segment, SegmentId, SegmentSpec, Via, ViaId,
|
||||||
ViaSpec,
|
ViaSpec,
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use derive_more::{Constructor, From};
|
||||||
use rstar::{AABB, primitives::Rectangle};
|
use rstar::{AABB, primitives::Rectangle};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
|
||||||
use crate::layout::LayerId;
|
use crate::layout::LayerId;
|
||||||
|
use crate::layout::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
|
|
||||||
use super::{SegmentId, ViaId};
|
use super::{SegmentId, ViaId};
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use derive_more::{Constructor, From};
|
||||||
use rstar::{AABB, Envelope, primitives::Rectangle};
|
use rstar::{AABB, Envelope, primitives::Rectangle};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
|
||||||
use crate::layout::LayerId;
|
use crate::layout::LayerId;
|
||||||
|
use crate::layout::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use derive_more::{Constructor, From};
|
||||||
use rstar::primitives::Rectangle;
|
use rstar::primitives::Rectangle;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
|
||||||
use crate::layout::LayerId;
|
use crate::layout::LayerId;
|
||||||
|
use crate::layout::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
|
|
||||||
use super::JointId;
|
use super::JointId;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ use derive_more::{Constructor, From};
|
||||||
use rstar::{AABB, primitives::Rectangle};
|
use rstar::{AABB, primitives::Rectangle};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::compounds::{ComponentId, NetId, PinId};
|
|
||||||
use crate::layout::LayerId;
|
use crate::layout::LayerId;
|
||||||
|
use crate::layout::compounds::{ComponentId, NetId, PinId};
|
||||||
use crate::math::Vector2;
|
use crate::math::Vector2;
|
||||||
|
|
||||||
use super::JointId;
|
use super::JointId;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||||
|
|
||||||
use crate::{Layout, compounds::ComponentId, math::Vector2};
|
use crate::{Layout, layout::compounds::ComponentId, math::Vector2};
|
||||||
|
|
||||||
impl Layout {
|
impl Layout {
|
||||||
pub fn move_component_by(&mut self, id: ComponentId, translation: Vector2<i64>) {
|
pub fn move_component_by(&mut self, id: ComponentId, translation: Vector2<i64>) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
mod autorouter;
|
mod autorouter;
|
||||||
mod board;
|
mod board;
|
||||||
mod compounds;
|
|
||||||
mod drawer;
|
mod drawer;
|
||||||
mod layout;
|
mod layout;
|
||||||
mod math;
|
mod math;
|
||||||
|
|
@ -17,9 +16,9 @@ mod specctra;
|
||||||
pub use crate::autorouter::Autorouter;
|
pub use crate::autorouter::Autorouter;
|
||||||
pub use crate::board::Board;
|
pub use crate::board::Board;
|
||||||
pub use crate::board::selections;
|
pub use crate::board::selections;
|
||||||
pub use crate::compounds::{Pin, PinId};
|
|
||||||
pub use crate::layout::LayerId;
|
pub use crate::layout::LayerId;
|
||||||
pub use crate::layout::Layout;
|
pub use crate::layout::Layout;
|
||||||
|
pub use crate::layout::compounds::{Pin, PinId};
|
||||||
pub use crate::layout::primitives;
|
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};
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ use spade::{DelaunayTriangulation, HasPosition, Triangulation, handles::FixedVer
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Board,
|
Board,
|
||||||
compounds::NetId,
|
|
||||||
layout::LayerId,
|
layout::LayerId,
|
||||||
|
layout::compounds::NetId,
|
||||||
math::Vector2,
|
math::Vector2,
|
||||||
primitives::{JointId, PolygonId, PrimitiveId, SegmentId},
|
primitives::{JointId, PolygonId, PrimitiveId, SegmentId},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ use specctra::{
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
board::Board,
|
board::Board,
|
||||||
compounds::{ComponentId, NetId, PinId},
|
|
||||||
layout::LayerId,
|
layout::LayerId,
|
||||||
|
layout::compounds::{ComponentId, NetId, PinId},
|
||||||
math::Vector2,
|
math::Vector2,
|
||||||
primitives::{JointSpec, Polygon, Segment, SegmentSpec},
|
primitives::{JointSpec, Polygon, Segment, SegmentSpec},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue