Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-04-17
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1997-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 _HLRBRep_EdgeBuilder_HeaderFile
0018 #define _HLRBRep_EdgeBuilder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopAbs_State.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 class HLRBRep_AreaLimit;
0028 class HLRBRep_VertexList;
0029 class HLRAlgo_Intersection;
0030 
0031 
0032 
0033 class HLRBRep_EdgeBuilder 
0034 {
0035 public:
0036 
0037   DEFINE_STANDARD_ALLOC
0038 
0039   
0040   //! Creates  an   EdgeBuilder    algorithm.    <VList>
0041   //! describes   the edge    and  the    interferences.
0042   //! AreaLimits   are   created  from   the   vertices.
0043   //! Builds(IN) is automatically called.
0044   Standard_EXPORT HLRBRep_EdgeBuilder(HLRBRep_VertexList& VList);
0045   
0046   //! Initialize an iteration on the areas.
0047   Standard_EXPORT void InitAreas();
0048   
0049   //! Set the current area to the next area.
0050   Standard_EXPORT void NextArea();
0051   
0052   //! Set the current area to the previous area.
0053   Standard_EXPORT void PreviousArea();
0054   
0055   //! Returns True if there is a current area.
0056   Standard_EXPORT Standard_Boolean HasArea() const;
0057   
0058   //! Returns the state of the current area.
0059   Standard_EXPORT TopAbs_State AreaState() const;
0060   
0061   //! Returns the edge state of the current area.
0062   Standard_EXPORT TopAbs_State AreaEdgeState() const;
0063   
0064   //! Returns the  AreaLimit beginning the current area.
0065   //! This is a NULL handle when the area is infinite on
0066   //! the left.
0067   Standard_EXPORT Handle(HLRBRep_AreaLimit) LeftLimit() const;
0068   
0069   //! Returns the  AreaLimit   ending  the current area.
0070   //! This is a NULL handle when the area is infinite on
0071   //! the right.
0072   Standard_EXPORT Handle(HLRBRep_AreaLimit) RightLimit() const;
0073   
0074   //! Reinitialize  the results  iteration  to the parts
0075   //! with State <ToBuild>. If this method is not called
0076   //! after construction the default is <ToBuild> = IN.
0077   Standard_EXPORT void Builds (const TopAbs_State ToBuild);
0078   
0079   //! Returns True if there are more new edges to build.
0080   Standard_EXPORT Standard_Boolean MoreEdges() const;
0081   
0082   //! Proceeds  to  the  next  edge to  build.  Skip all
0083   //! remaining vertices on the current edge.
0084   Standard_EXPORT void NextEdge();
0085   
0086   //! True if there are more vertices in the current new
0087   //! edge.
0088   Standard_EXPORT Standard_Boolean MoreVertices() const;
0089   
0090   //! Proceeds to the next vertex of the current edge.
0091   Standard_EXPORT void NextVertex();
0092   
0093   //! Returns the current vertex of the current edge.
0094   Standard_EXPORT const HLRAlgo_Intersection& Current() const;
0095   
0096   //! Returns True if the  current vertex comes from the
0097   //! boundary of the edge.
0098   Standard_EXPORT Standard_Boolean IsBoundary() const;
0099   
0100   //! Returns  True if    the  current  vertex  was   an
0101   //! interference.
0102   Standard_EXPORT Standard_Boolean IsInterference() const;
0103   
0104   //! Returns the new orientation of the current vertex.
0105   Standard_EXPORT TopAbs_Orientation Orientation() const;
0106   
0107   Standard_EXPORT void Destroy();
0108 ~HLRBRep_EdgeBuilder()
0109 {
0110   Destroy();
0111 }
0112 
0113 
0114 
0115 
0116 protected:
0117 
0118 
0119 
0120 
0121 
0122 private:
0123 
0124 
0125 
0126   TopAbs_State toBuild;
0127   Handle(HLRBRep_AreaLimit) myLimits;
0128   Handle(HLRBRep_AreaLimit) left;
0129   Handle(HLRBRep_AreaLimit) right;
0130   Standard_Integer current;
0131 
0132 
0133 };
0134 
0135 
0136 
0137 
0138 
0139 
0140 
0141 #endif // _HLRBRep_EdgeBuilder_HeaderFile