Salome HOME
0021869: [CEA 672] Clipping always apply even with auto-apply not checked
[modules/smesh.git] / src / SMESHUtils / SMESH_TypeDefs.hxx
index 0b670828951a67504abbdb07b33a2c16b0e4321d..edb0f247f8e0a1a81f0d75e6938913cfab4719a4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -60,6 +60,12 @@ namespace SMESHUtils
     TVECTOR v2;
     vec.swap( v2 );
   }
+  template <class TVECTOR>
+  void CompactVector(TVECTOR& vec)
+  {
+    TVECTOR v2( vec );
+    vec.swap( v2 );
+  }
 }
 
 //=======================================================================
@@ -99,13 +105,13 @@ struct SMESH_OrientedLink: public SMESH_TLink
 struct SMESH_TNodeXYZ : public gp_XYZ
 {
   const SMDS_MeshNode* _node;
+  double               _xyz[3];
   SMESH_TNodeXYZ( const SMDS_MeshElement* e):gp_XYZ(0,0,0),_node(0) {
     if (e) {
       assert( e->GetType() == SMDSAbs_Node );
       _node = static_cast<const SMDS_MeshNode*>(e);
-      double xyz[3];
-      _node->GetXYZ(xyz); // - thread safe gatting coords
-      SetCoord( xyz[0], xyz[1], xyz[2] );
+      _node->GetXYZ(_xyz); // - thread safe getting coords
+      SetCoord( _xyz[0], _xyz[1], _xyz[2] );
     }
   }
   double Distance(const SMDS_MeshNode* n)       const { return (SMESH_TNodeXYZ( n )-*this).Modulus(); }