Add OpenMP parallel for to SShell::CopyCurvesSplitAgainst
This commit is contained in:
parent
0f1ece2b8e
commit
c674bc8fb9
@ -201,18 +201,21 @@ SCurve SCurve::MakeCopySplitAgainst(SShell *agnstA, SShell *agnstB,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SShell::CopyCurvesSplitAgainst(bool opA, SShell *agnst, SShell *into) {
|
void SShell::CopyCurvesSplitAgainst(bool opA, SShell *agnst, SShell *into) {
|
||||||
SCurve *sc;
|
#pragma omp parallel for
|
||||||
for(sc = curve.First(); sc; sc = curve.NextAfter(sc)) {
|
for(int i=0; i<curve.n; i++) {
|
||||||
|
SCurve *sc = &curve[i];
|
||||||
SCurve scn = sc->MakeCopySplitAgainst(agnst, NULL,
|
SCurve scn = sc->MakeCopySplitAgainst(agnst, NULL,
|
||||||
surface.FindById(sc->surfA),
|
surface.FindById(sc->surfA),
|
||||||
surface.FindById(sc->surfB));
|
surface.FindById(sc->surfB));
|
||||||
scn.source = opA ? SCurve::Source::A : SCurve::Source::B;
|
scn.source = opA ? SCurve::Source::A : SCurve::Source::B;
|
||||||
|
#pragma omp critical
|
||||||
|
{
|
||||||
hSCurve hsc = into->curve.AddAndAssignId(&scn);
|
hSCurve hsc = into->curve.AddAndAssignId(&scn);
|
||||||
// And note the new ID so that we can rewrite the trims appropriately
|
// And note the new ID so that we can rewrite the trims appropriately
|
||||||
sc->newH = hsc;
|
sc->newH = hsc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SSurface::TrimFromEdgeList(SEdgeList *el, bool asUv) {
|
void SSurface::TrimFromEdgeList(SEdgeList *el, bool asUv) {
|
||||||
el->l.ClearTags();
|
el->l.ClearTags();
|
||||||
|
Loading…
Reference in New Issue
Block a user