1 // Created on: 1998-07-02
2 // Created by: Joelle CHAUVET
3 // Copyright (c) 1998-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 _BRepFill_CompatibleWires_HeaderFile
18 #define _BRepFill_CompatibleWires_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopTools_SequenceOfShape.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <TopTools_DataMapOfShapeListOfShape.hxx>
28 #include <TopTools_ListOfShape.hxx>
29 class Standard_ConstructionError;
30 class Standard_NoSuchObject;
34 //! Constructs a sequence of Wires (with good orientation
35 //! and origin) agreed each other so that the surface passing
36 //! through these sections is not twisted
37 class BRepFill_CompatibleWires
44 Standard_EXPORT BRepFill_CompatibleWires();
46 Standard_EXPORT BRepFill_CompatibleWires(const TopTools_SequenceOfShape& Sections);
48 Standard_EXPORT void Init (const TopTools_SequenceOfShape& Sections);
50 Standard_EXPORT void SetPercent (const Standard_Real percent = 0.01);
52 //! Performs CompatibleWires According to the orientation
53 //! and the origin of each other
54 Standard_EXPORT void Perform (const Standard_Boolean WithRotation = Standard_True);
56 Standard_EXPORT Standard_Boolean IsDone() const;
58 //! returns the generated sequence.
59 Standard_EXPORT const TopTools_SequenceOfShape& Shape() const;
61 //! Returns the shapes created from a subshape
62 //! <SubSection> of a section.
63 Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Edge& SubSection) const;
65 Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const;
67 Standard_EXPORT Standard_Boolean IsDegeneratedFirstSection() const;
69 Standard_EXPORT Standard_Boolean IsDegeneratedLastSection() const;
82 //! Insert cutting points on closed wires to have same
83 //! number of edges. The sequence of shapes must
84 //! be a sequence of wires.
85 Standard_EXPORT void SameNumberByPolarMethod (const Standard_Boolean WithRotation = Standard_True);
87 //! Insert cutting points on open wires to have same
88 //! number of edges. The sequence of shapes must
89 //! be a sequence of wires.
90 Standard_EXPORT void SameNumberByACR (const Standard_Boolean report);
92 //! Computes origins and orientation on closed wires to
93 //! avoid twisted results. The sequence of shapes must
94 //! be a sequence of wires. <polar> must be true
95 //! if SameNumberByPolarMethod was used before.
96 Standard_EXPORT void ComputeOrigin (const Standard_Boolean polar);
98 //! Computes origins and orientation on open wires to
99 //! avoid twisted results. The sequence of shapes must
100 //! be a sequence of wires.
101 Standard_EXPORT void SearchOrigin();
104 TopTools_SequenceOfShape myInit;
105 TopTools_SequenceOfShape myWork;
106 Standard_Real myPercent;
107 Standard_Boolean myDegen1;
108 Standard_Boolean myDegen2;
109 Standard_Boolean myIsDone;
110 TopTools_DataMapOfShapeListOfShape myMap;
121 #endif // _BRepFill_CompatibleWires_HeaderFile