From b51a02ed246df98ed29ab97ee49b52ddf0b28cbe Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 18 Mar 2010 09:46:14 +0000 Subject: [PATCH] 0020676: EDF 1212 GEOM: Partition operation creates vertices which causes mesh computation to fail with netgen - TopoDS_Shape GetSubShape() const { return myShape; } + const TopoDS_Shape& GetSubShape() const { return myShape; } +typedef SMDS_Iterator PShapeIterator; +typedef boost::shared_ptr< PShapeIterator > PShapeIteratorPtr; + /*! + * \brief Return iterator on ancestors of the given type + */ + static PShapeIteratorPtr GetAncestors(const TopoDS_Shape& shape, + const SMESH_Mesh& mesh, + TopAbs_ShapeEnum ancestorType); --- src/SMESH/SMESH_MesherHelper.hxx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx index 84b703530..c9305b909 100644 --- a/src/SMESH/SMESH_MesherHelper.hxx +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -42,6 +42,13 @@ typedef std::map TLinkNodeMap; typedef std::map::iterator ItTLinkNode; +typedef SMDS_Iterator PShapeIterator; +typedef boost::shared_ptr< PShapeIterator > PShapeIteratorPtr; + +typedef std::vector TNodeColumn; +typedef std::map< double, TNodeColumn > TParam2ColumnMap; + +//======================================================================= /*! * \brief It helps meshers to add elements * @@ -50,9 +57,7 @@ typedef std::map::iterator ItTLinkNode; * It defines degree of elements to create when IsQuadraticSubMesh() * is called. */ - -typedef std::vector TNodeColumn; -typedef std::map< double, TNodeColumn > TParam2ColumnMap; +//======================================================================= class SMESH_EXPORT SMESH_MesherHelper { @@ -112,6 +117,12 @@ public: static int NbAncestors(const TopoDS_Shape& shape, const SMESH_Mesh& mesh, TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE); + /*! + * \brief Return iterator on ancestors of the given type + */ + static PShapeIteratorPtr GetAncestors(const TopoDS_Shape& shape, + const SMESH_Mesh& mesh, + TopAbs_ShapeEnum ancestorType); /*! * \brief Return orientation of sub-shape in the main shape @@ -170,7 +181,7 @@ public: /*! * \brief Return the shape set by IsQuadraticSubMesh() or SetSubShape() */ - TopoDS_Shape GetSubShape() const { return myShape; } + const TopoDS_Shape& GetSubShape() const { return myShape; } /*! * Creates a node -- 2.39.2