From: eap Date: Mon, 3 Apr 2006 09:10:37 +0000 (+0000) Subject: fix reading/writting quadratic edges X-Git-Tag: T3_2_0b1_pre1~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a5fe30fafcd40cfdbcdc1a4c6b8c1b1801ec328;p=modules%2Fsmesh.git fix reading/writting quadratic edges --- diff --git a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx index e635874ff..014690fbe 100644 --- a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx @@ -74,14 +74,13 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() const TElementLab& aLabel = anIter->first; const TRecord& aRec = anIter->second; if(IsBeam(aRec.fe_descriptor_id)) { - if(aRec.fe_descriptor_id == 11) { - // edge with two nodes + switch ( aRec.fe_descriptor_id.size() ) { + case 2: // edge with two nodes anElement = myMesh->AddEdgeWithID(aRec.node_labels[0], aRec.node_labels[1], aLabel); - } - else { - // quadratic edge (with 3 nodes) + break; + case 3: // quadratic edge (with 3 nodes) anElement = myMesh->AddEdgeWithID(aRec.node_labels[0], aRec.node_labels[2], aRec.node_labels[1], diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx index fe181f78e..945192a56 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx @@ -92,7 +92,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform() if( anElem->IsQuadratic() ) { aNodesIter = static_cast ( anElem )->interlacedNodesElemIterator(); - aRec.fe_descriptor_id = 21; + aRec.fe_descriptor_id = 22; } else { aNodesIter = anElem->nodesIterator(); aRec.fe_descriptor_id = 11;