Salome HOME
23562: EDF 17098 - problem with Extrusion 3D
[modules/smesh.git] / src / StdMeshers / StdMeshers_Prism_3D.cxx
index 9dde41365e3a12a664c5409d757d41c01b39da36..80cdc5edd68542ab14ebe5a018093bfc91dded10 100644 (file)
@@ -1170,6 +1170,11 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
   if ( !assocOrProjBottom2Top( bottomToTopTrsf, thePrism ) ) // it also fills myBotToColumnMap
     return false;
 
+  // If all "vertical" EDGEs are straight, then all nodes of an internal node column
+  // are located on a line connecting the top node and the bottom node.
+  bool isStrightColunm = allVerticalEdgesStraight( thePrism );
+  if ( isStrightColunm )
+    myUseBlock = false;
 
   // Create nodes inside the block
 
@@ -1208,9 +1213,6 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
 
     myHelper->SetElementsOnShape( true );
 
-    // If all "vertical" EDGEs are straight, then all nodes of an internal node column
-    // are located on a line connecting the top node and the bottom node.
-    bool isStrightColunm = allVerticalEdgesStraight( thePrism );
     if ( !isStrightColunm )
     {
       double tol = getSweepTolerance( thePrism );
@@ -1798,9 +1800,8 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
       if ( myHelper->GetIsQuadratic() )
       {
         // fill myHelper with medium nodes built by quadAlgo
-        SMDS_ElemIteratorPtr fIt = fSM->GetSubMeshDS()->GetElements();
-        while ( fIt->more() )
-          myHelper->AddTLinks( dynamic_cast<const SMDS_MeshFace*>( fIt->next() ));
+        for ( SMDS_ElemIteratorPtr fIt = fSM->GetSubMeshDS()->GetElements(); fIt->more(); )
+          myHelper->AddTLinks( SMDS_Mesh::DownCast<SMDS_MeshFace>( fIt->next() ));
       }
     }
   }
@@ -4847,7 +4848,7 @@ TPCurveOnHorFaceAdaptor::TPCurveOnHorFaceAdaptor( const TSideFace*   sideFace,
         }
         if ( !C2d.IsNull() )
         {
-          double u = static_cast< const SMDS_EdgePosition* >( n->GetPosition() )->GetUParameter();
+          double u = SMDS_EdgePositionPtr( n->GetPosition() )->GetUParameter();
           if ( f <= u && u <= l )
           {
             uv = C2d->Value( u ).XY();