Salome HOME
Disable ISO lines for planes, previews and highlightings.
authorvsv <vsv@opencascade.com>
Thu, 13 Feb 2020 12:58:07 +0000 (15:58 +0300)
committervsv <vsv@opencascade.com>
Thu, 13 Feb 2020 12:58:07 +0000 (15:58 +0300)
src/GeomAPI/GeomAPI_AISObject.cpp
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/PartSet/PartSet_OperationPrs.cpp
src/XGUI/XGUI_ViewerProxy.cpp

index 45f57fa5a241a7a8b3012b8d0fe7c5f8a8d65b2e..ac3a6ff4d2f2341954e610a386b62647ed0371f6 100644 (file)
@@ -92,6 +92,7 @@ void GeomAPI_AISObject::createShape(std::shared_ptr<GeomAPI_Shape> theShape)
       aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
     else
       aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
+    aDrawer->SetIsoOnPlane(false);
     setImpl(new Handle(AIS_InteractiveObject)(aShape));
   }
 }
index e63531e586aa811b69082a142e06202d4c65fab7..fceb96c2f220183bf26cad71b7f4e30b22d56194 100644 (file)
@@ -45,6 +45,7 @@
 #include <Prs3d_PointAspect.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
+#include <Prs3d_PlaneAspect.hxx>
 #include <SelectMgr_SequenceOfOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_SelectionManager.hxx>
@@ -97,6 +98,8 @@ 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
@@ -116,6 +119,8 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult)
     aDrawer->VIsoAspect()->SetNumber(0);
     aDrawer->UIsoAspect()->SetNumber(0);
   }
+  aDrawer->SetIsoOnPlane(false);
+
   myHiddenSubShapesDrawer = new AIS_ColoredDrawer(myDrawer);
   Handle(Prs3d_ShadingAspect) aShadingAspect = new Prs3d_ShadingAspect();
   aShadingAspect->SetMaterial(Graphic3d_NOM_BRASS); //default value of context material
index f27f35f1910f58dcb960a425dba5781c233621f7..5c2d2ae1135a92aa30c527495910ad23f6c88fa0 100644 (file)
@@ -58,6 +58,7 @@
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <BRep_Builder.hxx>
 #include <TopoDS_Compound.hxx>
+#include <Prs3d_IsoAspect.hxx>
 
 //#define DEBUG_EMPTY_SHAPE
 //#define DEBUG_OPERATION_PRS
@@ -84,6 +85,13 @@ PartSet_OperationPrs::PartSet_OperationPrs(ModuleBase_IWorkshop* theWorkshop)
   BRepBuilderAPI_MakeVertex aMaker(aPnt);
   TopoDS_Vertex aVertex = aMaker.Vertex();
   myShapeToPrsMap.Bind(aVertex, NULL);
+
+  Handle(Prs3d_Drawer) aDrawer = Attributes();
+  Handle(Prs3d_IsoAspect) aUIsoAspect = new Prs3d_IsoAspect(myShapeColor, Aspect_TOL_SOLID, 1, 0);
+  Handle(Prs3d_IsoAspect) aVIsoAspect = new Prs3d_IsoAspect(myShapeColor, Aspect_TOL_SOLID, 1, 0);
+  aDrawer->SetUIsoAspect(aUIsoAspect);
+  aDrawer->SetVIsoAspect(aVIsoAspect);
+  aDrawer->SetIsoOnPlane(false);
 }
 
 bool PartSet_OperationPrs::hasShapes()
index 82154a769367c2167bca85c0aa9ede133f73834a..4b82e3ed627b289936b4967ed3dd504302dcf052 100644 (file)
@@ -466,6 +466,7 @@ void XGUI_ViewerProxy::displayHighlight(FeaturePtr theFeature, const TopoDS_Shap
           aAis->SetZLayer(Graphic3d_ZLayerId_Top); //Graphic3d_ZLayerId_Topmost
           aDeflection = Config_PropManager::real("Visualization", "construction_deflection");
           aAis->Attributes()->SetDeviationCoefficient(aDeflection);
+          aAis->Attributes()->SetIsoOnPlane(false);
           myHighlights.Append(aAis);
           aContext->Display(aAis, false);
           aContext->Deactivate(aAis);
@@ -480,6 +481,7 @@ void XGUI_ViewerProxy::displayHighlight(FeaturePtr theFeature, const TopoDS_Shap
     aAis->SetZLayer(Graphic3d_ZLayerId_Top); //Graphic3d_ZLayerId_Topmost
     aDeflection = Config_PropManager::real("Visualization", "body_deflection");
     aAis->Attributes()->SetDeviationCoefficient(aDeflection);
+    aAis->Attributes()->SetIsoOnPlane(false);
     myHighlights.Append(aAis);
     aContext->Display(aAis, false);
     aContext->Deactivate(aAis);