0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection...
[occt.git] / src / GeometryTest / GeometryTest_APICommands.cxx
CommitLineData
b311480e 1// Created on: 1995-01-17
2// Created by: Remi LEQUETTE
3// Copyright (c) 1995-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
543a9964 17#include <Geom_BSplineCurve.hxx>
18#include <Geom_BSplineSurface.hxx>
7fd59977 19#include <Draw.hxx>
20#include <Draw_Interpretor.hxx>
21#include <DrawTrSurf.hxx>
22#include <Draw_Appli.hxx>
23#include <GeometryTest.hxx>
24#include <GeomAPI_ProjectPointOnCurve.hxx>
25#include <GeomAPI_ProjectPointOnSurf.hxx>
5200cc4a 26#include <Extrema_GenLocateExtPS.hxx>
7fd59977 27#include <GeomAPI_ExtremaCurveCurve.hxx>
28#include <GeomAPI_ExtremaCurveSurface.hxx>
29#include <GeomAPI_ExtremaSurfaceSurface.hxx>
30#include <GeomAPI_PointsToBSpline.hxx>
31#include <GeomAPI_PointsToBSplineSurface.hxx>
32#include <Geom_Line.hxx>
33#include <Geom_TrimmedCurve.hxx>
34#include <Draw_Segment3D.hxx>
35#include <Draw_Marker3D.hxx>
36#include <Draw_Color.hxx>
37#include <Draw_MarkerShape.hxx>
38#include <TColgp_Array1OfPnt.hxx>
39#include <TColgp_Array2OfPnt.hxx>
40#include <TColStd_Array2OfReal.hxx>
41#include <Precision.hxx>
42#include <stdio.h>
5200cc4a 43
57c28b61 44#ifdef _WIN32
7fd59977 45Standard_IMPORT Draw_Viewer dout;
46#endif
47
48//=======================================================================
49//function : proj
50//purpose :
51//=======================================================================
52
5200cc4a 53static void showProjSolution(Draw_Interpretor& di,
54 const Standard_Integer i,
55 const gp_Pnt& P, const gp_Pnt& P1,
56 const Standard_Real U, const Standard_Real V,
57 const Standard_Boolean isSurface)
58{
59 char name[100];
60 Sprintf(name, "%s%d", "ext_", i);
61 di << name << " ";
62 char* temp = name; // portage WNT
63 if (P.Distance(P1) > Precision::Confusion())
64 {
65 Handle(Geom_Line) L = new Geom_Line(P, gp_Vec(P, P1));
66 Handle(Geom_TrimmedCurve) CT =
67 new Geom_TrimmedCurve(L, 0., P.Distance(P1));
68 DrawTrSurf::Set(temp, CT);
69 }
70 else
71 {
72 DrawTrSurf::Set(temp, P1);
73 if (isSurface)
74 di << " Point on surface ";
75 else
76 di << " Point on curve ";
77 }
78 if (isSurface)
79 di << " Parameters: " << U << " " << V << "\n";
80 else
81 di << " parameter " << i << " = " << U << "\n";
82}
83
84//=======================================================================
85//function : proj
86//purpose :
87//=======================================================================
88
7fd59977 89static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const char** a)
ecc4f148 90{
32ca7a51 91 if ( n < 5)
ecc4f148 92 {
5200cc4a 93 cout << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]" << endl;
569aff1e 94 return 1;
ecc4f148 95 }
7fd59977 96
91322f44 97 gp_Pnt P(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4]));
7fd59977 98
7fd59977 99 Handle(Geom_Curve) GC = DrawTrSurf::GetCurve(a[1]);
100 Handle(Geom_Surface) GS;
569aff1e 101 Extrema_ExtAlgo aProjAlgo = Extrema_ExtAlgo_Grad;
32ca7a51 102
569aff1e 103 if (n == 6 && a[5][0] == 't')
104 aProjAlgo = Extrema_ExtAlgo_Tree;
7fd59977 105
32ca7a51 106 if (GC.IsNull())
ecc4f148 107 {
7fd59977 108 GS = DrawTrSurf::GetSurface(a[1]);
ecc4f148 109
7fd59977 110 if (GS.IsNull())
111 return 1;
32ca7a51 112
5200cc4a 113 if (n <= 6)
114 {
115 Standard_Real U1, U2, V1, V2;
116 GS->Bounds(U1,U2,V1,V2);
7fd59977 117
5200cc4a 118 GeomAPI_ProjectPointOnSurf proj(P,GS,U1,U2,V1,V2,aProjAlgo);
119 if (!proj.IsDone())
120 {
121 di << "projection failed.";
122 return 0;
123 }
32ca7a51 124
5200cc4a 125 Standard_Real UU,VV;
126 for ( Standard_Integer i = 1; i <= proj.NbPoints(); i++)
ecc4f148 127 {
5200cc4a 128 gp_Pnt P1 = proj.Point(i);
129 proj.Parameters(i, UU, VV);
130 showProjSolution(di, i, P, P1, UU, VV, Standard_True);
ecc4f148 131 }
5200cc4a 132 }
133 else if (n == 7)
134 {
135 const gp_XY aP2d(Draw::Atof(a[5]), Draw::Atof(a[6]));
136 GeomAdaptor_Surface aGAS(GS);
137 Extrema_GenLocateExtPS aProjector(aGAS, Precision::PConfusion(), Precision::PConfusion());
138 aProjector.Perform(P, aP2d.X(), aP2d.Y());
139 if (!aProjector.IsDone())
ecc4f148 140 {
5200cc4a 141 di << "projection failed.";
142 return 0;
7fd59977 143 }
5200cc4a 144
145 const Extrema_POnSurf& aP = aProjector.Point();
146 Standard_Real UU, VV;
147 aP.Parameter(UU, VV);
148 showProjSolution(di, 1, P, aP.Value(), UU, VV, Standard_True);
7fd59977 149 }
ecc4f148 150 }
32ca7a51 151 else
ecc4f148 152 {
7fd59977 153 GeomAPI_ProjectPointOnCurve proj(P,GC,GC->FirstParameter(),
ecc4f148 154 GC->LastParameter());
32ca7a51 155
156 if(proj.NbPoints() == 0)
ecc4f148 157 {
32ca7a51 158 cout << "No project point was found." << endl;
159 return 0;
ecc4f148 160 }
32ca7a51 161
162 for ( Standard_Integer i = 1; i <= proj.NbPoints(); i++)
ecc4f148 163 {
7fd59977 164 gp_Pnt P1 = proj.Point(i);
165 Standard_Real UU = proj.Parameter(i);
5200cc4a 166 showProjSolution(di, i, P, P1, UU, UU, Standard_False);
7fd59977 167 }
ecc4f148 168 }
32ca7a51 169
7fd59977 170 return 0;
171}
172
173//=======================================================================
174//function : appro
175//purpose :
176//=======================================================================
177
178static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const char** a)
179{
180 if ( n<3) return 1;
181
182 Handle(Geom_Curve) GC;
91322f44 183 Standard_Integer Nb = Draw::Atoi(a[2]);
7fd59977 184
185 TColgp_Array1OfPnt Points(1, Nb);
186
187 Handle(Draw_Marker3D) mark;
188
189 if ( n == 4) {
190 GC = DrawTrSurf::GetCurve(a[3]);
191 if ( GC.IsNull())
192 return 1;
193
194 Standard_Real U, U1, U2;
195 U1 = GC->FirstParameter();
196 U2 = GC->LastParameter();
197 Standard_Real Delta = ( U2 - U1) / (Nb-1);
198 for ( Standard_Integer i = 1 ; i <= Nb; i++) {
199 U = U1 + (i-1) * Delta;
200 Points(i) = GC->Value(U);
201 mark = new Draw_Marker3D( Points(i), Draw_X, Draw_vert);
202 dout << mark;
203 }
204 }
205 else {
206 Standard_Integer id,XX,YY,b;
207 dout.Select(id,XX,YY,b);
208 Standard_Real zoom = dout.Zoom(id);
209
210 Points(1) = gp_Pnt( ((Standard_Real)XX)/zoom,
211 ((Standard_Real)YY)/zoom,
212 0.);
213
214 mark = new Draw_Marker3D( Points(1), Draw_X, Draw_vert);
215
216 dout << mark;
217
218 for (Standard_Integer i = 2; i<=Nb; i++) {
219 dout.Select(id,XX,YY,b);
220 Points(i) = gp_Pnt( ((Standard_Real)XX)/zoom,
221 ((Standard_Real)YY)/zoom,
222 0.);
223 mark = new Draw_Marker3D( Points(i), Draw_X, Draw_vert);
224 dout << mark;
225 }
226 }
227 dout.Flush();
228 Standard_Integer Dmin = 3;
229 Standard_Integer Dmax = 8;
230 Standard_Real Tol3d = 1.e-3;
231
232 Handle(Geom_BSplineCurve) TheCurve;
233 GeomAPI_PointsToBSpline aPointToBSpline(Points,Dmin,Dmax,GeomAbs_C2,Tol3d);
234 TheCurve = aPointToBSpline.Curve();
235
236
237 DrawTrSurf::Set(a[1], TheCurve);
238 di << a[1];
239
240 return 0;
241
242}
243
244
245//=======================================================================
246//function : grilapp
247//purpose :
248//=======================================================================
249
250static Standard_Integer grilapp(Draw_Interpretor& di, Standard_Integer n, const char** a)
251{
252 if ( n < 12) return 1;
253
254 Standard_Integer i,j;
91322f44 255 Standard_Integer Nu = Draw::Atoi(a[2]);
256 Standard_Integer Nv = Draw::Atoi(a[3]);
7fd59977 257 TColStd_Array2OfReal ZPoints (1, Nu, 1, Nv);
258
91322f44 259 Standard_Real X0 = Draw::Atof(a[4]);
260 Standard_Real dX = Draw::Atof(a[5]);
261 Standard_Real Y0 = Draw::Atof(a[6]);
262 Standard_Real dY = Draw::Atof(a[7]);
7fd59977 263
264 Standard_Integer Count = 8;
265 for ( j = 1; j <= Nv; j++) {
266 for ( i = 1; i <= Nu; i++) {
267 if ( Count > n) return 1;
91322f44 268 ZPoints(i,j) = Draw::Atof(a[Count]);
7fd59977 269 Count++;
270 }
271 }
272
273 Handle(Geom_BSplineSurface) S
274 = GeomAPI_PointsToBSplineSurface(ZPoints,X0,dX,Y0,dY);
275 DrawTrSurf::Set(a[1],S);
276
277 di << a[1];
278
279 return 0;
280}
281
282//=======================================================================
283//function : surfapp
284//purpose :
285//=======================================================================
286
287static Standard_Integer surfapp(Draw_Interpretor& di, Standard_Integer n, const char** a)
288{
289 if ( n < 5 ) return 1;
290
291 Standard_Integer i,j;
91322f44 292 Standard_Integer Nu = Draw::Atoi(a[2]);
293 Standard_Integer Nv = Draw::Atoi(a[3]);
7fd59977 294 TColgp_Array2OfPnt Points (1, Nu, 1, Nv);
295
296 if ( n == 5) {
297 Handle(Geom_Surface) Surf = DrawTrSurf::GetSurface(a[4]);
298 if ( Surf.IsNull()) return 1;
299
300 Standard_Real U, V, U1, V1, U2, V2;
301 Surf->Bounds( U1, U2, V1, V2);
302 for ( j = 1; j <= Nv; j++) {
303 V = V1 + (j-1) * (V2-V1) / (Nv-1);
304 for ( i = 1; i <= Nu; i++) {
305 U = U1 + (i-1) * (U2-U1) / (Nu-1);
306 Points(i,j) = Surf->Value(U,V);
307 }
308 }
309 }
310 else if ( n >= 16) {
311 Standard_Integer Count = 4;
312 for ( j = 1; j <= Nv; j++) {
313 for ( i = 1; i <= Nu; i++) {
314 if ( Count > n) return 1;
91322f44 315 Points(i,j) = gp_Pnt(Draw::Atof(a[Count]),Draw::Atof(a[Count+1]),Draw::Atof(a[Count+2]));
7fd59977 316 Count += 3;
317 }
318 }
319 }
320 char name[100];
321 Standard_Integer Count = 1;
322 for ( j = 1; j <= Nv; j++) {
323 for ( i = 1; i <= Nu; i++) {
91322f44 324 Sprintf(name,"point_%d",Count++);
7fd59977 325 char* temp = name; // portage WNT
326 DrawTrSurf::Set(temp,Points(i,j));
327 }
328 }
329
330 Handle(Geom_BSplineSurface) S = GeomAPI_PointsToBSplineSurface(Points);
331 DrawTrSurf::Set(a[1],S);
332 di << a[1];
333
334 return 0;
335}
336
337
338//=======================================================================
339//function : extrema
340//purpose :
341//=======================================================================
342
343static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const char** a)
344{
c858bb10 345 if (n < 3)
346 {
347 return 1;
348 }
7fd59977 349
350 Handle(Geom_Curve) GC1, GC2;
351 Handle(Geom_Surface) GS1, GS2;
352
353 Standard_Boolean C1 = Standard_False;
354 Standard_Boolean C2 = Standard_False;
355 Standard_Boolean S1 = Standard_False;
356 Standard_Boolean S2 = Standard_False;
92a206a3 357 Standard_Boolean isInfinitySolutions = Standard_False;
358 Standard_Real aMinDist = RealLast();
7fd59977 359
c858bb10 360 Standard_Real U1f, U1l, U2f, U2l, V1f = 0., V1l = 0., V2f = 0., V2l = 0.;
7fd59977 361
362 GC1 = DrawTrSurf::GetCurve(a[1]);
363 if ( GC1.IsNull()) {
364 GS1 = DrawTrSurf::GetSurface(a[1]);
365 if ( GS1.IsNull())
366 return 1;
367 S1 = Standard_True;
368 GS1->Bounds(U1f,U1l,V1f,V1l);
369 }
370 else {
371 C1 = Standard_True;
372 U1f = GC1->FirstParameter();
373 U1l = GC1->LastParameter();
374 }
375
376 GC2 = DrawTrSurf::GetCurve(a[2]);
377 if ( GC2.IsNull()) {
378 GS2 = DrawTrSurf::GetSurface(a[2]);
379 if ( GS2.IsNull())
380 return 1;
381 S2 = Standard_True;
382 GS2->Bounds(U2f,U2l,V2f,V2l);
383 }
384 else {
385 C2 = Standard_True;
386 U2f = GC2->FirstParameter();
387 U2l = GC2->LastParameter();
388 }
389
c858bb10 390 NCollection_Vector<gp_Pnt> aPnts1, aPnts2;
391 NCollection_Vector<Standard_Real> aPrms[4];
392 if (C1 && C2)
393 {
394 GeomAPI_ExtremaCurveCurve Ex(GC1, GC2, U1f, U1l, U2f, U2l);
92a206a3 395
396 for (Standard_Integer aJ = 1; aJ <= Ex.NbExtrema(); ++aJ)
32ca7a51 397 {
c858bb10 398 gp_Pnt aP1, aP2;
399 Ex.Points(aJ, aP1, aP2);
400 aPnts1.Append(aP1);
401 aPnts2.Append(aP2);
402
403 Standard_Real aU1, aU2;
404 Ex.Parameters(aJ, aU1, aU2);
405 aPrms[0].Append(aU1);
406 aPrms[2].Append(aU2);
7fd59977 407 }
92a206a3 408 // Since GeomAPI cannot provide access to flag directly.
409 isInfinitySolutions = Ex.Extrema().IsParallel();
03cca6f7 410 if (isInfinitySolutions)
411 aMinDist = Ex.LowerDistance();
c858bb10 412 }
413 else if (C1 && S2)
414 {
415 GeomAPI_ExtremaCurveSurface Ex(GC1, GS2, U1f, U1l, U2f, U2l, V2f, V2l);
416 for (Standard_Integer aJ = 1; aJ <= Ex.NbExtrema(); ++aJ)
417 {
418 gp_Pnt aP1, aP2;
419 Ex.Points(aJ, aP1, aP2);
420 aPnts1.Append(aP1);
421 aPnts2.Append(aP2);
422
423 Standard_Real aU1, aU2, aV2;
424 Ex.Parameters(aJ, aU1, aU2, aV2);
425 aPrms[0].Append(aU1);
426 aPrms[2].Append(aU2);
427 aPrms[3].Append(aV2);
428 }
03cca6f7 429 isInfinitySolutions = Ex.Extrema().IsParallel();
430 if (isInfinitySolutions)
431 aMinDist = Ex.LowerDistance();
c858bb10 432 }
433 else if (S1 && C2)
434 {
435 GeomAPI_ExtremaCurveSurface Ex(GC2, GS1, U2f, U2l, U1f, U1l, V1f, V1l);
436 for (Standard_Integer aJ = 1; aJ <= Ex.NbExtrema(); ++aJ)
32ca7a51 437 {
c858bb10 438 gp_Pnt aP2, aP1;
439 Ex.Points(aJ, aP2, aP1);
440 aPnts1.Append(aP1);
441 aPnts2.Append(aP2);
442
443 Standard_Real aU1, aV1, aU2;
444 Ex.Parameters(aJ, aU2, aU1, aV1);
445 aPrms[0].Append(aU1);
446 aPrms[1].Append(aV1);
447 aPrms[2].Append(aU2);
7fd59977 448 }
03cca6f7 449 isInfinitySolutions = Ex.Extrema().IsParallel();
450 if (isInfinitySolutions)
451 aMinDist = Ex.LowerDistance();
c858bb10 452 }
453 else if (S1 && S2)
454 {
455 GeomAPI_ExtremaSurfaceSurface Ex(
456 GS1, GS2, U1f, U1l, V1f, V1l, U2f, U2l, V2f, V2l);
457 for (Standard_Integer aJ = 1; aJ <= Ex.NbExtrema(); ++aJ)
32ca7a51 458 {
c858bb10 459 gp_Pnt aP1, aP2;
460 Ex.Points(aJ, aP1, aP2);
461 aPnts1.Append(aP1);
462 aPnts2.Append(aP2);
463
464 Standard_Real aU1, aV1, aU2, aV2;
465 Ex.Parameters(aJ, aU1, aV1, aU2, aV2);
466 aPrms[0].Append(aU1);
467 aPrms[1].Append(aV1);
468 aPrms[2].Append(aU2);
469 aPrms[3].Append(aV2);
470 }
471 }
32ca7a51 472
c858bb10 473 char aName[100];
474 char* aName2 = aName; // portage WNT
475
476 // Output points.
477 const Standard_Integer aPntCount = aPnts1.Size();
92a206a3 478 if (aPntCount == 0 || isInfinitySolutions)
c858bb10 479 {
92a206a3 480 // Infinity solutions flag may be set with 0 number of
481 // solutions in analytic extrema Curve/Curve.
482 if (isInfinitySolutions)
483 di << "Infinite number of extremas, distance = " << aMinDist << "\n";
484 else
485 di << "No solutions!\n";
c858bb10 486 }
487 for (Standard_Integer aJ = 1; aJ <= aPntCount; aJ++)
488 {
489 gp_Pnt aP1 = aPnts1(aJ - 1), aP2 = aPnts2(aJ - 1);
490
491 if (aP1.Distance(aP2) < 1.e-16)
492 {
493 di << "Extrema " << aJ << " is point : " <<
494 aP1.X() << " " << aP1.Y() << " " << aP1.Z() << "\n";
495 continue;
7fd59977 496 }
c858bb10 497
498 Handle(Geom_Line) aL = new Geom_Line(aP1, gp_Vec(aP1, aP2));
499 Handle(Geom_TrimmedCurve) aCT =
500 new Geom_TrimmedCurve(aL, 0., aP1.Distance(aP2));
501 Sprintf(aName, "%s%d", "ext_", aJ);
502 DrawTrSurf::Set(aName2, aCT);
503 di << aName << " ";
504 }
505
506 if (n >= 4)
507 {
508 // Output points.
509 for (Standard_Integer aJ = 1; aJ <= aPntCount; aJ++)
32ca7a51 510 {
c858bb10 511 gp_Pnt aP1 = aPnts1(aJ - 1), aP2 = aPnts2(aJ - 1);
512 Sprintf(aName, "%s%d%s", "ext_", aJ, "_2");
513 DrawTrSurf::Set(aName2, aP1);
514 di << aName << " ";
515 Sprintf(aName, "%s%d%s", "ext_", aJ, "_3");
516 DrawTrSurf::Set(aName2, aP2);
517 di << aName << " ";
518 }
32ca7a51 519
c858bb10 520 // Output parameters.
521 for (Standard_Integer aJ = 0; aJ < 4; ++aJ)
522 {
523 for (Standard_Integer aPrmCount = aPrms[aJ].Size(), aK = 0;
524 aK < aPrmCount; ++aK)
32ca7a51 525 {
c858bb10 526 Standard_Real aP = aPrms[aJ](aK);
527 Sprintf(aName, "%s%d%s%d", "prm_", aJ + 1, "_", aK + 1);
528 Draw::Set(aName2, aP);
529 di << aName << " ";
32ca7a51 530 }
7fd59977 531 }
c858bb10 532 }
7fd59977 533
534 return 0;
c858bb10 535}
7fd59977 536
537//=======================================================================
538//function : totalextcc
539//purpose :
540//=======================================================================
541
542static Standard_Integer totalextcc(Draw_Interpretor& di, Standard_Integer n, const char** a)
543{
544 if ( n<3) return 1;
545
546 Handle(Geom_Curve) GC1, GC2;
547
548
549 Standard_Real U1f,U1l,U2f,U2l;
550
551 GC1 = DrawTrSurf::GetCurve(a[1]);
552 if ( GC1.IsNull()) {
553 return 1;
554 }
555 else {
556 U1f = GC1->FirstParameter();
557 U1l = GC1->LastParameter();
558 }
559
560 GC2 = DrawTrSurf::GetCurve(a[2]);
561 if ( GC2.IsNull()) {
562 return 1;
563 }
564 else {
565 U2f = GC2->FirstParameter();
566 U2l = GC2->LastParameter();
567 }
568
569 char name[100];
570 GeomAPI_ExtremaCurveCurve Ex(GC1,GC2,U1f,U1l,U2f,U2l);
571 gp_Pnt P1,P2;
572 if(Ex.TotalNearestPoints(P1,P2)) {
573 if (P1.Distance(P2) < 1.e-16) {
574 di << "Extrema is point : " << P1.X() << " " << P1.Y() << " " << P1.Z() << "\n";
575 }
576 else {
586db386 577 di << "Extrema is segment of line\n";
7fd59977 578 Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
579 Handle(Geom_TrimmedCurve) CT =
580 new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
91322f44 581 Sprintf(name,"%s%d","ext_",1);
7fd59977 582 char* temp = name; // portage WNT
583 DrawTrSurf::Set(temp, CT);
584 di << name << " ";
585 }
586
587 Standard_Real u1, u2;
588 Ex.TotalLowerDistanceParameters(u1, u2);
589
590 di << "Parameters on curves : " << u1 << " " << u2 << "\n";
591
592 }
593 else {
586db386 594 di << "Curves are infinite and parallel\n";
7fd59977 595 }
596
597 di << "Minimal distance : " << Ex.TotalLowerDistance() << "\n";
598
599 return 0;
600
601}
602
603
604void GeometryTest::APICommands(Draw_Interpretor& theCommands)
605{
606 static Standard_Boolean done = Standard_False;
607 if (done) return;
608
609 done = Standard_True;
7fd59977 610
5200cc4a 611 theCommands.Add("proj", "proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]\n"
612 "\t\tOptional parameters are relevant to surf only.\n"
613 "\t\tIf initial {u v} are given then local extrema is called",__FILE__, proj);
7fd59977 614
7fd59977 615 theCommands.Add("appro", "appro result nbpoint [curve]",__FILE__, appro);
616 theCommands.Add("surfapp","surfapp result nbupoint nbvpoint x y z ....",
617 __FILE__,
618 surfapp);
619 theCommands.Add("grilapp",
620 "grilapp result nbupoint nbvpoint X0 dX Y0 dY z11 z12 .. z1nu .... ",
621 __FILE__,grilapp);
622
c858bb10 623 theCommands.Add("extrema", "extrema curve/surface curve/surface [extended_output = 0|1]",__FILE__,extrema);
7fd59977 624 theCommands.Add("totalextcc", "totalextcc curve curve",__FILE__,totalextcc);
625}