0024002: Overall code and build procedure refactoring -- manual
[occt.git] / src / GeomFill / GeomFill_AppSurf.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-09-28
2// Created by: Bruno DUMORTIER
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 _GeomFill_AppSurf_HeaderFile
18#define _GeomFill_AppSurf_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Real.hxx>
27#include <TColgp_HArray2OfPnt.hxx>
28#include <TColStd_HArray2OfReal.hxx>
29#include <TColStd_HArray1OfReal.hxx>
30#include <TColStd_HArray1OfInteger.hxx>
31#include <TColgp_SequenceOfArray1OfPnt2d.hxx>
32#include <Approx_ParametrizationType.hxx>
33#include <GeomAbs_Shape.hxx>
34#include <AppBlend_Approx.hxx>
35#include <TColgp_Array2OfPnt.hxx>
36#include <TColStd_Array2OfReal.hxx>
37#include <TColStd_Array1OfReal.hxx>
38#include <TColStd_Array1OfInteger.hxx>
39#include <TColgp_Array1OfPnt2d.hxx>
40class StdFail_NotDone;
41class Standard_DomainError;
42class Standard_OutOfRange;
43class GeomFill_SectionGenerator;
44class GeomFill_Line;
45
c60ae7f6 46//! Approximate a BSplineSurface passing by all the
47//! curves described in the SectionGenerator
42cf5bc1 48
49class GeomFill_AppSurf : public AppBlend_Approx
50{
51public:
52
53 DEFINE_STANDARD_ALLOC
54
55
56 Standard_EXPORT GeomFill_AppSurf();
57
58 Standard_EXPORT GeomFill_AppSurf(const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
59
60 Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
61
62 Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType);
63
64 Standard_EXPORT void SetContinuity (const GeomAbs_Shape C);
65
66 Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3);
67
68 Standard_EXPORT Approx_ParametrizationType ParType() const;
69
70 Standard_EXPORT GeomAbs_Shape Continuity() const;
71
72 Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const;
73
74 Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Boolean SpApprox = Standard_False);
75
76 Standard_EXPORT void PerformSmoothing (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen);
77
78 Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Integer NbMaxP);
79
80 Standard_Boolean IsDone() const;
81
82 Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const;
83
84 Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const;
85
86 Standard_Integer UDegree() const;
87
88 Standard_Integer VDegree() const;
89
90 const TColgp_Array2OfPnt& SurfPoles() const;
91
92 const TColStd_Array2OfReal& SurfWeights() const;
93
94 const TColStd_Array1OfReal& SurfUKnots() const;
95
96 const TColStd_Array1OfReal& SurfVKnots() const;
97
98 const TColStd_Array1OfInteger& SurfUMults() const;
99
100 const TColStd_Array1OfInteger& SurfVMults() const;
101
102 Standard_Integer NbCurves2d() const;
103
104 Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const;
105
106 Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const;
107
108 Standard_Integer Curves2dDegree() const;
109
110 const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const;
111
112 const TColStd_Array1OfReal& Curves2dKnots() const;
113
114 const TColStd_Array1OfInteger& Curves2dMults() const;
115
116 void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const;
117
118 Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const;
119
120
121
122
123protected:
124
125
126
127
128
129private:
130
131
132 Standard_EXPORT void InternalPerform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Boolean SpApprox, const Standard_Boolean UseVariational);
133
134
135 Standard_Boolean done;
136 Standard_Integer dmin;
137 Standard_Integer dmax;
138 Standard_Real tol3d;
139 Standard_Real tol2d;
140 Standard_Integer nbit;
141 Standard_Integer udeg;
142 Standard_Integer vdeg;
143 Standard_Boolean knownp;
144 Handle(TColgp_HArray2OfPnt) tabPoles;
145 Handle(TColStd_HArray2OfReal) tabWeights;
146 Handle(TColStd_HArray1OfReal) tabUKnots;
147 Handle(TColStd_HArray1OfReal) tabVKnots;
148 Handle(TColStd_HArray1OfInteger) tabUMults;
149 Handle(TColStd_HArray1OfInteger) tabVMults;
150 TColgp_SequenceOfArray1OfPnt2d seqPoles2d;
151 Standard_Real tol3dreached;
152 Standard_Real tol2dreached;
153 Approx_ParametrizationType paramtype;
154 GeomAbs_Shape continuity;
155 Standard_Real critweights[3];
156
157
158};
159
160#define TheSectionGenerator GeomFill_SectionGenerator
161#define TheSectionGenerator_hxx <GeomFill_SectionGenerator.hxx>
162#define Handle_TheLine Handle(GeomFill_Line)
163#define TheLine GeomFill_Line
164#define TheLine_hxx <GeomFill_Line.hxx>
165#define AppBlend_AppSurf GeomFill_AppSurf
166#define AppBlend_AppSurf_hxx <GeomFill_AppSurf.hxx>
167
168#include <AppBlend_AppSurf.lxx>
169
170#undef TheSectionGenerator
171#undef TheSectionGenerator_hxx
172#undef Handle_TheLine
173#undef TheLine
174#undef TheLine_hxx
175#undef AppBlend_AppSurf
176#undef AppBlend_AppSurf_hxx
177
178
179
180
181#endif // _GeomFill_AppSurf_HeaderFile