X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_MAT2d.hxx;h=2ba0066c5efa9566c3a5bc82427de6be63c32df5;hp=2b60605bcc62566d934f02b9538a09386d084252;hb=2a6e16b7faacf40cf3b91605690ce04f14141f1b;hpb=fb609e70fe2fefc32cc693f0120664b6286556d7 diff --git a/src/SMESHUtils/SMESH_MAT2d.hxx b/src/SMESHUtils/SMESH_MAT2d.hxx index 2b60605bc..2ba0066c5 100644 --- a/src/SMESHUtils/SMESH_MAT2d.hxx +++ b/src/SMESHUtils/SMESH_MAT2d.hxx @@ -88,6 +88,7 @@ namespace SMESH_MAT2d /*! * \brief Branch is a set of MA edges enclosed between branch points and/or MA ends. * It's main feature is to return two BoundaryPoint's per a point on it. + * Points on a Branch are defined by [0,1] parameter */ class SMESHUtils_EXPORT Branch { @@ -114,15 +115,20 @@ namespace SMESH_MAT2d std::vector< std::size_t >& edgeIDs2, std::vector< BranchPoint >& divPoints) const; - // construction + bool isRemoved() const { return _proxyPoint._branch; } + + public: // internal: construction + void init( std::vector& maEdges, const Boundary* boundary, std::map< const TVDVertex*, BranchEndType > endType); void setBranchesToEnds( const std::vector< Branch >& branches); + BranchPoint getPoint( const TVDVertex* vertex ) const; + void setRemoved( const BranchPoint& proxyPoint ); - static void setGeomEdge( std::size_t geomIndex, const TVDEdge* maEdge ); - static std::size_t getGeomEdge( const TVDEdge* maEdge ); - static void setBndSegment( std::size_t segIndex, const TVDEdge* maEdge ); + static void setGeomEdge ( std::size_t geomIndex, const TVDEdge* maEdge ); + static std::size_t getGeomEdge ( const TVDEdge* maEdge ); + static void setBndSegment( std::size_t segIndex, const TVDEdge* maEdge ); static std::size_t getBndSegment( const TVDEdge* maEdge ); private: @@ -142,6 +148,7 @@ namespace SMESH_MAT2d const Boundary* _boundary; // face boundary BranchEnd _endPoint1; BranchEnd _endPoint2; + BranchPoint _proxyPoint; }; //------------------------------------------------------------------------------------- @@ -173,7 +180,9 @@ namespace SMESH_MAT2d bool getBranchPoint( const std::size_t iEdge, double u, BranchPoint& p ) const; - bool IsConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const; + bool isConcaveSegment( std::size_t iEdge, std::size_t iSeg ) const; + + bool moveToClosestEdgeEnd( BoundaryPoint& bp ) const; private: std::vector< BndPoints > _pointsPerEdge; @@ -201,11 +210,12 @@ namespace SMESH_MAT2d const std::vector< TopoDS_Edge >& edges, const double minSegLen, const bool ignoreCorners = false ); - const Boundary& getBoundary() const { return _boundary; } - const std::vector< Branch >& getBranches() const { return _branch; } + std::size_t nbBranches() const { return _nbBranches; } + const Branch* getBranch(size_t i) const; const std::vector< const BranchEnd* >& getBranchPoints() const { return _branchPnt; } + const Boundary& getBoundary() const { return _boundary; } - void getPoints( const Branch& branch, std::vector< gp_XY >& points) const; + void getPoints( const Branch* branch, std::vector< gp_XY >& points) const; Adaptor3d_Curve* make3DCurve(const Branch& branch) const; private: @@ -214,6 +224,7 @@ namespace SMESH_MAT2d TopoDS_Face _face; TVD _vd; std::vector< Branch > _branch; + std::size_t _nbBranches; // removed branches ignored std::vector< const BranchEnd* > _branchPnt; Boundary _boundary; double _scale[2];