Trim Geom_BSplineCurve


I try to trim a curve at a given parameter value. I try to do that with the following code:

> Handle(Geom_Curve) myC = ...
> GeomAdaptor_Curve gac( Handle(Geom_Curve)::DownCast(myC->Copy()) );
> Handle_Adaptor3d_HCurve ha = gac.Trim( _u0, _u1, Precision::Confusion() );
> Handle(Geom_BSplineCurve) bS = ha->BSpline();

If I check the end points of the new curve after the operations, it is not trimmed.

What is my mistake?

Alexander Luger's picture


Check out the class Geom_TrimmedCurve.

atismer's picture

Hi Alex,

thanks for your help. But I tried to trim a Geom_BSplineCurve that was an instance of Geom_TrimmedCurve. So the underlying curve was already a not trimmed Geom_BSplineCurve.

But I think I solve my Problem.
I trim the curve by using: GeomConvert::SplitBSplineCurve

Many thanks anyway.

Mauro Mariotti's picture