]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape
authorvsr <vsr@opencascade.com>
Wed, 31 Mar 2010 15:37:44 +0000 (15:37 +0000)
committervsr <vsr@opencascade.com>
Wed, 31 Mar 2010 15:37:44 +0000 (15:37 +0000)
Additional change: customize "What Is" information

src/GEOMGUI/GEOM_msg_en.ts
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx
src/MeasureGUI/MeasureGUI_WhatisDlg.cxx

index 05feaa709fe6bf32bd479e9bedfd9955cddb6997..1d2ff79b4debfa7295c6e8be718b1e27032a0281 100644 (file)
@@ -3984,6 +3984,10 @@ Please, select face, shell or solid and try again</translation>
             <translation>Would you like to take into account the units?
 Otherwise the dimensions will be kept without modifications.</translation>
         </message>
+        <message>
+            <source>GEOM_ADVANCED</source>
+            <translation>Advanced shape: type %1</translation>
+        </message>
     </context>
     <context>
         <name>BasicGUI_CurveDlg</name>
index cb04f5776bff8f4fb5414057db0b89a70f5c8ac1..3c6aabbc9759152feebbe22ac067df2392425a0a 100644 (file)
@@ -155,6 +155,14 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
   TopoDS_Shape aShape = aRefShape->GetValue();
   if (aShape.IsNull()) return aKind;
 
+  int geom_type = theShape->GetType();
+  
+  // check if it's advanced shape
+  if ( geom_type > ADVANCED_BASE ) {
+    SetErrorCode(OK);
+    return SK_ADVANCED;
+  }
+  
   // Call algorithm
   GEOMAlgo_ShapeInfoFiller aSF;
   aSF.SetShape(aShape);
index 286c8342382f4f0bc9208d55ec9ae7a9b4975833..56f68e61bf2419b274595e4f276a5e9edecba692 100644 (file)
@@ -78,7 +78,9 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
     SK_SEGMENT,      // segment
     SK_EDGE,         // other edge
     // VERTEX
-    SK_VERTEX
+    SK_VERTEX,
+    // ADVANCED shapes
+    SK_ADVANCED,     // all advanced shapes (temporary implementation)
   };
 
   Standard_EXPORT ShapeKind KindOfShape (Handle(GEOM_Object) theShape,
index 64faf036b3f8193b3f2f1751dcfb936b5377f91a..2c77dce21dec506ad47320c8111616f6d8fae277 100644 (file)
@@ -587,6 +587,14 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
       "\n" +        tr( "GEOM_Y" )           + PRINT_DOUBLE( aDbls[1] ) +
       "\n" +        tr( "GEOM_Z" )           + PRINT_DOUBLE( aDbls[2] );
     break;
+  case GEOM::GEOM_IKindOfShape::ADVANCED:
+    {
+      QString strid = QString( "GEOM_ADVANCED_%1" ).arg( myObj->GetType() ); 
+      aKindStr = tr( strid.toLatin1().constData() ) == strid ? 
+       tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) :
+       tr( strid.toLatin1().constData() );
+      break;
+    }
   default:
     break;
   }