1 // Created on: 1994-12-16
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Geom2dHatch_Elements_HeaderFile
18 #define _Geom2dHatch_Elements_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Geom2dHatch_MapOfElements.hxx>
25 #include <Geom2dHatch_DataMapIteratorOfMapOfElements.hxx>
26 #include <Standard_Integer.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_Real.hxx>
29 #include <TopAbs_Orientation.hxx>
30 class Standard_DomainError;
31 class Standard_NoSuchObject;
32 class Geom2dHatch_Element;
35 class Geom2dAdaptor_Curve;
39 class Geom2dHatch_Elements
46 Standard_EXPORT Geom2dHatch_Elements();
48 Standard_EXPORT Geom2dHatch_Elements(const Geom2dHatch_Elements& Other);
50 Standard_EXPORT void Clear();
51 ~Geom2dHatch_Elements()
56 Standard_EXPORT Standard_Boolean Bind (const Standard_Integer K, const Geom2dHatch_Element& I);
58 Standard_EXPORT Standard_Boolean IsBound (const Standard_Integer K) const;
60 Standard_EXPORT Standard_Boolean UnBind (const Standard_Integer K);
62 Standard_EXPORT const Geom2dHatch_Element& Find (const Standard_Integer K) const;
63 const Geom2dHatch_Element& operator() (const Standard_Integer K) const
68 Standard_EXPORT Geom2dHatch_Element& ChangeFind (const Standard_Integer K);
69 Geom2dHatch_Element& operator() (const Standard_Integer K)
73 Standard_EXPORT Standard_Boolean CheckPoint (gp_Pnt2d& P);
75 Standard_EXPORT Standard_Boolean Reject (const gp_Pnt2d& P) const;
77 Standard_EXPORT Standard_Boolean Segment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
79 Standard_EXPORT Standard_Boolean OtherSegment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
81 Standard_EXPORT void InitWires();
83 Standard_EXPORT Standard_Boolean MoreWires() const;
85 Standard_EXPORT void NextWire();
87 Standard_EXPORT Standard_Boolean RejectWire (const gp_Lin2d& L, const Standard_Real Par) const;
89 Standard_EXPORT void InitEdges();
91 Standard_EXPORT Standard_Boolean MoreEdges() const;
93 Standard_EXPORT void NextEdge();
95 Standard_EXPORT Standard_Boolean RejectEdge (const gp_Lin2d& L, const Standard_Real Par) const;
97 Standard_EXPORT void CurrentEdge (Geom2dAdaptor_Curve& E, TopAbs_Orientation& Or) const;
112 Geom2dHatch_MapOfElements myMap;
113 Geom2dHatch_DataMapIteratorOfMapOfElements Iter;
114 Standard_Integer NumWire;
115 Standard_Integer NumEdge;
116 Standard_Integer myCurEdge;
127 #endif // _Geom2dHatch_Elements_HeaderFile