0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / BRepFill / BRepFill_Draft.hxx
CommitLineData
42cf5bc1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14#ifndef _BRepFill_Draft_HeaderFile
15#define _BRepFill_Draft_HeaderFile
16
17#include <Standard.hxx>
18#include <Standard_DefineAlloc.hxx>
19#include <Standard_Handle.hxx>
20
21#include <gp_Dir.hxx>
22#include <Standard_Real.hxx>
23#include <TopTools_HArray2OfShape.hxx>
24#include <TopTools_ListOfShape.hxx>
25#include <TopoDS_Shape.hxx>
26#include <TopoDS_Shell.hxx>
27#include <TopoDS_Wire.hxx>
28#include <GeomAbs_Shape.hxx>
29#include <BRepFill_TransitionStyle.hxx>
30#include <Standard_Boolean.hxx>
31class BRepFill_DraftLaw;
32class BRepFill_SectionLaw;
33class StdFail_NotDone;
34class TopoDS_Shape;
35class gp_Dir;
36class Geom_Surface;
37class TopoDS_Shell;
38class Bnd_Box;
39
40
41
42class BRepFill_Draft
43{
44public:
45
46 DEFINE_STANDARD_ALLOC
47
48
49 Standard_EXPORT BRepFill_Draft(const TopoDS_Shape& Shape, const gp_Dir& Dir, const Standard_Real Angle);
50
51 Standard_EXPORT void SetOptions (const BRepFill_TransitionStyle Style = BRepFill_Right, const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 3.0);
52
53 Standard_EXPORT void SetDraft (const Standard_Boolean IsInternal = Standard_False);
54
55 Standard_EXPORT void Perform (const Standard_Real LengthMax);
56
57 Standard_EXPORT void Perform (const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface = Standard_True);
58
59 Standard_EXPORT void Perform (const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide = Standard_True);
60
61 Standard_EXPORT Standard_Boolean IsDone() const;
62
63 //! Returns the draft surface
64 //! To have the complete shape
65 //! you have to use the Shape() methode.
66 Standard_EXPORT TopoDS_Shell Shell() const;
67
68 //! Returns the list of shapes generated from the
69 //! shape <S>.
70 Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
71
72 Standard_EXPORT TopoDS_Shape Shape() const;
73
74
75
76
77protected:
78
79
80
81
82
83private:
84
85
86 Standard_EXPORT void Init (const Handle(Geom_Surface)& Surf, const Standard_Real Length, const Bnd_Box& Box);
87
88 Standard_EXPORT void BuildShell (const Handle(Geom_Surface)& Surf, const Standard_Boolean KeepOutSide = Standard_False);
89
90 Standard_EXPORT Standard_Boolean Fuse (const TopoDS_Shape& S, const Standard_Boolean KeepOutSide);
91
92 Standard_EXPORT Standard_Boolean Sewing();
93
94
95 gp_Dir myDir;
96 Standard_Real myAngle;
97 Standard_Real angmin;
98 Standard_Real angmax;
99 Standard_Real myTol;
100 Handle(BRepFill_DraftLaw) myLoc;
101 Handle(BRepFill_SectionLaw) mySec;
102 Handle(TopTools_HArray2OfShape) mySections;
103 Handle(TopTools_HArray2OfShape) myFaces;
104 TopTools_ListOfShape myGenerated;
105 TopoDS_Shape myShape;
106 TopoDS_Shape myTop;
107 TopoDS_Shell myShell;
108 TopoDS_Wire myWire;
109 GeomAbs_Shape myCont;
110 BRepFill_TransitionStyle myStyle;
111 Standard_Boolean IsInternal;
112 Standard_Boolean myDone;
113
114
115};
116
117
118
119
120
121
122
123#endif // _BRepFill_Draft_HeaderFile