mirror of https://codeberg.org/topola/topola.git
fix(planar-incr-embed): Fix Edge lhs vs. rhs association
This commit is contained in:
parent
ed06170db5
commit
cfde2eac20
|
|
@ -93,8 +93,8 @@ where
|
|||
b_idx,
|
||||
&b,
|
||||
Edge {
|
||||
lhs: Some(delaunay.from().data().idx.clone()),
|
||||
rhs: Some(delaunay.to().data().idx.clone()),
|
||||
lhs: Some(delaunay.to().data().idx.clone()),
|
||||
rhs: Some(delaunay.from().data().idx.clone()),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -455,9 +455,8 @@ fn cane_around<R: AccessRules>(
|
|||
sense
|
||||
);
|
||||
|
||||
// TODO: fix `-sense` vs `sense`.
|
||||
let ret = match inner {
|
||||
None => layout.cane_around_dot(recorder, old_head, core, -sense, width),
|
||||
None => layout.cane_around_dot(recorder, old_head, core, sense, width),
|
||||
Some(inner) => {
|
||||
// now, inner is expected to be a bend.
|
||||
// TODO: handle the case that the same path wraps multiple times around the same core
|
||||
|
|
@ -478,7 +477,7 @@ fn cane_around<R: AccessRules>(
|
|||
})
|
||||
.next();
|
||||
if let Some(inner_bend) = inner_bend {
|
||||
layout.cane_around_bend(recorder, old_head, inner_bend.into(), -sense, width)
|
||||
layout.cane_around_bend(recorder, old_head, inner_bend.into(), sense, width)
|
||||
} else {
|
||||
return Err(EvalException::BendNotFound {
|
||||
core: core,
|
||||
|
|
|
|||
|
|
@ -105,10 +105,7 @@ impl PolygonRouting {
|
|||
origin: destination,
|
||||
});
|
||||
};
|
||||
let cw = match self.cw {
|
||||
RotationSense::Counterclockwise => false,
|
||||
RotationSense::Clockwise => true,
|
||||
};
|
||||
let cw = matches!(self.cw, RotationSense::Clockwise);
|
||||
Ok(if invert_cw ^ cw { lhs } else { rhs })
|
||||
}
|
||||
|
||||
|
|
@ -175,11 +172,7 @@ impl PolygonRouting {
|
|||
);
|
||||
let mut mr = mayrev::MaybeReversed::new(&self.convex_hull.0[..]);
|
||||
// the convex hull is oriented counter-clockwise
|
||||
// FIXME(fogti): I have no clue where the orientation gets wrong...
|
||||
mr.reversed = !match self.cw {
|
||||
RotationSense::Counterclockwise => false,
|
||||
RotationSense::Clockwise => true,
|
||||
};
|
||||
mr.reversed = matches!(self.cw, RotationSense::Clockwise);
|
||||
|
||||
let mut route_length = 0.0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue