0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / TopOpeBRepDS / TopOpeBRepDS_BuildTool.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-06-17
2// Created by: Jean Yves LEBEY
3// Copyright (c) 1993-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 _TopOpeBRepDS_BuildTool_HeaderFile
18#define _TopOpeBRepDS_BuildTool_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRep_Builder.hxx>
25#include <TopOpeBRepTool_CurveTool.hxx>
26#include <Standard_Boolean.hxx>
27#include <TopOpeBRepTool_OutCurveType.hxx>
28#include <Standard_Real.hxx>
29#include <Standard_Integer.hxx>
30#include <TopAbs_Orientation.hxx>
31class TopOpeBRepTool_GeomTool;
32class TopoDS_Shape;
33class TopOpeBRepDS_Point;
34class TopOpeBRepDS_Curve;
35class TopOpeBRepDS_DataStructure;
36class Geom_Curve;
37class TopOpeBRepDS_Surface;
38class TopoDS_Edge;
39class TopoDS_Vertex;
40class TopoDS_Face;
41class TopOpeBRepDS_HDataStructure;
42class Geom2d_Curve;
43class Geom_Surface;
44
45
46//! Provides a Tool to build topologies. Used to
47//! instantiate the Builder algorithm.
48class TopOpeBRepDS_BuildTool
49{
50public:
51
52 DEFINE_STANDARD_ALLOC
53
54
55 Standard_EXPORT TopOpeBRepDS_BuildTool();
56
57 Standard_EXPORT TopOpeBRepDS_BuildTool(const TopOpeBRepTool_OutCurveType OutCurveType);
58
59 Standard_EXPORT TopOpeBRepDS_BuildTool(const TopOpeBRepTool_GeomTool& GT);
60
61 Standard_EXPORT const TopOpeBRepTool_GeomTool& GetGeomTool() const;
62
63 Standard_EXPORT TopOpeBRepTool_GeomTool& ChangeGeomTool();
64
65 Standard_EXPORT void MakeVertex (TopoDS_Shape& V, const TopOpeBRepDS_Point& P) const;
66
67 Standard_EXPORT void MakeEdge (TopoDS_Shape& E, const TopOpeBRepDS_Curve& C) const;
68
69 Standard_EXPORT void MakeEdge (TopoDS_Shape& E, const TopOpeBRepDS_Curve& C, const TopOpeBRepDS_DataStructure& DS) const;
70
71 Standard_EXPORT void MakeEdge (TopoDS_Shape& E, const Handle(Geom_Curve)& C, const Standard_Real Tol) const;
72
73 Standard_EXPORT void MakeEdge (TopoDS_Shape& E) const;
74
75 Standard_EXPORT void MakeWire (TopoDS_Shape& W) const;
76
77 Standard_EXPORT void MakeFace (TopoDS_Shape& F, const TopOpeBRepDS_Surface& S) const;
78
79 Standard_EXPORT void MakeShell (TopoDS_Shape& Sh) const;
80
81 Standard_EXPORT void MakeSolid (TopoDS_Shape& S) const;
82
83 //! Make an edge <Eou> with the curve of the edge <Ein>
84 Standard_EXPORT void CopyEdge (const TopoDS_Shape& Ein, TopoDS_Shape& Eou) const;
85
86 Standard_EXPORT void GetOrientedEdgeVertices (TopoDS_Edge& E, TopoDS_Vertex& Vmin, TopoDS_Vertex& Vmax, Standard_Real& Parmin, Standard_Real& Parmax) const;
87
88 Standard_EXPORT void UpdateEdgeCurveTol (const TopoDS_Face& F1, const TopoDS_Face& F2, TopoDS_Edge& E, const Handle(Geom_Curve)& C3Dnew, const Standard_Real tol3d, const Standard_Real tol2d1, const Standard_Real tol2d2, Standard_Real& newtol, Standard_Real& newparmin, Standard_Real& newparmax) const;
89
90 Standard_EXPORT void ApproxCurves (const TopOpeBRepDS_Curve& C, TopoDS_Edge& E, Standard_Integer& inewC, const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
91
92 Standard_EXPORT void ComputePCurves (const TopOpeBRepDS_Curve& C, TopoDS_Edge& E, TopOpeBRepDS_Curve& newC, const Standard_Boolean CompPC1, const Standard_Boolean CompPC2, const Standard_Boolean CompC3D) const;
93
94 Standard_EXPORT void PutPCurves (const TopOpeBRepDS_Curve& newC, TopoDS_Edge& E, const Standard_Boolean CompPC1, const Standard_Boolean CompPC2) const;
95
96 Standard_EXPORT void RecomputeCurves (const TopOpeBRepDS_Curve& C, const TopoDS_Edge& oldE, TopoDS_Edge& E, Standard_Integer& inewC, const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
97
98 //! Make a face <Fou> with the surface of the face <Fin>
99 Standard_EXPORT void CopyFace (const TopoDS_Shape& Fin, TopoDS_Shape& Fou) const;
100
101 Standard_EXPORT void AddEdgeVertex (const TopoDS_Shape& Ein, TopoDS_Shape& Eou, const TopoDS_Shape& V) const;
102
103 Standard_EXPORT void AddEdgeVertex (TopoDS_Shape& E, const TopoDS_Shape& V) const;
104
105 Standard_EXPORT void AddWireEdge (TopoDS_Shape& W, const TopoDS_Shape& E) const;
106
107 Standard_EXPORT void AddFaceWire (TopoDS_Shape& F, const TopoDS_Shape& W) const;
108
109 Standard_EXPORT void AddShellFace (TopoDS_Shape& Sh, const TopoDS_Shape& F) const;
110
111 Standard_EXPORT void AddSolidShell (TopoDS_Shape& S, const TopoDS_Shape& Sh) const;
112
113 //! Sets the parameter <P> for the vertex <V> on the
114 //! edge <E>.
115 Standard_EXPORT void Parameter (const TopoDS_Shape& E, const TopoDS_Shape& V, const Standard_Real P) const;
116
117 //! Sets the range of edge <E>.
118 Standard_EXPORT void Range (const TopoDS_Shape& E, const Standard_Real first, const Standard_Real last) const;
119
120 //! Sets the range of edge <Eou> from <Ein>
121 //! only when <Ein> has a closed geometry.
122 Standard_EXPORT void UpdateEdge (const TopoDS_Shape& Ein, TopoDS_Shape& Eou) const;
123
124 //! Compute the parameter of the vertex <V>, supported
125 //! by the edge <E>, on the curve <C>.
126 Standard_EXPORT void Parameter (const TopOpeBRepDS_Curve& C, TopoDS_Shape& E, TopoDS_Shape& V) const;
127
128 //! Sets the curve <C> for the edge <E>
129 Standard_EXPORT void Curve3D (TopoDS_Shape& E, const Handle(Geom_Curve)& C, const Standard_Real Tol) const;
130
131 //! Sets the pcurve <C> for the edge <E> on the face
132 //! <F>. If OverWrite is True the old pcurve if there
133 //! is one is overwritten, else the two pcurves are
134 //! set.
135 Standard_EXPORT void PCurve (TopoDS_Shape& F, TopoDS_Shape& E, const Handle(Geom2d_Curve)& C) const;
136
137 Standard_EXPORT void PCurve (TopoDS_Shape& F, TopoDS_Shape& E, const TopOpeBRepDS_Curve& CDS, const Handle(Geom2d_Curve)& C) const;
138
139 Standard_EXPORT void Orientation (TopoDS_Shape& S, const TopAbs_Orientation O) const;
140
141 Standard_EXPORT TopAbs_Orientation Orientation (const TopoDS_Shape& S) const;
142
143 Standard_EXPORT void Closed (TopoDS_Shape& S, const Standard_Boolean B) const;
144
145 Standard_EXPORT Standard_Boolean Approximation() const;
146
147 Standard_EXPORT void UpdateSurface (const TopoDS_Shape& F, const Handle(Geom_Surface)& SU) const;
148
149 Standard_EXPORT void UpdateSurface (const TopoDS_Shape& E, const TopoDS_Shape& oldF, const TopoDS_Shape& newF) const;
150
151 Standard_EXPORT Standard_Boolean OverWrite() const;
152
153 Standard_EXPORT void OverWrite (const Standard_Boolean O);
154
155 Standard_EXPORT Standard_Boolean Translate() const;
156
157 Standard_EXPORT void Translate (const Standard_Boolean T);
158
159
160
161
162protected:
163
164
165
166
167
168private:
169
170
171 Standard_EXPORT void TranslateOnPeriodic (TopoDS_Shape& F, TopoDS_Shape& E, Handle(Geom2d_Curve)& C) const;
172
173
174 BRep_Builder myBuilder;
175 TopOpeBRepTool_CurveTool myCurveTool;
176 Standard_Boolean myOverWrite;
177 Standard_Boolean myTranslate;
178
179
180};
181
182
183
184
185
186
187
188#endif // _TopOpeBRepDS_BuildTool_HeaderFile