mirror of https://codeberg.org/topola/topola.git
cli: fix compile errors
This commit is contained in:
parent
a04caeae9c
commit
41bd60ea59
|
|
@ -31,6 +31,20 @@ impl PinSelection {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_select_layer(board: &Board<impl AccessMesadata>, layer: usize) -> Self {
|
||||
let mut this = Self::new();
|
||||
|
||||
for node in board.layout().drawing().layer_primitive_nodes(layer) {
|
||||
if let Some(selector) = this.node_selector(board, GenericNode::Primitive(node)) {
|
||||
if !this.contains_node(board, GenericNode::Primitive(node)) {
|
||||
this.select(selector);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this
|
||||
}
|
||||
|
||||
fn node_selector(
|
||||
&self,
|
||||
board: &Board<impl AccessMesadata>,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use std::path::PathBuf;
|
|||
use topola::autorouter::history::History;
|
||||
use topola::autorouter::invoker::Command;
|
||||
use topola::autorouter::invoker::Invoker;
|
||||
use topola::autorouter::selection::Selection;
|
||||
use topola::autorouter::selection::PinSelection;
|
||||
use topola::autorouter::Autorouter;
|
||||
use topola::specctra::design::SpecctraDesign;
|
||||
|
||||
|
|
@ -44,7 +44,9 @@ fn main() -> Result<(), std::io::Error> {
|
|||
serde_json::from_reader(commands_bufread)?
|
||||
} else {
|
||||
let mut history = History::new();
|
||||
history.do_(Command::Autoroute(Selection::new_select_layer(&board, 0)));
|
||||
history.do_(Command::Autoroute(PinSelection::new_select_layer(
|
||||
&board, 0,
|
||||
)));
|
||||
history
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue