mirror of https://codeberg.org/topola/topola.git
refactor(specctra/design): Resolve image once per component
This commit is contained in:
parent
2e84380344
commit
3c807b5078
|
|
@ -213,15 +213,15 @@ impl SpecctraDesign {
|
|||
|
||||
// add pins from components
|
||||
for component in &self.pcb.placement.components {
|
||||
for place in &component.places {
|
||||
let image = self
|
||||
.pcb
|
||||
.library
|
||||
.images
|
||||
.iter()
|
||||
.find(|image| image.name == component.name)
|
||||
.unwrap();
|
||||
let image = self
|
||||
.pcb
|
||||
.library
|
||||
.images
|
||||
.iter()
|
||||
.find(|image| image.name == component.name)
|
||||
.unwrap();
|
||||
|
||||
for place in &component.places {
|
||||
let place_side_is_front = place.side == "front";
|
||||
let get_layer = |board: &Board<SpecctraMesadata>, name: &str| {
|
||||
Self::layer(board, &self.pcb.structure.layers, name, place_side_is_front)
|
||||
|
|
|
|||
Loading…
Reference in New Issue