From: eap Date: Tue, 21 Feb 2006 09:32:23 +0000 (+0000) Subject: PAL10595. Problem in MED driver with units ands coordinates system length X-Git-Tag: T2_2_9pre~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=805f776def2cfa91b735c42a39b44b203a61fa79;p=modules%2Fsmesh.git PAL10595. Problem in MED driver with units ands coordinates system length --- diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index edd5418c4..fba15f45f 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -108,50 +108,58 @@ namespace{ typedef double (SMDS_MeshNode::* TGetCoord)() const; typedef const char* TName; typedef const char* TUnit; - - TUnit aUnit[3] = {"m","m","m"}; + // name length in a mesh must be equal to 16 : + // 1234567890123456 + TName M = "m "; + TName X = "x "; + TName Y = "y "; + TName Z = "z "; + + TUnit aUnit[3] = {M,M,M}; + + // 3 dim TGetCoord aXYZGetCoord[3] = { &SMDS_MeshNode::X, &SMDS_MeshNode::Y, &SMDS_MeshNode::Z }; - TName aXYZName[3] = {"x","y","z"}; - + TName aXYZName[3] = {X,Y,Z}; + // 2 dim TGetCoord aXYGetCoord[2] = { &SMDS_MeshNode::X, &SMDS_MeshNode::Y }; - TName aXYName[2] = {"x","y"}; + TName aXYName[2] = {X,Y}; TGetCoord aYZGetCoord[2] = { &SMDS_MeshNode::Y, &SMDS_MeshNode::Z }; - TName aYZName[2] = {"y","z"}; + TName aYZName[2] = {Y,Z}; TGetCoord aXZGetCoord[2] = { &SMDS_MeshNode::X, &SMDS_MeshNode::Z }; - TName aXZName[2] = {"x","z"}; - + TName aXZName[2] = {X,Z}; + // 1 dim TGetCoord aXGetCoord[1] = { &SMDS_MeshNode::X }; - TName aXName[1] = {"x"}; + TName aXName[1] = {X}; TGetCoord aYGetCoord[1] = { &SMDS_MeshNode::Y }; - TName aYName[1] = {"y"}; + TName aYName[1] = {Y}; TGetCoord aZGetCoord[1] = { &SMDS_MeshNode::Z }; - TName aZName[1] = {"z"}; + TName aZName[1] = {Z}; class TCoordHelper{ @@ -319,12 +327,11 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() int aFamId = (*aFamsIter)->GetId(); const set& anElems = (*aFamsIter)->GetElements(); - set::iterator anElemsIter = anElems.begin(); + set::const_iterator anElemsIter = anElems.begin(); for (; anElemsIter != anElems.end(); anElemsIter++) { anElemFamMap[*anElemsIter] = aFamId; } -// delete (*aFamsIter); } // Storing SMDS nodes to the MED file for the MED mesh