some optimization ( StdPrs_ToolRFace)

instead of

void StdPrs_ToolRFace::Next()
{
myExplorer.Next();

if (myExplorer.More()) {
// skip INTERNAL and EXTERNAL edges
if (myExplorer.Current().Orientation() == TopAbs_INTERNAL) Next();
if (myExplorer.Current().Orientation() == TopAbs_EXTERNAL) Next();
if (myExplorer.More()) {
Standard_Real U1,U2;
const Handle(Geom2d_Curve)& C =
BRep_Tool::CurveOnSurface(TopoDS::Edge(myExplorer.Current()),
myFace,
U1,U2);
#ifdef OCC316
if ( !C.IsNull() )
#endif
DummyCurve.Load(C,U1,U2);
}
}
}

it looks much better as: (less stack usage)

void StdPrs_ToolRFace::Next()
{
myExplorer.Next();

if (myExplorer.More()) {
// skip INTERNAL and EXTERNAL edges
while (myExpolrer.More() && (myExplorer.Current().Orientation() == TopAbs_INTERNAL || myExplorer.Current().Orientation() == TopAbs_EXTERNAL)) myExplorer.Next();
if (myExplorer.More()) {
Standard_Real U1,U2;
const Handle(Geom2d_Curve)& C =
BRep_Tool::CurveOnSurface(TopoDS::Edge(myExplorer.Current()),
myFace,
U1,U2);
#ifdef OCC316
if ( !C.IsNull() )
#endif
DummyCurve.Load(C,U1,U2);
}
}
}

at least i'd prefer the second code.

Forum supervisor's picture

Dear Ernest,

Thank you very much for this contribution !
I am glad to inform you that your idea has been registered as an improvement request with reference number OCC8722 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 http://www.opencascade.org/getocc/whatsnew/.

Thank you, and best regards !
Forum Supervisor