Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:24

0001 // Created on: 1995-12-21
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1995-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 _TopOpeBRepBuild_AreaBuilder_HeaderFile
0018 #define _TopOpeBRepBuild_AreaBuilder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopOpeBRepBuild_ListOfListOfLoop.hxx>
0025 #include <TopOpeBRepBuild_ListIteratorOfListOfListOfLoop.hxx>
0026 #include <Standard_Boolean.hxx>
0027 #include <TopAbs_State.hxx>
0028 #include <TopOpeBRepBuild_ListOfLoop.hxx>
0029 #include <TopOpeBRepBuild_LoopEnum.hxx>
0030 #include <Standard_Integer.hxx>
0031 class TopOpeBRepBuild_LoopSet;
0032 class TopOpeBRepBuild_LoopClassifier;
0033 class TopOpeBRepBuild_Loop;
0034 
0035 
0036 
0037 //! The AreaBuilder algorithm is  used  to
0038 //! reconstruct complex  topological objects as  Faces
0039 //! or Solids.
0040 //! * Loop is  the  composite topological object of
0041 //! the boundary. Wire for a Face. Shell for a Solid.
0042 //! *  LoopSet is a  tool describing the object  to
0043 //! build.  It gives an iteration  on Loops.  For each
0044 //! Loop it tells if it is on the boundary or if it is
0045 //! an interference.
0046 //! * LoopClassifier  is an algorithm  used to test
0047 //! if a Loop is inside  another  Loop.
0048 //! The  result of the  reconstruction is an iteration
0049 //! on the reconstructed areas.  An  area is described
0050 //! by a set of Loops.
0051 //! A AreaBuilder is built with :
0052 //! - a LoopSet describing the object to reconstruct.
0053 //! - a LoopClassifier providing the classification algorithm.
0054 class TopOpeBRepBuild_AreaBuilder 
0055 {
0056 public:
0057 
0058   DEFINE_STANDARD_ALLOC
0059 
0060   
0061   Standard_EXPORT TopOpeBRepBuild_AreaBuilder();
0062   
0063   //! Creates a AreaBuilder to build the areas on
0064   //! the shapes described by <LS> using the classifier <LC>.
0065   Standard_EXPORT TopOpeBRepBuild_AreaBuilder(TopOpeBRepBuild_LoopSet& LS, TopOpeBRepBuild_LoopClassifier& LC, const Standard_Boolean ForceClass = Standard_False);
0066   
0067   Standard_EXPORT virtual ~TopOpeBRepBuild_AreaBuilder();
0068   
0069   //! Sets a AreaBuilder to find the areas on
0070   //! the shapes described by <LS> using the classifier <LC>.
0071   Standard_EXPORT virtual void InitAreaBuilder (TopOpeBRepBuild_LoopSet& LS, TopOpeBRepBuild_LoopClassifier& LC, const Standard_Boolean ForceClass = Standard_False);
0072   
0073   //! Initialize iteration on areas.
0074   Standard_EXPORT Standard_Integer InitArea();
0075   
0076   Standard_EXPORT Standard_Boolean MoreArea() const;
0077   
0078   Standard_EXPORT void NextArea();
0079   
0080   //! Initialize iteration on loops of current Area.
0081   Standard_EXPORT Standard_Integer InitLoop();
0082   
0083   Standard_EXPORT Standard_Boolean MoreLoop() const;
0084   
0085   Standard_EXPORT void NextLoop();
0086   
0087   //! Returns the current Loop in the current area.
0088   Standard_EXPORT const Handle(TopOpeBRepBuild_Loop)& Loop() const;
0089   
0090   Standard_EXPORT virtual void ADD_Loop_TO_LISTOFLoop (const Handle(TopOpeBRepBuild_Loop)& L, TopOpeBRepBuild_ListOfLoop& LOL, const Standard_Address s = NULL) const;
0091   
0092   Standard_EXPORT virtual void REM_Loop_FROM_LISTOFLoop (TopOpeBRepBuild_ListIteratorOfListOfLoop& ITLOL, TopOpeBRepBuild_ListOfLoop& LOL, const Standard_Address s = NULL) const;
0093   
0094   Standard_EXPORT virtual void ADD_LISTOFLoop_TO_LISTOFLoop (TopOpeBRepBuild_ListOfLoop& LOL1, TopOpeBRepBuild_ListOfLoop& LOL2, const Standard_Address s = NULL, const Standard_Address s1 = NULL, const Standard_Address s2 = NULL) const;
0095 
0096 
0097 
0098 
0099 protected:
0100 
0101   
0102   Standard_EXPORT TopAbs_State CompareLoopWithListOfLoop (TopOpeBRepBuild_LoopClassifier& LC, const Handle(TopOpeBRepBuild_Loop)& L, const TopOpeBRepBuild_ListOfLoop& LOL, const TopOpeBRepBuild_LoopEnum le) const;
0103   
0104   Standard_EXPORT void Atomize (TopAbs_State& state, const TopAbs_State newstate) const;
0105 
0106 
0107   TopOpeBRepBuild_ListOfListOfLoop myArea;
0108   TopOpeBRepBuild_ListIteratorOfListOfListOfLoop myAreaIterator;
0109   TopOpeBRepBuild_ListIteratorOfListOfLoop myLoopIterator;
0110   Standard_Boolean myUNKNOWNRaise;
0111 
0112 
0113 private:
0114 
0115 
0116 
0117 
0118 
0119 };
0120 
0121 
0122 
0123 
0124 
0125 
0126 
0127 #endif // _TopOpeBRepBuild_AreaBuilder_HeaderFile