1 // Created on: 1995-09-01
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1995-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 _BRepAlgo_FaceRestrictor_HeaderFile
18 #define _BRepAlgo_FaceRestrictor_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <TopoDS_Face.hxx>
26 #include <TopTools_ListOfShape.hxx>
27 #include <TopTools_DataMapOfShapeListOfShape.hxx>
32 //! Builds all the faces limited with a set of non
33 //! jointing and planars wires. if
34 //! <ControlOrientation> is false The Wires must have
35 //! correct orientations. Sinon orientation des wires
36 //! de telle sorte que les faces ne soient pas infinies
37 //! et qu'elles soient disjointes.
38 class BRepAlgo_FaceRestrictor
45 Standard_EXPORT BRepAlgo_FaceRestrictor();
47 //! the surface of <F> will be the the surface of each new
49 //! <Proj> is used to update pcurves on edges if necessary.
51 Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Boolean Proj = Standard_False, const Standard_Boolean ControlOrientation = Standard_False);
53 //! Add the wire <W> to the set of wires.
56 //! The Wires must be closed.
58 //! The edges of <W> can be modified if they have not pcurves
59 //! on the surface <S> of <F>. In this case
60 //! if <Proj> is false the first pcurve of the edge
61 //! is positionned on <S>.
62 //! if <Proj> is True ,the Pcurve On <S> is the
63 //! projection of the curve 3d on <F>.
64 Standard_EXPORT void Add (TopoDS_Wire& W);
66 //! Removes all the Wires
67 Standard_EXPORT void Clear();
69 //! Evaluate all the faces limited by the set of Wires.
70 Standard_EXPORT void Perform();
72 Standard_EXPORT Standard_Boolean IsDone() const;
74 Standard_EXPORT Standard_Boolean More() const;
76 Standard_EXPORT void Next();
78 Standard_EXPORT TopoDS_Face Current() const;
92 //! Evaluate all the faces limited by the set of Wires.
93 Standard_EXPORT void PerformWithCorrection();
96 Standard_Boolean myDone;
97 Standard_Boolean modeProj;
99 TopTools_ListOfShape wires;
100 TopTools_ListOfShape faces;
101 Standard_Boolean myCorrection;
102 TopTools_DataMapOfShapeListOfShape keyIsIn;
103 TopTools_DataMapOfShapeListOfShape keyContains;
114 #endif // _BRepAlgo_FaceRestrictor_HeaderFile