0026150: BRepOffsetAPI_ThruSections doesn't implement history method Generated().
[occt.git] / src / BRepFill / BRepFill_CompatibleWires.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepFill_CompatibleWires_HeaderFile
18#define _BRepFill_CompatibleWires_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
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>
29class Standard_ConstructionError;
30class Standard_NoSuchObject;
31class TopoDS_Edge;
32
33
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
37class BRepFill_CompatibleWires
38{
39public:
40
41 DEFINE_STANDARD_ALLOC
42
43
44 Standard_EXPORT BRepFill_CompatibleWires();
45
46 Standard_EXPORT BRepFill_CompatibleWires(const TopTools_SequenceOfShape& Sections);
47
48 Standard_EXPORT void Init (const TopTools_SequenceOfShape& Sections);
49
50 Standard_EXPORT void SetPercent (const Standard_Real percent = 0.01);
51
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);
55
56 Standard_EXPORT Standard_Boolean IsDone() const;
57
58 //! returns the generated sequence.
59 Standard_EXPORT const TopTools_SequenceOfShape& Shape() const;
60
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;
64
65 Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const;
66
50258e77 67 Standard_EXPORT Standard_Boolean IsDegeneratedFirstSection() const;
68
69 Standard_EXPORT Standard_Boolean IsDegeneratedLastSection() const;
42cf5bc1 70
71
72
73protected:
74
75
76
77
78
79private:
80
81
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);
86
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);
91
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);
97
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();
102
103
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;
111
112
113};
114
115
116
117
118
119
120
121#endif // _BRepFill_CompatibleWires_HeaderFile