Part: expose GeomPlate algorithm to Python

This commit is contained in:
wmayer
2020-09-28 18:46:35 +02:00
parent 5c4b7fa776
commit 904574d368
11 changed files with 1558 additions and 0 deletions

View File

@@ -2439,6 +2439,16 @@ std::unique_ptr<Geom2dCurve> makeFromCurveAdaptor2d(const Adaptor2d_Curve2d& ada
if (!geoCurve)
throw Base::TypeError("Unhandled curve type");
// Check if the curve must be trimmed
Handle(Geom2d_Curve) curv2d = Handle(Geom2d_Curve)::DownCast
(geoCurve->handle());
double u = curv2d->FirstParameter();
double v = curv2d->LastParameter();
if (u != adapt.FirstParameter() || v != adapt.LastParameter()) {
geoCurve = makeFromTrimmedCurve2d(curv2d, adapt.FirstParameter(), adapt.LastParameter());
}
return geoCurve;
}
}