From: eap Date: Wed, 21 Mar 2012 09:00:38 +0000 (+0000) Subject: 0021336: EDF 1717 SMESH: New algorithm "body fitting" cartesian unstructured X-Git-Tag: V6_5_0a1~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5c5ce5f038e794c84c990ddf09114ee125284efc;p=modules%2Fsmesh.git 0021336: EDF 1717 SMESH: New algorithm "body fitting" cartesian unstructured + void GetXYZ(double xyx[3]) const; // thread safe getting coords --- diff --git a/src/SMDS/SMDS_MeshNode.cxx b/src/SMDS/SMDS_MeshNode.cxx index 4e5e21fe6..335278a59 100644 --- a/src/SMDS/SMDS_MeshNode.cxx +++ b/src/SMDS/SMDS_MeshNode.cxx @@ -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) { diff --git a/src/SMDS/SMDS_MeshNode.hxx b/src/SMDS/SMDS_MeshNode.hxx index 107402393..0623d4d82 100644 --- a/src/SMDS/SMDS_MeshNode.hxx +++ b/src/SMDS/SMDS_MeshNode.hxx @@ -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);