mirror of https://codeberg.org/topola/topola.git
refactor(drawing/drawing): Add filtering predicate also for `.insert_cane(...)`
This commit is contained in:
parent
3ddf382325
commit
9f7e10bc03
|
|
@ -641,6 +641,7 @@ impl<CW: Clone, Cel: Copy, R: AccessRules> Drawing<CW, Cel, R> {
|
||||||
seg_weight: SeqLooseSegWeight,
|
seg_weight: SeqLooseSegWeight,
|
||||||
bend_weight: LooseBendWeight,
|
bend_weight: LooseBendWeight,
|
||||||
sense: RotationSense,
|
sense: RotationSense,
|
||||||
|
filter: &impl Fn(&Self, PrimitiveIndex, PrimitiveIndex) -> bool,
|
||||||
) -> Result<Cane, DrawingException> {
|
) -> Result<Cane, DrawingException> {
|
||||||
let outer_gears = around.ref_(self).outer_gears();
|
let outer_gears = around.ref_(self).outer_gears();
|
||||||
let cane = self.add_cane(
|
let cane = self.add_cane(
|
||||||
|
|
@ -651,7 +652,7 @@ impl<CW: Clone, Cel: Copy, R: AccessRules> Drawing<CW, Cel, R> {
|
||||||
seg_weight,
|
seg_weight,
|
||||||
bend_weight,
|
bend_weight,
|
||||||
sense,
|
sense,
|
||||||
&|_drawing, _infringer, _infringee| true,
|
filter,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
for gear in outer_gears {
|
for gear in outer_gears {
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ impl<R: AccessRules> Layout<R> {
|
||||||
seg_weight,
|
seg_weight,
|
||||||
bend_weight,
|
bend_weight,
|
||||||
sense,
|
sense,
|
||||||
|
&|_drawing, _infringer, _infringee| true,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue