]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix reading/writting quadratic edges
authoreap <eap@opencascade.com>
Mon, 3 Apr 2006 09:10:37 +0000 (09:10 +0000)
committereap <eap@opencascade.com>
Mon, 3 Apr 2006 09:10:37 +0000 (09:10 +0000)
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx

index e635874ffd5439446b6b2819e980b7ff2a3bb536..014690fbe273d3efd8519307d5d89b9857d58782 100644 (file)
@@ -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],
index fe181f78e10c588a9d5c7e1b0b4b746c95fac96a..945192a56a40e1e4852d86309dc56b414c66aa46 100644 (file)
@@ -92,7 +92,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
           if( anElem->IsQuadratic() ) {
             aNodesIter = static_cast<const SMDS_QuadraticEdge* >
               ( anElem )->interlacedNodesElemIterator();
-            aRec.fe_descriptor_id = 21;
+            aRec.fe_descriptor_id = 22;
           } else {
             aNodesIter = anElem->nodesIterator();
             aRec.fe_descriptor_id = 11;