Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:34

0001 // Created on: 1994-12-16
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
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_MapOfElements.hxx>
0025 #include <Geom2dHatch_DataMapIteratorOfMapOfElements.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 
0034 
0035 class Geom2dHatch_Elements 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   Standard_EXPORT Geom2dHatch_Elements();
0043   
0044   Standard_EXPORT Geom2dHatch_Elements(const Geom2dHatch_Elements& Other);
0045   
0046   Standard_EXPORT void Clear();
0047 ~Geom2dHatch_Elements()
0048 {
0049   Clear();
0050 }
0051   
0052   Standard_EXPORT Standard_Boolean Bind (const Standard_Integer K, const Geom2dHatch_Element& I);
0053   
0054   Standard_EXPORT Standard_Boolean IsBound (const Standard_Integer K) const;
0055   
0056   Standard_EXPORT Standard_Boolean UnBind (const Standard_Integer K);
0057   
0058   Standard_EXPORT const Geom2dHatch_Element& Find (const Standard_Integer K) const;
0059 const Geom2dHatch_Element& operator() (const Standard_Integer K) const
0060 {
0061   return Find(K);
0062 }
0063   
0064   Standard_EXPORT Geom2dHatch_Element& ChangeFind (const Standard_Integer K);
0065 Geom2dHatch_Element& operator() (const Standard_Integer K)
0066 {
0067   return ChangeFind(K);
0068 }
0069   Standard_EXPORT Standard_Boolean CheckPoint (gp_Pnt2d& P);
0070 
0071   Standard_EXPORT Standard_Boolean Reject (const gp_Pnt2d& P) const;
0072   
0073   Standard_EXPORT Standard_Boolean Segment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
0074   
0075   Standard_EXPORT Standard_Boolean OtherSegment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
0076   
0077   Standard_EXPORT void InitWires();
0078   
0079   Standard_EXPORT Standard_Boolean MoreWires() const;
0080   
0081   Standard_EXPORT void NextWire();
0082   
0083   Standard_EXPORT Standard_Boolean RejectWire (const gp_Lin2d& L, const Standard_Real Par) const;
0084   
0085   Standard_EXPORT void InitEdges();
0086   
0087   Standard_EXPORT Standard_Boolean MoreEdges() const;
0088   
0089   Standard_EXPORT void NextEdge();
0090   
0091   Standard_EXPORT Standard_Boolean RejectEdge (const gp_Lin2d& L, const Standard_Real Par) const;
0092   
0093   Standard_EXPORT void CurrentEdge (Geom2dAdaptor_Curve& E, TopAbs_Orientation& Or) const;
0094 
0095 
0096 
0097 
0098 protected:
0099 
0100 
0101 
0102 
0103 
0104 private:
0105 
0106 
0107 
0108   Geom2dHatch_MapOfElements myMap;
0109   Geom2dHatch_DataMapIteratorOfMapOfElements Iter;
0110   Standard_Integer NumWire;
0111   Standard_Integer NumEdge;
0112   Standard_Integer myCurEdge;
0113   Standard_Real myCurEdgePar;
0114 
0115 };
0116 
0117 
0118 
0119 
0120 
0121 
0122 
0123 #endif // _Geom2dHatch_Elements_HeaderFile