From bde9f2c7aee239a2d560840bd6741518f49f41e4 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 28 Jan 2013 08:21:16 +0000 Subject: [PATCH] 0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm Make arg theFirstVertex of GetOrderedEdges() optional --- src/SMESHUtils/SMESH_Block.cxx | 10 +++++----- src/SMESHUtils/SMESH_Block.hxx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SMESHUtils/SMESH_Block.cxx b/src/SMESHUtils/SMESH_Block.cxx index b28dc7d67..205e6aba2 100644 --- a/src/SMESHUtils/SMESH_Block.cxx +++ b/src/SMESHUtils/SMESH_Block.cxx @@ -957,10 +957,10 @@ int SMESH_Block::GetShapeIDByParams ( const gp_XYZ& theCoord ) /*! * \brief Return number of wires and a list of oredered edges. * \param theFace - the face to process - * \param theFirstVertex - the vertex of the outer wire to set first in the returned - * list ( theFirstVertex may be NULL ) * \param theEdges - all ordered edges of theFace (outer edges goes first). * \param theNbEdgesInWires - nb of edges (== nb of vertices in closed wire) in each wire + * \param theFirstVertex - the vertex of the outer wire to set first in the returned + * list ( theFirstVertex may be NULL ) * \param theShapeAnalysisAlgo - if true, ShapeAnalysis::OuterWire() is used to find * the outer wire else BRepTools::OuterWire() is used. * \retval int - nb of wires @@ -972,9 +972,9 @@ int SMESH_Block::GetShapeIDByParams ( const gp_XYZ& theCoord ) //================================================================================ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace, - TopoDS_Vertex theFirstVertex, list< TopoDS_Edge >& theEdges, list< int > & theNbEdgesInWires, + TopoDS_Vertex theFirstVertex, const bool theShapeAnalysisAlgo) { // put wires in a list, so that an outer wire comes first @@ -1352,7 +1352,7 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, // find bottom edges and veritices list< TopoDS_Edge > eList; list< int > nbVertexInWires; - GetOrderedEdges( TopoDS::Face( Fxy0 ), TopoDS::Vertex( V000 ), eList, nbVertexInWires ); + GetOrderedEdges( TopoDS::Face( Fxy0 ), eList, nbVertexInWires, TopoDS::Vertex( V000 ) ); if ( nbVertexInWires.size() != 1 || nbVertexInWires.front() != 4 ) { MESSAGE(" LoadBlockShapes() error "); return false; @@ -1374,7 +1374,7 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, // find top edges and veritices eList.clear(); - GetOrderedEdges( TopoDS::Face( Fxy1 ), TopoDS::Vertex( V001 ), eList, nbVertexInWires ); + GetOrderedEdges( TopoDS::Face( Fxy1 ), eList, nbVertexInWires, TopoDS::Vertex( V001 ) ); if ( nbVertexInWires.size() != 1 || nbVertexInWires.front() != 4 ) { MESSAGE(" LoadBlockShapes() error "); return false; diff --git a/src/SMESHUtils/SMESH_Block.hxx b/src/SMESHUtils/SMESH_Block.hxx index 4971db99a..65c41bbec 100644 --- a/src/SMESHUtils/SMESH_Block.hxx +++ b/src/SMESHUtils/SMESH_Block.hxx @@ -256,7 +256,7 @@ public: public: // --------------- - // Block geomerty + // Block geometry // --------------- @@ -275,9 +275,9 @@ public: // Return true if an in-block parameter increases along theEdge curve static int GetOrderedEdges (const TopoDS_Face& theFace, - TopoDS_Vertex theFirstVertex, std::list< TopoDS_Edge >& theEdges, std::list< int > & theNbEdgesInWires, + TopoDS_Vertex theFirstVertex=TopoDS_Vertex(), const bool theShapeAnalysisAlgo=false); // Return nb wires and a list of oredered edges. // It is used to assign indices to subshapes. -- 2.39.2