X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Penta_3D.cxx;h=ffece3ba0ee22b05e4c50bc5f2c149e7ab120af5;hb=70d591791d7dc1a78d662844a5c62943454aecf0;hp=e566580b9ae9851d83f5a87a494839ae6af1314a;hpb=41b3e4433388f439856c3b0bb3725e9c81179c24;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Penta_3D.cxx b/src/StdMeshers/StdMeshers_Penta_3D.cxx index e566580b9..ffece3ba0 100644 --- a/src/StdMeshers/StdMeshers_Penta_3D.cxx +++ b/src/StdMeshers/StdMeshers_Penta_3D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH StdMeshers_Penta_3D implementaion of SMESH idl descriptions +// SMESH StdMeshers_Penta_3D implementation of SMESH idl descriptions // File : StdMeshers_Penta_3D.cxx // Module : SMESH // @@ -234,8 +234,7 @@ void StdMeshers_Penta_3D::MakeNodes() aTNode.SetBaseNodeID(aNodeID); // if ( SMESH_Block::IsEdgeID (aSID)) { - const SMDS_EdgePosition* epos = - static_cast(aNode->GetPosition()); + SMDS_EdgePositionPtr epos = aNode->GetPosition(); myBlock.ComputeParameters( epos->GetUParameter(), aS, aCoords ); } else { @@ -421,7 +420,7 @@ void StdMeshers_Penta_3D::MakeNodes() aZ=(double)i/(double)(myISize-1); aCoords.SetCoord(aX, aY, aZ); // - // suporting shape ID + // supporting shape ID ShapeSupportID(bIsUpperLayer, aBNSSID, aSSID); if (!myErrorStatus->IsOK()) { MESSAGE("StdMeshers_Penta_3D::MakeNodes() pb"); @@ -574,7 +573,7 @@ double StdMeshers_Penta_3D::SetHorizEdgeXYZ(const gp_XYZ& aBase SMESH_Block::GetFaceEdgesIDs( aFaceID, edgeVec ); // int coord = SMESH_Block::GetCoordIndOnEdge( edgeVec[ BASE ] ); - bool isForward = myBlock.IsForwadEdge( edgeVec[ BASE ] ); + bool isForward = myBlock.IsForwardEdge( edgeVec[ BASE ] ); double param = aBaseNodeParams.Coord( coord ); if ( !isForward) @@ -1045,7 +1044,7 @@ void StdMeshers_Penta_3D::MakeBlock() if (iCnt>1) { // \begin{E.A.} // The current algorithm fails if there is more that one - // face wich contains triangles ... + // face which contains triangles ... // In that case, replace return by break to try another // method (coded in "if (iCnt != 1) { ... }") // @@ -1465,11 +1464,9 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, node = nIt->next(); if(myTool->IsMedium(node)) continue; - const SMDS_EdgePosition* pos = - dynamic_cast( node->GetPosition() ); - if ( !pos ) { + SMDS_EdgePositionPtr pos = node->GetPosition(); + if ( !pos ) return false; - } double u = ( pos->GetUParameter() - f ) / range; vector & nVec = theIJNodes[ u ]; nVec.resize( vsize, nullNode ); @@ -1488,11 +1485,9 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, node = nIt->next(); if(myTool->IsMedium(node)) continue; - const SMDS_EdgePosition* pos = - dynamic_cast( node->GetPosition() ); - if ( !pos ) { + SMDS_EdgePositionPtr pos = node->GetPosition(); + if ( !pos ) return false; - } sortedNodes.insert( make_pair( pos->GetUParameter(), node )); } loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() ); @@ -1543,7 +1538,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, } // look for a not loaded node of the bool found = false; - const SMDS_MeshNode* n3 = 0; // a node defferent from n1 and n2 + const SMDS_MeshNode* n3 = 0; // a node different from n1 and n2 eIt = face->nodesIterator() ; while ( !found && eIt->more() ) { node = static_cast( eIt->next() ); @@ -1609,11 +1604,11 @@ StdMeshers_SMESHBlock::StdMeshers_SMESHBlock() } //======================================================================= -//function : IsForwadEdge +//function : IsForwardEdge //purpose : //======================================================================= -bool StdMeshers_SMESHBlock::IsForwadEdge(const int theEdgeID) +bool StdMeshers_SMESHBlock::IsForwardEdge(const int theEdgeID) { int index = myTBlock.ShapeIndex( theEdgeID ); if ( !myTBlock.IsEdgeID( theEdgeID ))