Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:13

0001 // Created on: 1992-09-22
0002 // Created by: Gilles DEBARBOUILLE
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 _MAT2d_Mat2d_HeaderFile
0018 #define _MAT2d_Mat2d_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TColStd_DataMapOfIntegerInteger.hxx>
0027 #include <MAT_DataMapOfIntegerBisector.hxx>
0028 #include <Standard_Real.hxx>
0029 class MAT_ListOfEdge;
0030 class MAT_ListOfBisector;
0031 class MAT2d_Tool2d;
0032 class MAT_Bisector;
0033 
0034 
0035 //! this class contains the generic algorithm of
0036 //! computation of the bisecting locus.
0037 class MAT2d_Mat2d 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   //! Empty constructor.
0045   Standard_EXPORT MAT2d_Mat2d(const Standard_Boolean IsOpenResult = Standard_False);
0046   
0047   Standard_EXPORT ~MAT2d_Mat2d();
0048   
0049   //! Algorithm of computation of the bisecting locus.
0050   Standard_EXPORT void CreateMat (MAT2d_Tool2d& aTool);
0051   
0052   //! Algorithm of computation of the bisecting locus for
0053   //! open wire.
0054   Standard_EXPORT void CreateMatOpen (MAT2d_Tool2d& aTool);
0055   
0056   //! Returns <TRUE> if CreateMat has succeeded.
0057   Standard_EXPORT Standard_Boolean IsDone() const;
0058   
0059   //! Initialize an iterator on the set of the roots
0060   //! of the trees of bisectors.
0061   Standard_EXPORT void Init();
0062   
0063   //! Return False if there is no more roots.
0064   Standard_EXPORT Standard_Boolean More() const;
0065   
0066   //! Move to the next root.
0067   Standard_EXPORT void Next();
0068   
0069   //! Returns the current root.
0070   Standard_EXPORT Handle(MAT_Bisector) Bisector() const;
0071   
0072   //! Returns True if there are semi_infinite bisectors.
0073   //! So there is a tree for each semi_infinte bisector.
0074   Standard_EXPORT Standard_Boolean SemiInfinite() const;
0075   
0076   //! Returns the total number of bisectors.
0077   Standard_EXPORT Standard_Integer NumberOfBisectors() const;
0078 
0079 
0080 
0081 
0082 protected:
0083 
0084 
0085 
0086 
0087 
0088 private:
0089 
0090   
0091   Standard_EXPORT void LoadBisectorsToRemove (Standard_Integer& noofbisectorstoremove, const Standard_Real distance1, const Standard_Real distance2, const Handle(MAT_Bisector)& bisector1, const Handle(MAT_Bisector)& bisector2, const Handle(MAT_Bisector)& bisector3, const Handle(MAT_Bisector)& bisector4);
0092   
0093   Standard_EXPORT void Intersect (MAT2d_Tool2d& atool, const Standard_Integer aside, Standard_Integer& noofbisectorstoremove, const Handle(MAT_Bisector)& bisector1, const Handle(MAT_Bisector)& bisector2);
0094 
0095 
0096   Standard_Boolean myIsOpenResult;
0097   Standard_Integer thenumberofbisectors;
0098   Standard_Integer thenumberofedges;
0099   Standard_Boolean semiInfinite;
0100   Handle(MAT_ListOfEdge) theedgelist;
0101   Handle(MAT_ListOfEdge) RemovedEdgesList;
0102   TColStd_DataMapOfIntegerInteger typeofbisectortoremove;
0103   MAT_DataMapOfIntegerBisector bisectoronetoremove;
0104   MAT_DataMapOfIntegerBisector bisectortwotoremove;
0105   MAT_DataMapOfIntegerBisector bisectormap;
0106   Handle(MAT_ListOfBisector) roots;
0107   Standard_Boolean isDone;
0108 
0109 
0110 };
0111 
0112 
0113 
0114 
0115 
0116 
0117 
0118 #endif // _MAT2d_Mat2d_HeaderFile