From: vsv Date: Thu, 13 Feb 2020 13:22:38 +0000 (+0300) Subject: Show ISO lines only on bodies and with highlighting also X-Git-Tag: V9_5_0a1~14^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0e1c61c3fe1242a12f16d354e6b17fae1804e90;p=modules%2Fshaper.git Show ISO lines only on bodies and with highlighting also --- diff --git a/src/ModelAPI/ModelAPI_Tools.cpp b/src/ModelAPI/ModelAPI_Tools.cpp index 3d293492e..0c312f395 100644 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -852,13 +853,19 @@ void getColor(const std::shared_ptr& theResult, std::vector& theResult, std::vector& theNbLines) { theNbLines.clear(); - // get color from the attribute of the result - if (theResult.get() != NULL && - theResult->data()->attribute(ModelAPI_Result::ISO_LINES_ID()).get() != NULL) { - AttributeIntArrayPtr aAttr = theResult->data()->intArray(ModelAPI_Result::ISO_LINES_ID()); - if (aAttr.get() && aAttr->size()) { - theNbLines.push_back(aAttr->value(0)); - theNbLines.push_back(aAttr->value(1)); + if (theResult->groupName() == ModelAPI_ResultConstruction::group()) { + theNbLines.push_back(0); + theNbLines.push_back(0); + } + else { + // get color from the attribute of the result + if (theResult.get() != NULL && + theResult->data()->attribute(ModelAPI_Result::ISO_LINES_ID()).get() != NULL) { + AttributeIntArrayPtr aAttr = theResult->data()->intArray(ModelAPI_Result::ISO_LINES_ID()); + if (aAttr.get() && aAttr->size()) { + theNbLines.push_back(aAttr->value(0)); + theNbLines.push_back(aAttr->value(1)); + } } } } diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index fceb96c2f..5fb170087 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -98,8 +98,6 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) aDrawer->SetUIsoAspect(myUIsoAspect); aDrawer->SetVIsoAspect(myVIsoAspect); - aDrawer->SetIsoOnPlane(false); - if (aDrawer->HasOwnPointAspect()) aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS); else @@ -109,17 +107,11 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) if (aDrawer.IsNull()) { if (!ModuleBase_IViewer::DefaultHighlightDrawer.IsNull()) { aDrawer = new Prs3d_Drawer(*ModuleBase_IViewer::DefaultHighlightDrawer); - Handle(Prs3d_IsoAspect) aUIsoAspect = new Prs3d_IsoAspect(aColor, Aspect_TOL_SOLID, 1, 0); - Handle(Prs3d_IsoAspect) aVIsoAspect = new Prs3d_IsoAspect(aColor, Aspect_TOL_SOLID, 1, 0); - aDrawer->SetUIsoAspect(aUIsoAspect); - aDrawer->SetVIsoAspect(aVIsoAspect); + aDrawer->SetUIsoAspect(myUIsoAspect); + aDrawer->SetVIsoAspect(myVIsoAspect); SetDynamicHilightAttributes(aDrawer); } - } else { - aDrawer->VIsoAspect()->SetNumber(0); - aDrawer->UIsoAspect()->SetNumber(0); } - aDrawer->SetIsoOnPlane(false); myHiddenSubShapesDrawer = new AIS_ColoredDrawer(myDrawer); Handle(Prs3d_ShadingAspect) aShadingAspect = new Prs3d_ShadingAspect();