In AutoSegment::expandToMinLength(), ensure that we stay on foundry grid
This commit is contained in:
parent
352ca94483
commit
5f60767486
|
@ -1697,8 +1697,13 @@ namespace Anabatic {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DbU::Unit oneGrid = DbU::fromGrid( 1 );
|
||||||
DbU::Unit targetExpand = (techMinLength - segMinLength) / 2 + targetCap;
|
DbU::Unit targetExpand = (techMinLength - segMinLength) / 2 + targetCap;
|
||||||
DbU::Unit sourceExpand = - (techMinLength - segMinLength) / 2 - sourceCap;
|
DbU::Unit sourceExpand = - (techMinLength - segMinLength) / 2 - sourceCap;
|
||||||
|
if (targetExpand % oneGrid)
|
||||||
|
targetExpand += oneGrid - targetExpand % oneGrid;
|
||||||
|
if (sourceExpand % oneGrid)
|
||||||
|
sourceExpand -= oneGrid + sourceExpand % oneGrid;
|
||||||
if (not span.isEmpty()) {
|
if (not span.isEmpty()) {
|
||||||
DbU::Unit shiftLeft = span.getVMax() - (getTargetU() + targetExpand);
|
DbU::Unit shiftLeft = span.getVMax() - (getTargetU() + targetExpand);
|
||||||
if (shiftLeft < 0) {
|
if (shiftLeft < 0) {
|
||||||
|
|
Loading…
Reference in New Issue