Chamfer Bug

Hi everybody!

I found a bug in ChFi3d_Builder.

The method ChFi3d_PerformElSpine (in ChFi3d_Builder_0.cxx, lines 4172ff.)
sometimes raises a Standard_ConstructionError. Then the algorithm exits
without result, although there is a C1-continuous contour, that could be

The exception stems from the constructor of Geom_TrimmedCurve in line 4300,
when called with two equal parameters First and Last. Before that call the
values of said parameters are changed in ways that do not always guarantee
First != Last.

The obvious solution would be to move the check from line 4264
if(Abs(Last-First) }
two lines further down, so that the parameters are checked for the
if(E.Orientation() == TopAbs_REVERSED) {
branch as well.

I have tested this fix on various models with BRepFilletAPI_MakeChamfer,
and the chamfers were successful.

With kind regards, Kris.

Forum supervisor's picture

Dear Christian,

Thank you very much for this contribution !
I am glad to inform you that your modification has been registered as an improvement request with reference number OCC11042 in our bug tracking system. We shall test your solution and, in case of positive results, we shall integrate this improvement in future versions of Open CASCADE Technology.

To check if this improvement is integrated in a release, please refer to the Release Notes at

Thank you, and best regards !
Forum Supervisor