X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_ResultSketchPrs.cpp;h=380e4ac42f029ddcdcd803a80e272973a3933856;hb=c4eab94a20a0d93100549a210582d46409fec1cc;hp=7e62e4b9fb559cd2df26c16b49a6bb450d98a0bf;hpb=d5b5ce2284869d8b97ce638502c58c810bbeb0c7;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_ResultSketchPrs.cpp b/src/PartSet/PartSet_ResultSketchPrs.cpp old mode 100755 new mode 100644 index 7e62e4b9f..380e4ac42 --- a/src/PartSet/PartSet_ResultSketchPrs.cpp +++ b/src/PartSet/PartSet_ResultSketchPrs.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "PartSet_ResultSketchPrs.h" @@ -25,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -74,8 +73,8 @@ PartSet_ResultSketchPrs::PartSet_ResultSketchPrs(ResultPtr theResult) aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.)); // Activate individual repaintng if this is a part of compsolid - ResultCompSolidPtr aCompSolid = ModelAPI_Tools::compSolidOwner(myResult); - SetAutoHilight(aCompSolid.get() == NULL); + ResultBodyPtr anOwner = ModelAPI_Tools::bodyOwner(myResult); + SetAutoHilight(anOwner.get() == NULL); ModuleBase_Tools::setPointBallHighlighting(this); } @@ -107,8 +106,12 @@ void PartSet_ResultSketchPrs::Compute( // change deviation coefficient to provide more precise circle //ModuleBase_Tools::setDefaultDeviationCoefficient(myResult, Attributes()); - AIS_Shape::Compute(thePresentationManager, thePresentation, theMode); - + try { + AIS_Shape::Compute(thePresentationManager, thePresentation, theMode); + } + catch (...) { + return; + } if (!myAuxiliaryCompound.IsNull()) { setAuxiliaryPresentationStyle(true); @@ -281,7 +284,8 @@ void PartSet_ResultSketchPrs::fillShapes(TopoDS_Shape& theResultShape, CompositeFeaturePtr aSketchFeature = std::dynamic_pointer_cast (aResultFeature); std::list anAuxiliaryResults; - for (int i = 0; i < aSketchFeature->numberOfSubs(); i++) { + int aNumberOfSubs = aSketchFeature->numberOfSubs(); + for (int i = 0; i < aNumberOfSubs; i++) { FeaturePtr aFeature = aSketchFeature->subFeature(i); if (PartSet_Tools::isAuxiliarySketchEntity(aFeature)) { std::list aResults = aFeature->results();