File indexing completed on 2026-09-19 09:27:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Geom2dHatch_Elements_HeaderFile
0018 #define _Geom2dHatch_Elements_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Geom2dHatch_Element.hxx>
0025 #include <NCollection_DataMap.hxx>
0026 #include <Standard_Boolean.hxx>
0027 #include <TopAbs_Orientation.hxx>
0028 class Geom2dHatch_Element;
0029 class gp_Pnt2d;
0030 class gp_Lin2d;
0031 class Geom2dAdaptor_Curve;
0032
0033 class Geom2dHatch_Elements
0034 {
0035 public:
0036 DEFINE_STANDARD_ALLOC
0037
0038 Standard_EXPORT Geom2dHatch_Elements();
0039
0040 Standard_EXPORT Geom2dHatch_Elements(const Geom2dHatch_Elements& Other);
0041
0042 Standard_EXPORT void Clear();
0043
0044 ~Geom2dHatch_Elements() { Clear(); }
0045
0046 Standard_EXPORT bool Bind(const int K, const Geom2dHatch_Element& I);
0047
0048 Standard_EXPORT bool IsBound(const int K) const;
0049
0050 Standard_EXPORT bool UnBind(const int K);
0051
0052 Standard_EXPORT const Geom2dHatch_Element& Find(const int K) const;
0053
0054 const Geom2dHatch_Element& operator()(const int K) const { return Find(K); }
0055
0056 Standard_EXPORT Geom2dHatch_Element& ChangeFind(const int K);
0057
0058 Geom2dHatch_Element& operator()(const int K) { return ChangeFind(K); }
0059
0060 Standard_EXPORT bool CheckPoint(gp_Pnt2d& P);
0061
0062 Standard_EXPORT bool Reject(const gp_Pnt2d& P) const;
0063
0064 Standard_EXPORT bool Segment(const gp_Pnt2d& P, gp_Lin2d& L, double& Par);
0065
0066 Standard_EXPORT bool OtherSegment(const gp_Pnt2d& P, gp_Lin2d& L, double& Par);
0067
0068 Standard_EXPORT void InitWires();
0069
0070 Standard_EXPORT bool MoreWires() const;
0071
0072 Standard_EXPORT void NextWire();
0073
0074 Standard_EXPORT bool RejectWire(const gp_Lin2d& L, const double Par) const;
0075
0076 Standard_EXPORT void InitEdges();
0077
0078 Standard_EXPORT bool MoreEdges() const;
0079
0080 Standard_EXPORT void NextEdge();
0081
0082 Standard_EXPORT bool RejectEdge(const gp_Lin2d& L, const double Par) const;
0083
0084 Standard_EXPORT void CurrentEdge(Geom2dAdaptor_Curve& E, TopAbs_Orientation& Or) const;
0085
0086 private:
0087 NCollection_DataMap<int, Geom2dHatch_Element> myMap;
0088 NCollection_DataMap<int, Geom2dHatch_Element>::Iterator Iter;
0089 int NumWire;
0090 int NumEdge;
0091 int myCurEdge;
0092 double myCurEdgePar;
0093 };
0094
0095 #endif