mirror of https://codeberg.org/topola/topola.git
drawing: remove hardcoded layer count of 2
This commit is contained in:
parent
c4ac090790
commit
c4788c0277
|
|
@ -78,9 +78,9 @@ pub struct Drawing<CW: Copy, R: RulesTrait> {
|
|||
}
|
||||
|
||||
impl<CW: Copy, R: RulesTrait> Drawing<CW, R> {
|
||||
pub fn new(rules: R) -> Self {
|
||||
pub fn new(rules: R, layer_count: usize) -> Self {
|
||||
Self {
|
||||
geometry_with_rtree: GeometryWithRtree::new(2),
|
||||
geometry_with_rtree: GeometryWithRtree::new(layer_count),
|
||||
rules,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,8 +124,11 @@ impl DsnDesign {
|
|||
}
|
||||
|
||||
pub fn make_board(&self) -> Board<DsnMesadata> {
|
||||
let rules = DsnMesadata::from_pcb(&self.pcb);
|
||||
let mut board = Board::new(Layout::new(Drawing::new(rules)));
|
||||
let mesadata = DsnMesadata::from_pcb(&self.pcb);
|
||||
let mut board = Board::new(Layout::new(Drawing::new(
|
||||
mesadata,
|
||||
self.pcb.structure.layer_vec.len(),
|
||||
)));
|
||||
|
||||
// mapping of pin -> net prepared for adding pins
|
||||
let pin_nets = HashMap::<String, usize>::from_iter(
|
||||
|
|
|
|||
Loading…
Reference in New Issue