X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FControls%2FSMESH_ControlsDef.hxx;h=d41d9531c26b1ca0ba6ae58667aec40cfcc86550;hb=499f29d24922cec66e41b41a0039a954993bc6df;hp=7d25f1dca9b27dfc95ad1653e34e42b92824fd41;hpb=665d037f93371114bf4b00bf11b0f95be418fb77;p=modules%2Fsmesh.git diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index 7d25f1dca..d41d9531c 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -32,8 +32,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -58,6 +58,9 @@ class ShapeAnalysis_Surface; class gp_Pln; class gp_Pnt; +typedef NCollection_Map< smIdType, smIdHasher > TIDsMap; +typedef NCollection_Sequence TIDsSeq; + namespace SMESH{ namespace Controls{ @@ -130,12 +133,12 @@ namespace SMESH{ virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual double GetValue( long theElementId ); virtual double GetValue(const TSequenceOfXYZ& /*thePoints*/) { return -1.0;}; - void GetHistogram(int nbIntervals, - std::vector& nbEvents, - std::vector& funValues, - const std::vector& elements, - const double* minmax=0, - const bool isLogarithmic = false); + void GetHistogram(int nbIntervals, + std::vector& nbEvents, + std::vector& funValues, + const std::vector<::smIdType>& elements, + const double* minmax=0, + const bool isLogarithmic = false); bool IsApplicable( long theElementId ) const; virtual bool IsApplicable( const SMDS_MeshElement* element ) const; virtual SMDSAbs_ElementType GetType() const = 0; @@ -144,7 +147,7 @@ namespace SMESH{ void SetPrecision( const long thePrecision ); double Round( const double & value ); - bool GetPoints(const int theId, TSequenceOfXYZ& theRes) const; + bool GetPoints(const ::smIdType theId, TSequenceOfXYZ& theRes) const; static bool GetPoints(const SMDS_MeshElement* theElem, TSequenceOfXYZ& theRes); protected: const SMDS_Mesh* myMesh; @@ -423,9 +426,9 @@ namespace SMESH{ double GetTolerance () const { return myToler; } private: - double myToler; - TColStd_MapOfInteger myCoincidentIDs; - TMeshModifTracer myMeshModifTracer; + double myToler; + TIDsMap myCoincidentIDs; + TMeshModifTracer myMeshModifTracer; }; typedef boost::shared_ptr CoincidentNodesPtr; @@ -591,7 +594,7 @@ namespace SMESH{ virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual bool IsSatisfy( long theElementId ); virtual SMDSAbs_ElementType GetType() const; - static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const int theFaceId ); + static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const ::smIdType theFaceId ); typedef long TElemId; struct Border{ TElemId myElemId; @@ -650,9 +653,9 @@ namespace SMESH{ protected: const SMDS_Mesh* myMesh; - TColStd_SequenceOfInteger myMin; - TColStd_SequenceOfInteger myMax; - TColStd_MapOfInteger myIds; + std::vector< ::smIdType > myMin; + std::vector< ::smIdType > myMax; + TIDsMap myIds; SMDSAbs_ElementType myType; }; @@ -833,7 +836,7 @@ namespace SMESH{ bool findConnected( const TDataMapFacePtrInt& theAllFacePtrInt, SMDS_MeshFace* theStartFace, TMapOfLink& theNonManifold, - TColStd_MapOfInteger& theResFaces ); + TIDsMap& theResFaces ); bool isInPlane( const SMDS_MeshFace* theFace1, const SMDS_MeshFace* theFace2 ); void expandBoundary( TMapOfLink& theMapOfBoundary, @@ -847,8 +850,8 @@ namespace SMESH{ private: const SMDS_Mesh* myMesh; - TColStd_MapOfInteger myMapIds; - TColStd_MapOfInteger myMapBadGeomIds; + TIDsMap myMapIds; + TIDsMap myMapBadGeomIds; TVectorOfFacePtr myAllFacePtr; TDataMapFacePtrInt myAllFacePtrIntDMap; double myAngToler; @@ -909,7 +912,7 @@ namespace SMESH{ private: TMeshModifTracer myMeshModifTracer; - TColStd_MapOfInteger myIds; + TIDsMap myIds; SMDSAbs_ElementType myType; TopoDS_Face mySurf; double myToler; @@ -944,6 +947,7 @@ namespace SMESH{ const SMDSAbs_ElementType theType); bool IsSatisfy (const SMDS_MeshElement* elem); bool IsSatisfy (const SMDS_MeshNode* node, TopoDS_Shape* okShape=0); + void GetParams( double & u, double & v ) const { u = myU; v = myV; } private: @@ -960,6 +964,7 @@ namespace SMESH{ SMDSAbs_ElementType myType; TopoDS_Shape myShape; double myToler; + double myU, myV; // result of node projection on EDGE or FACE bool myAllNodesFlag; TMeshModifTracer myMeshModifTracer; @@ -1149,7 +1154,7 @@ namespace SMESH{ TMeshModifTracer myMeshModifTracer; long myFaceID; double myToler; - TColStd_MapOfInteger myCoplanarIDs; + TIDsMap myCoplanarIDs; }; typedef boost::shared_ptr CoplanarFacesPtr; @@ -1162,9 +1167,9 @@ namespace SMESH{ public: ConnectedElements(); //virtual Predicate* clone() const { return new ConnectedElements( *this ); } - void SetNode( int nodeID ); + void SetNode( ::smIdType nodeID ); void SetPoint( double x, double y, double z ); - int GetNode() const; + ::smIdType GetNode() const; std::vector GetPoint() const; void SetType( SMDSAbs_ElementType theType ); @@ -1176,14 +1181,14 @@ namespace SMESH{ //const std::set& GetDomainIDs() const { return myOkIDs; } private: - int myNodeID; - std::vector myXYZ; - SMDSAbs_ElementType myType; - TMeshModifTracer myMeshModifTracer; + ::smIdType myNodeID; + std::vector myXYZ; + SMDSAbs_ElementType myType; + TMeshModifTracer myMeshModifTracer; - void clearOkIDs(); - bool myOkIDsReady; - std::set< int > myOkIDs; // empty means that there is one domain + void clearOkIDs(); + bool myOkIDsReady; + std::set<::smIdType> myOkIDs; // empty means that there is one domain }; typedef boost::shared_ptr ConnectedElementsPtr;