From: mpv Date: Wed, 25 Mar 2015 13:19:48 +0000 (+0300) Subject: Make extrusion made on prism is modified after sketch update: regression fix X-Git-Tag: V_1.1.0~84^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=32dbb28fad617a31eb5da8022149411e865eb634;p=modules%2Fshaper.git Make extrusion made on prism is modified after sketch update: regression fix --- diff --git a/.gitignore b/.gitignore index f55ecf287..b3e5bb13f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ start.bat *.orig *~ /.project +*DFBrowser* + diff --git a/src/GeomAPI/GeomAPI_Edge.cpp b/src/GeomAPI/GeomAPI_Edge.cpp index f9572daa7..b5736f4b6 100644 --- a/src/GeomAPI/GeomAPI_Edge.cpp +++ b/src/GeomAPI/GeomAPI_Edge.cpp @@ -131,6 +131,8 @@ std::shared_ptr GeomAPI_Edge::line() bool GeomAPI_Edge::isEqual(const std::shared_ptr theEdge) const { + if (!theEdge.get() || ! theEdge->isEdge()) + return false; const TopoDS_Shape& aMyShape = const_cast(this)->impl(); const TopoDS_Shape& aInShape = theEdge->impl(); diff --git a/src/GeomAPI/GeomAPI_Vertex.cpp b/src/GeomAPI/GeomAPI_Vertex.cpp index d881d79b5..b917837a0 100644 --- a/src/GeomAPI/GeomAPI_Vertex.cpp +++ b/src/GeomAPI/GeomAPI_Vertex.cpp @@ -37,6 +37,8 @@ std::shared_ptr GeomAPI_Vertex::point() bool GeomAPI_Vertex::isEqual(const std::shared_ptr theVert) const { + if (!theVert.get() || ! theVert->isVertex()) + return false; const TopoDS_Shape& aMyShape = const_cast(this)->impl(); const TopoDS_Shape& aInShape = theVert->impl(); diff --git a/src/Model/Model_ResultConstruction.cpp b/src/Model/Model_ResultConstruction.cpp index 17b20df98..2998e9f2d 100644 --- a/src/Model/Model_ResultConstruction.cpp +++ b/src/Model/Model_ResultConstruction.cpp @@ -28,9 +28,9 @@ void Model_ResultConstruction::colorConfigInfo(std::string& theSection, std::str void Model_ResultConstruction::setShape(std::shared_ptr theShape) { - if (myShape != theShape) { + if (myShape != theShape && (!theShape.get() || !theShape->isEqual(myShape))) { myShape = theShape; - if (theShape.get() && (!myShape.get() || !theShape->isEqual(myShape))) { + if (theShape.get()) { myFacesUpToDate = false; myFaces.clear(); }