How to convert Geom_TrimmedCurve to GeomAdaptor_Curve in OpenCASCADE
OCCUtils provides a conveniece function to convert a Geom_TrimmedCurve
to a GeomAdaptor_Curve
:
#include <occutils/Curve.hxx>
using namespace OCCUtils;
Geom_TrimmedCurve input = /* ... */;
GeomAdaptor_Curve result = Curve::FromTrimmedCurve(input);
If you want to do it manually, use this snippet:
Geom_TrimmedCurve input = /* ... */;
GeomAdaptor_Curve result(
input.BasisCurve(), input.FirstParameter(), input.LastParameter()
);