Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'remotes/origin/HigherLevelObjectsHistory'
[modules/shaper.git]
/
src
/
PartSet
/
PartSet_ResultSketchPrs.cpp
diff --git
a/src/PartSet/PartSet_ResultSketchPrs.cpp
b/src/PartSet/PartSet_ResultSketchPrs.cpp
old mode 100755
(executable)
new mode 100644
(file)
index
7e62e4b
..
380e4ac
--- a/
src/PartSet/PartSet_ResultSketchPrs.cpp
+++ b/
src/PartSet/PartSet_ResultSketchPrs.cpp
@@
-1,4
+1,4
@@
-// Copyright (C) 2014-201
7
CEA/DEN, EDF R&D
+// Copyright (C) 2014-201
9
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
//
// 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
//
// 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<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "PartSet_ResultSketchPrs.h"
//
#include "PartSet_ResultSketchPrs.h"
@@
-25,7
+24,7
@@
#include <ModelAPI_Events.h>
#include <ModelAPI_Tools.h>
#include <ModelAPI_ResultConstruction.h>
#include <ModelAPI_Events.h>
#include <ModelAPI_Tools.h>
#include <ModelAPI_ResultConstruction.h>
-#include <ModelAPI_Result
CompSolid
.h>
+#include <ModelAPI_Result
Body
.h>
#include <GeomAPI_PlanarEdges.h>
#include <Events_InfoMessage.h>
#include <GeomAPI_PlanarEdges.h>
#include <Events_InfoMessage.h>
@@
-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
aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
// Activate individual repaintng if this is a part of compsolid
- Result
CompSolidPtr aCompSolid = ModelAPI_Tools::compSolid
Owner(myResult);
- SetAutoHilight(a
CompSolid
.get() == NULL);
+ Result
BodyPtr anOwner = ModelAPI_Tools::body
Owner(myResult);
+ SetAutoHilight(a
nOwner
.get() == NULL);
ModuleBase_Tools::setPointBallHighlighting(this);
}
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());
// 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);
if (!myAuxiliaryCompound.IsNull()) {
setAuxiliaryPresentationStyle(true);
@@
-281,7
+284,8
@@
void PartSet_ResultSketchPrs::fillShapes(TopoDS_Shape& theResultShape,
CompositeFeaturePtr aSketchFeature = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>
(aResultFeature);
std::list<ResultPtr> anAuxiliaryResults;
CompositeFeaturePtr aSketchFeature = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>
(aResultFeature);
std::list<ResultPtr> 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<ResultPtr> aResults = aFeature->results();
FeaturePtr aFeature = aSketchFeature->subFeature(i);
if (PartSet_Tools::isAuxiliarySketchEntity(aFeature)) {
std::list<ResultPtr> aResults = aFeature->results();