How to convert Geom_TrimmedCurve to GeomAdaptor_Curve in OpenCASCADE
OCCUtils provides a conveniece function to convert a Geom_TrimmedCurve
to a GeomAdaptor_Curve
:
convert_curve_occutils.cpp
#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:
convert_curve_manual.cpp
Geom_TrimmedCurve input = /* ... */;
GeomAdaptor_Curve result(
input.BasisCurve(), input.FirstParameter(), input.LastParameter()
);
Check out similar posts by category:
C/C++, OpenCASCADE
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow