X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_OperationPrs.cpp;h=d20041e43aa7b97aca301a2f3868e09d78a65580;hb=013eda84dcea4a427d406c5c75ba7870f4124b7f;hp=36de5da0313ead2c96c99ee835112f4f3946ce00;hpb=511632b94668ea8264a098558848882bd99c187f;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationPrs.cpp b/src/PartSet/PartSet_OperationPrs.cpp index 36de5da03..d20041e43 100755 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@ -11,12 +11,16 @@ #include "XGUI_ModuleConnector.h" #include "XGUI_Displayer.h" +#include "ModuleBase_Tools.h" + #include #include #include #include #include #include +#include + #include @@ -82,7 +86,11 @@ void PartSet_OperationPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t QList::const_iterator aShIt = aShapes.begin(), aShLast = aShapes.end(); for (; aShIt != aShLast; aShIt++) { GeomShapePtr aGeomShape = *aShIt; + if (!aGeomShape.get()) + continue; TopoDS_Shape aShape = aGeomShape->impl(); + // change deviation coefficient to provide more precise circle + ModuleBase_Tools::setDefaultDeviationCoefficient(aShape, aDrawer); StdPrs_WFDeflectionShape::Add(thePresentation, aShape, aDrawer); } } @@ -172,6 +180,14 @@ void PartSet_OperationPrs::getFeatureShapes(QMap addValue(aResult, aShape, myFeature, theObjectShapes); } } + if (anAttrType == ModelAPI_AttributeRefList::typeId()) { + std::shared_ptr aCurSelList = + std::dynamic_pointer_cast(anAttribute); + for (int i = 0; i < aCurSelList->size(); i++) { + GeomShapePtr aShape; + addValue(aCurSelList->object(i), aShape, myFeature, theObjectShapes); + } + } else { ObjectPtr anObject; GeomShapePtr aShape; @@ -208,6 +224,7 @@ bool PartSet_OperationPrs::isSelectionAttribute(const AttributePtr& theAttribute std::string anAttrType = theAttribute->attributeType(); return anAttrType == ModelAPI_AttributeSelectionList::typeId() || + anAttrType == ModelAPI_AttributeRefList::typeId() || anAttrType == ModelAPI_AttributeRefAttr::typeId() || anAttrType == ModelAPI_AttributeSelection::typeId() || anAttrType == ModelAPI_AttributeReference::typeId();