1 // Created on: 1992-09-22
2 // Created by: Gilles DEBARBOUILLE
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _MAT2d_Mat2d_HeaderFile
18 #define _MAT2d_Mat2d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TColStd_DataMapOfIntegerInteger.hxx>
27 #include <MAT_DataMapOfIntegerBisector.hxx>
28 #include <Standard_Real.hxx>
30 class MAT_ListOfBisector;
35 //! this class contains the generic algoritm of
36 //! computation of the bisecting locus.
45 Standard_EXPORT MAT2d_Mat2d(const Standard_Boolean IsOpenResult = Standard_False);
47 Standard_EXPORT ~MAT2d_Mat2d();
49 //! Algoritm of computation of the bisecting locus.
50 Standard_EXPORT void CreateMat (MAT2d_Tool2d& aTool);
52 //! Algoritm of computation of the bisecting locus for
54 Standard_EXPORT void CreateMatOpen (MAT2d_Tool2d& aTool);
56 //! Returns <TRUE> if CreateMat has succeeded.
57 Standard_EXPORT Standard_Boolean IsDone() const;
59 //! Initialize an iterator on the set of the roots
60 //! of the trees of bisectors.
61 Standard_EXPORT void Init();
63 //! Return False if there is no more roots.
64 Standard_EXPORT Standard_Boolean More() const;
66 //! Move to the next root.
67 Standard_EXPORT void Next();
69 //! Returns the current root.
70 Standard_EXPORT Handle(MAT_Bisector) Bisector() const;
72 //! Returns True if there are semi_infinite bisectors.
73 //! So there is a tree for each semi_infinte bisector.
74 Standard_EXPORT Standard_Boolean SemiInfinite() const;
76 //! Returns the total number of bisectors.
77 Standard_EXPORT Standard_Integer NumberOfBisectors() const;
91 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);
93 Standard_EXPORT void Intersect (MAT2d_Tool2d& atool, const Standard_Integer aside, Standard_Integer& noofbisectorstoremove, const Handle(MAT_Bisector)& bisector1, const Handle(MAT_Bisector)& bisector2);
96 Standard_Boolean myIsOpenResult;
97 Standard_Integer thenumberofbisectors;
98 Standard_Integer thenumberofedges;
99 Standard_Boolean semiInfinite;
100 Handle(MAT_ListOfEdge) theedgelist;
101 Handle(MAT_ListOfEdge) RemovedEdgesList;
102 TColStd_DataMapOfIntegerInteger typeofbisectortoremove;
103 MAT_DataMapOfIntegerBisector bisectoronetoremove;
104 MAT_DataMapOfIntegerBisector bisectortwotoremove;
105 MAT_DataMapOfIntegerBisector bisectormap;
106 Handle(MAT_ListOfBisector) roots;
107 Standard_Boolean isDone;
118 #endif // _MAT2d_Mat2d_HeaderFile