Salome HOME
0023595: [CEA 2275] : Manual test KO GEOM : The fields are not displayed
[modules/geom.git] / src / OBJECT / GEOM_AISShape.cxx
index d2cbff7b460db55c3942396d49547ea2d63129c4..06cd122b363e36d57e1f6c211b48f2025c67c708 100644 (file)
@@ -41,6 +41,7 @@
 #include <Graphic3d_AspectLine3d.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
 #include <Graphic3d_AspectText3d.hxx>
+#include <Prs3d.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
@@ -49,6 +50,7 @@
 #include <SelectMgr_IndexedMapOfOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <StdPrs_ShadedShape.hxx>
+#include <StdPrs_ToolTriangulatedShape.hxx>
 #include <StdSelect_BRepOwner.hxx>
 #include <StdSelect_DisplayMode.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
@@ -204,6 +206,11 @@ Standard_CString GEOM_AISShape::getName()
   return myName.ToCString();
 }
 
+Standard_Boolean GEOM_AISShape::AcceptDisplayMode(const Standard_Integer theMode) const
+{
+  return theMode >= Wireframe && theMode <= CustomHighlight;
+}
+
 void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
                             const Handle(Prs3d_Presentation)&           aPrs,
                             const Standard_Integer                      aMode)
@@ -227,6 +234,15 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
   bool isTopLev = isTopLevel() && switchTopLevel();
   switch (aMode) {
     case Wireframe:
+    // Begin 0023271: [CEA 1823] Deflection Coefficient not taken into account in wireframe
+    {
+      StdPrs_ToolTriangulatedShape::ClearOnOwnDeflectionChange (myshape, myDrawer, Standard_True);
+
+      // After this call if type of deflection is relative
+      // computed deflection coefficient is stored as absolute.
+      Prs3d::GetDeflection (myshape, myDrawer);
+    }
+    // End 0023271
     case CustomHighlight:
     {
       if(isTopLev) {
@@ -571,7 +587,7 @@ void GEOM_AISShape::drawField( const Handle(Prs3d_Presentation)& thePrs,
           anAspectText3d->SetColor( myLabelColor );
           aGroup->SetPrimitivesAspect( anAspectText3d );
 
-          aGroup->Text( aString.toLatin1().constData(), aVertex, 14 );
+          aGroup->Text( aString.toUtf8().constData(), aVertex, 14 );
         }
       }
       else