NFC replace 2 nested loops with 1 loop and a lookup for speed improvement.
parent
bc4924ae47
commit
d974615d0e
|
@ -454,16 +454,16 @@ SSurface SSurface::MakeCopyTrimAgainst(SShell *parent,
|
|||
SEdgeList inter = {};
|
||||
|
||||
SSurface *ss;
|
||||
for(ss = agnst->surface.First(); ss; ss = agnst->surface.NextAfter(ss)) {
|
||||
SCurve *sc;
|
||||
for(sc = into->curve.First(); sc; sc = into->curve.NextAfter(sc)) {
|
||||
if(sc->source != SCurve::Source::INTERSECTION) continue;
|
||||
if(opA) {
|
||||
if(sc->surfA != h || sc->surfB != ss->h) continue;
|
||||
if(sc->surfA != h) continue;
|
||||
ss = shb->surface.FindById(sc->surfB);
|
||||
} else {
|
||||
if(sc->surfB != h || sc->surfA != ss->h) continue;
|
||||
if(sc->surfB != h) continue;
|
||||
ss = sha->surface.FindById(sc->surfA);
|
||||
}
|
||||
|
||||
int i;
|
||||
for(i = 1; i < sc->pts.n; i++) {
|
||||
Vector a = sc->pts[i-1].p,
|
||||
|
@ -500,7 +500,6 @@ SSurface SSurface::MakeCopyTrimAgainst(SShell *parent,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Record all the points where more than two edges join, which I will call
|
||||
// the choosing points. If two edges join at a non-choosing point, then
|
||||
|
|
Loading…
Reference in New Issue