From: ifv Date: Tue, 12 Jan 2021 13:14:35 +0000 (+0300) Subject: 0032058: Modeling Data - Extrema curve-surface gives wrong result for planar surface... X-Git-Tag: V7_6_0_beta~296 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=b007889efd4ca591c55faba556a48eae90d848ca;p=occt.git 0032058: Modeling Data - Extrema curve-surface gives wrong result for planar surface of revolunion and circle Extrema_GenExtCS.cxx : added solution refinement, if solution seems to be "bad" according to special criteria. Extrema_FuncExtCS.cxx : "cosmetic" modifications BOPAlgo_PaveFiller_3.cxx : adding control of shape index to prevent exception in ShapeInfo bugs/moddata_3/bug32058 : new test --- diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index c199a87c8c..0c0835ecbe 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -655,6 +655,12 @@ void BOPAlgo_PaveFiller::FillShrunkData(Handle(BOPDS_PaveBlock)& thePB) // Vertices Standard_Integer nV1, nV2; thePB->Indices(nV1, nV2); + + if (nV1 < 0 || nV2 < 0) + { + return; + } + const TopoDS_Vertex& aV1=(*(TopoDS_Vertex *)(&myDS->Shape(nV1))); const TopoDS_Vertex& aV2=(*(TopoDS_Vertex *)(&myDS->Shape(nV2))); // Get the edge diff --git a/src/Extrema/Extrema_FuncExtCS.cxx b/src/Extrema/Extrema_FuncExtCS.cxx index ffacecc19c..230dfeb17a 100644 --- a/src/Extrema/Extrema_FuncExtCS.cxx +++ b/src/Extrema/Extrema_FuncExtCS.cxx @@ -208,12 +208,13 @@ Standard_Integer Extrema_FuncExtCS::GetStateNumber() std::cout <<"F(1)= "<