forked from tpaviot/pythonocc-core
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAppCont.i
More file actions
188 lines (158 loc) · 5.48 KB
/
Copy pathAppCont.i
File metadata and controls
188 lines (158 loc) · 5.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/*
Copyright 2008-2017 Thomas Paviot (tpaviot@gmail.com)
This file is part of pythonOCC.
pythonOCC is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pythonOCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with pythonOCC. If not, see <http://www.gnu.org/licenses/>.
*/
%define APPCONTDOCSTRING
"This package provides the least square algorithms
necessary to approximate a set of continous curves
or a continous surface.
It also provides an instantiation of these algorithms
for a class Function, a function f(t).
The user will have to inherit class Function to use it.
-Level : Advanced.
All methods of all classes will be advanced.
"
%enddef
%module (package="OCC.Core", docstring=APPCONTDOCSTRING) AppCont
#pragma SWIG nowarn=504,325,503
%{
#ifdef WNT
#pragma warning(disable : 4716)
#endif
%}
%include ../common/CommonIncludes.i
%include ../common/ExceptionCatcher.i
%include ../common/FunctionTransformers.i
%include ../common/Operators.i
%include ../common/OccHandle.i
%include AppCont_headers.i
/* typedefs */
/* end typedefs declaration */
/* public enums */
/* end public enums declaration */
%nodefaultctor AppCont_Function;
class AppCont_Function {
public:
%feature("compactdefaultargs") GetNumberOfPoints;
%feature("autodoc", " * Get number of 3d and 2d points returned by 'Value' and 'D1' functions.
:param theNbPnt:
:type theNbPnt: int &
:param theNbPnt2d:
:type theNbPnt2d: int &
:rtype: None
") GetNumberOfPoints;
void GetNumberOfPoints (Standard_Integer &OutValue,Standard_Integer &OutValue);
%feature("compactdefaultargs") GetNbOf3dPoints;
%feature("autodoc", " * Get number of 3d points returned by 'Value' and 'D1' functions.
:rtype: int
") GetNbOf3dPoints;
Standard_Integer GetNbOf3dPoints ();
%feature("compactdefaultargs") GetNbOf2dPoints;
%feature("autodoc", " * Get number of 2d points returned by 'Value' and 'D1' functions.
:rtype: int
") GetNbOf2dPoints;
Standard_Integer GetNbOf2dPoints ();
%feature("compactdefaultargs") FirstParameter;
%feature("autodoc", " * Returns the first parameter of the function.
:rtype: float
") FirstParameter;
virtual Standard_Real FirstParameter ();
%feature("compactdefaultargs") LastParameter;
%feature("autodoc", " * Returns the last parameter of the function.
:rtype: float
") LastParameter;
virtual Standard_Real LastParameter ();
%feature("compactdefaultargs") Value;
%feature("autodoc", " * Returns the point at parameter <theU>.
:param theU:
:type theU: float
:param thePnt2d:
:type thePnt2d: NCollection_Array1<gp_Pnt2d>
:param thePnt:
:type thePnt: NCollection_Array1<gp_Pnt>
:rtype: bool
") Value;
virtual Standard_Boolean Value (const Standard_Real theU,NCollection_Array1<gp_Pnt2d> & thePnt2d,NCollection_Array1<gp_Pnt> & thePnt);
%feature("compactdefaultargs") D1;
%feature("autodoc", " * Returns the derivative at parameter <theU>.
:param theU:
:type theU: float
:param theVec2d:
:type theVec2d: NCollection_Array1<gp_Vec2d>
:param theVec:
:type theVec: NCollection_Array1<gp_Vec>
:rtype: bool
") D1;
virtual Standard_Boolean D1 (const Standard_Real theU,NCollection_Array1<gp_Vec2d> & theVec2d,NCollection_Array1<gp_Vec> & theVec);
%feature("compactdefaultargs") PeriodInformation;
%feature("autodoc", " * Return information about peridicity in output paramateters space. @param theDimIdx Defines index in output parameters space. 1 <= theDimIdx <= 3 * myNbPnt + 2 * myNbPnt2d.
:param Standard_Integer:
:type Standard_Integer:
:param IsPeriodic:
:type IsPeriodic: bool
:param thePeriod:
:type thePeriod: float &
:rtype: void
") PeriodInformation;
virtual void PeriodInformation (const Standard_Integer,Standard_Boolean &OutValue,Standard_Real &OutValue);
};
%extend AppCont_Function {
%pythoncode {
__repr__ = _dumps_object
}
};
%nodefaultctor AppCont_LeastSquare;
class AppCont_LeastSquare {
public:
%feature("compactdefaultargs") AppCont_LeastSquare;
%feature("autodoc", " :param SSP:
:type SSP: AppCont_Function &
:param U0:
:type U0: float
:param U1:
:type U1: float
:param FirstCons:
:type FirstCons: AppParCurves_Constraint
:param LastCons:
:type LastCons: AppParCurves_Constraint
:param Deg:
:type Deg: int
:param NbPoints:
:type NbPoints: int
:rtype: None
") AppCont_LeastSquare;
AppCont_LeastSquare (const AppCont_Function & SSP,const Standard_Real U0,const Standard_Real U1,const AppParCurves_Constraint FirstCons,const AppParCurves_Constraint LastCons,const Standard_Integer Deg,const Standard_Integer NbPoints);
%feature("compactdefaultargs") Value;
%feature("autodoc", " :rtype: AppParCurves_MultiCurve
") Value;
const AppParCurves_MultiCurve & Value ();
%feature("compactdefaultargs") Error;
%feature("autodoc", " :param F:
:type F: float &
:param MaxE3d:
:type MaxE3d: float &
:param MaxE2d:
:type MaxE2d: float &
:rtype: None
") Error;
void Error (Standard_Real &OutValue,Standard_Real &OutValue,Standard_Real &OutValue);
%feature("compactdefaultargs") IsDone;
%feature("autodoc", " :rtype: bool
") IsDone;
Standard_Boolean IsDone ();
};
%extend AppCont_LeastSquare {
%pythoncode {
__repr__ = _dumps_object
}
};