Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/HLRBRep_EdgeBuilder.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 class HLRBRep_EdgeBuilder
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   //! Creates an EdgeBuilder algorithm. <VList>
0037   //! describes the edge and the interferences.
0038   //! AreaLimits are created from the vertices.
0039   //! Builds(IN) is automatically called.
0040   Standard_EXPORT HLRBRep_EdgeBuilder(HLRBRep_VertexList& VList);
0041 
0042   //! Initialize an iteration on the areas.
0043   Standard_EXPORT void InitAreas();
0044 
0045   //! Set the current area to the next area.
0046   Standard_EXPORT void NextArea();
0047 
0048   //! Set the current area to the previous area.
0049   Standard_EXPORT void PreviousArea();
0050 
0051   //! Returns True if there is a current area.
0052   Standard_EXPORT bool HasArea() const;
0053 
0054   //! Returns the state of the current area.
0055   Standard_EXPORT TopAbs_State AreaState() const;
0056 
0057   //! Returns the edge state of the current area.
0058   Standard_EXPORT TopAbs_State AreaEdgeState() const;
0059 
0060   //! Returns the AreaLimit beginning the current area.
0061   //! This is a NULL handle when the area is infinite on
0062   //! the left.
0063   Standard_EXPORT occ::handle<HLRBRep_AreaLimit> LeftLimit() const;
0064 
0065   //! Returns the AreaLimit ending the current area.
0066   //! This is a NULL handle when the area is infinite on
0067   //! the right.
0068   Standard_EXPORT occ::handle<HLRBRep_AreaLimit> RightLimit() const;
0069 
0070   //! Reinitialize the results iteration to the parts
0071   //! with State <ToBuild>. If this method is not called
0072   //! after construction the default is <ToBuild> = IN.
0073   Standard_EXPORT void Builds(const TopAbs_State ToBuild);
0074 
0075   //! Returns True if there are more new edges to build.
0076   Standard_EXPORT bool MoreEdges() const;
0077 
0078   //! Proceeds to the next edge to build. Skip all
0079   //! remaining vertices on the current edge.
0080   Standard_EXPORT void NextEdge();
0081 
0082   //! True if there are more vertices in the current new
0083   //! edge.
0084   Standard_EXPORT bool MoreVertices() const;
0085 
0086   //! Proceeds to the next vertex of the current edge.
0087   Standard_EXPORT void NextVertex();
0088 
0089   //! Returns the current vertex of the current edge.
0090   Standard_EXPORT const HLRAlgo_Intersection& Current() const;
0091 
0092   //! Returns True if the current vertex comes from the
0093   //! boundary of the edge.
0094   Standard_EXPORT bool IsBoundary() const;
0095 
0096   //! Returns True if the current vertex was an
0097   //! interference.
0098   Standard_EXPORT bool IsInterference() const;
0099 
0100   //! Returns the new orientation of the current vertex.
0101   Standard_EXPORT TopAbs_Orientation Orientation() const;
0102 
0103   Standard_EXPORT void Destroy();
0104 
0105   ~HLRBRep_EdgeBuilder() { Destroy(); }
0106 
0107 private:
0108   TopAbs_State                   toBuild;
0109   occ::handle<HLRBRep_AreaLimit> myLimits;
0110   occ::handle<HLRBRep_AreaLimit> left;
0111   occ::handle<HLRBRep_AreaLimit> right;
0112   int                            current;
0113 };
0114 
0115 #endif // _HLRBRep_EdgeBuilder_HeaderFile