]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make extrusion made on prism is modified after sketch update: regression fix
authormpv <mpv@opencascade.com>
Wed, 25 Mar 2015 13:19:48 +0000 (16:19 +0300)
committermpv <mpv@opencascade.com>
Wed, 25 Mar 2015 13:19:48 +0000 (16:19 +0300)
.gitignore
src/GeomAPI/GeomAPI_Edge.cpp
src/GeomAPI/GeomAPI_Vertex.cpp
src/Model/Model_ResultConstruction.cpp

index f55ecf287870a46e890ed9032633c95acc3311ab..b3e5bb13fb16b3cafc9c15e28bdc11ef91562fb4 100644 (file)
@@ -28,3 +28,5 @@ start.bat
 *.orig
 *~
 /.project
+*DFBrowser*
+
index f9572daa79949e4da668fc374466dc078f598de2..b5736f4b618d70b52ad2e8c786c8db1ba4d20ff6 100644 (file)
@@ -131,6 +131,8 @@ std::shared_ptr<GeomAPI_Lin> GeomAPI_Edge::line()
 
 bool GeomAPI_Edge::isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const
 {
+  if (!theEdge.get() || ! theEdge->isEdge())
+    return false;
   const TopoDS_Shape& aMyShape = const_cast<GeomAPI_Edge*>(this)->impl<TopoDS_Shape>();
   const TopoDS_Shape& aInShape = theEdge->impl<TopoDS_Shape>();
 
index d881d79b5bf0ea0cbbb7106bc0d3507f9aa05384..b917837a09cfcaa4e9589598625f7a4d4f63765e 100644 (file)
@@ -37,6 +37,8 @@ std::shared_ptr<GeomAPI_Pnt> GeomAPI_Vertex::point()
 
 bool GeomAPI_Vertex::isEqual(const std::shared_ptr<GeomAPI_Shape> theVert) const
 {
+  if (!theVert.get() || ! theVert->isVertex())
+    return false;
   const TopoDS_Shape& aMyShape = const_cast<GeomAPI_Vertex*>(this)->impl<TopoDS_Shape>();
   const TopoDS_Shape& aInShape = theVert->impl<TopoDS_Shape>();
 
index 17b20df98dc4eff497b1eb03ed3bfbbbbaf72e09..2998e9f2db8a4879186ed9cbb458051d027100d1 100644 (file)
@@ -28,9 +28,9 @@ void Model_ResultConstruction::colorConfigInfo(std::string& theSection, std::str
 
 void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> 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();
     }