GC_MakeTrimmedCylinder error 6.3 -> 6.5.2


the following code worked with Open Cascade 6.3:

Handle(Geom_RectangularTrimmedSurface) aussenwand = GC_MakeTrimmedCylinder(axe_ric, radiusOuter, laenge);

TopoDS_Face awand = BRepBuilderAPI_MakeFace(aussenwand);

But now with OCC 6.5.2 I get a compilation error:

error C2440: '': 'Handle_Geom_RectangularTrimmedSurface' kann nicht in 'BRepBuilderAPI_MakeFace' konvertiert werden.

Am I wrong or is there a bug???



Alex's picture

Make sure you specify all input parameters to BRepBuilderAPI_MakeFace. Since 6.5.2 it accepts a tolerance value as a second parameter.

Samuel Vogel's picture

Thank you. Just a minute ago I changed the code to *makeShell instead of *makeFace. Then it worked...


csv610's picture

I had the similar problem, Why there is no default tolerance value ? and are there good suggestion to set that value ?


Alex's picture

For those surface which are created by OCCT the Precision::Confusion is Ok. If you have your surface translated from some external CAD file, it is better to use the tolerance value coming from that file.