Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:12:32

0001 // Created on: 1992-02-18
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1992-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 _HLRAlgo_PolyAlgo_HeaderFile
0018 #define _HLRAlgo_PolyAlgo_HeaderFile
0019 
0020 #include <HLRAlgo_PolyData.hxx>
0021 #include <HLRAlgo_BiPoint.hxx>
0022 #include <NCollection_List.hxx>
0023 
0024 class HLRAlgo_EdgeStatus;
0025 class HLRAlgo_PolyShellData;
0026 
0027 //! to remove Hidden lines on Triangulations.
0028 class HLRAlgo_PolyAlgo : public Standard_Transient
0029 {
0030 
0031 public:
0032   Standard_EXPORT HLRAlgo_PolyAlgo();
0033 
0034   Standard_EXPORT void Init(const int theNbShells);
0035 
0036   const NCollection_Array1<occ::handle<HLRAlgo_PolyShellData>>& PolyShell() const
0037   {
0038     return myHShell;
0039   }
0040 
0041   NCollection_Array1<occ::handle<HLRAlgo_PolyShellData>>& ChangePolyShell() { return myHShell; }
0042 
0043   Standard_EXPORT void Clear();
0044 
0045   //! Prepare all the data to process the algo.
0046   Standard_EXPORT void Update();
0047 
0048   void InitHide()
0049   {
0050     myCurShell = 0;
0051     NextHide();
0052   }
0053 
0054   bool MoreHide() const { return myFound; }
0055 
0056   Standard_EXPORT void NextHide();
0057 
0058   //! process hiding between <Pt1> and <Pt2>.
0059   Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide(HLRAlgo_EdgeStatus& status,
0060                                                  int&                Index,
0061                                                  bool&               reg1,
0062                                                  bool&               regn,
0063                                                  bool&               outl,
0064                                                  bool&               intl);
0065 
0066   void InitShow()
0067   {
0068     myCurShell = 0;
0069     NextShow();
0070   }
0071 
0072   bool MoreShow() const { return myFound; }
0073 
0074   Standard_EXPORT void NextShow();
0075 
0076   //! process hiding between <Pt1> and <Pt2>.
0077   Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show(int&  Index,
0078                                                  bool& reg1,
0079                                                  bool& regn,
0080                                                  bool& outl,
0081                                                  bool& intl);
0082 
0083   DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo, Standard_Transient)
0084 
0085 private:
0086   NCollection_Array1<occ::handle<HLRAlgo_PolyShellData>> myHShell;
0087   HLRAlgo_PolyData::Triangle                             myTriangle;
0088   NCollection_List<HLRAlgo_BiPoint>::Iterator            mySegListIt;
0089   int                                                    myNbrShell;
0090   int                                                    myCurShell;
0091   bool                                                   myFound;
0092 };
0093 
0094 #endif // _HLRAlgo_PolyAlgo_HeaderFile