Salome HOME
0021336: EDF 1717 SMESH: New algorithm "body fitting" cartesian unstructured
authoreap <eap@opencascade.com>
Wed, 21 Mar 2012 09:00:38 +0000 (09:00 +0000)
committereap <eap@opencascade.com>
Wed, 21 Mar 2012 09:00:38 +0000 (09:00 +0000)
+  void   GetXYZ(double xyx[3]) const; // thread safe getting coords

src/SMDS/SMDS_MeshNode.cxx
src/SMDS/SMDS_MeshNode.hxx

index 4e5e21fe64fcd0461185ba346a56ced9fadeaff6..335278a5942b6b390ae6b7706c5f27ada6a9f7b3 100644 (file)
@@ -289,6 +289,15 @@ double SMDS_MeshNode::Z() const
   return coord[2];
 }
 
+//================================================================================
+/*!
+ * \brief thread safe getting coords
+ */
+void SMDS_MeshNode::GetXYZ(double xyz[3]) const
+{
+  return SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetPoint(myVtkID,xyz);
+}
+
 //* resize the vtkPoints structure every SMDS_Mesh::chunkSize points
 void SMDS_MeshNode::setXYZ(double x, double y, double z)
 {
index 107402393561529ef0c310d063ae8e69224ab547..0623d4d82d865de31f19806c9d968db0b7d0ea8d 100644 (file)
@@ -42,16 +42,17 @@ public:
   friend class SMDS_VtkFace;
 
   void Print(std::ostream & OS) const;
-  double X() const;
+  double X() const; // ! NOT thread safe methods !
   double Y() const;
   double Z() const;
-  SMDS_ElemIteratorPtr GetInverseElementIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
-  int NbInverseElements(SMDSAbs_ElementType type=SMDSAbs_All) const;
+  void   GetXYZ(double xyx[3]) const; // thread safe getting coords
+  SMDS_ElemIteratorPtr    GetInverseElementIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
+  int                     NbInverseElements(SMDSAbs_ElementType type=SMDSAbs_All) const;
   const SMDS_PositionPtr& GetPosition() const;
-  SMDSAbs_ElementType GetType() const;
-  virtual vtkIdType GetVtkType() const;
-  SMDSAbs_EntityType  GetEntityType() const {return SMDSEntity_Node;}
-  int NbNodes() const;
+  SMDSAbs_ElementType     GetType() const;
+  virtual vtkIdType       GetVtkType() const;
+  SMDSAbs_EntityType      GetEntityType() const {return SMDSEntity_Node;}
+  int                     NbNodes() const;
 
   friend bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2);