IGES, ShapeCustom_DirectModification and BRepAdaptor_Surface

On a cylindrical face are these negative "UV bounds" correct?
umin -6.2831853071795862
umax -3.1415926535897931
vmin ...
vmax ...
If "yes", there is a bug in BRepAdaptor_Surface::Initialize;
if "no", in ShapeCustom_DirectModification

In my application I use the conversion to IGES with the DirectFaces option, because the pdf documentation says
"Note that the default sequence for writing contains one operator – DirectFaces - which converts elementary surfaces based on left-hand axes (valid in CASCADE) to right-hand axes (which are valid only in IGES)".

While converting the attached shape, an exception is raised, because BRepAdaptor_Surface::Initialize() corrects umin to 0., which is greater than umax :

const Handle_Geom_Surface S(BRep_Tool::Surface(F,L));
if (S->IsUPeriodic()) {
Standard_Real ufirst, ulast, vfirst, vlast;
S->Bounds(ufirst, ulast, vfirst, vlast);
if (umin if (umax > ulast) umax = ulast;
(ufirst and ulast are 0 and 6.28...).

The negative values are set by ShapeCustom_DirectModification, which mirrors the PCurve's on the cylindrical face with respect to the V axis (the original values were positive).

I was not able to reproduce the crash in DRAW, maybe because the brepiges command misses the "DirectFaces" option, but the negative u-bounds can be obtained by calling the "directfaces" command

Mauro Mariotti's picture

Sorry, this is the right attachment

Mauro Mariotti's picture

I am deeply sorry.

Forget this topic:
the bug in BRepAdaptor_Surface was just in OUR OpenCascade, and was put by a colleague of mine.