Salome HOME
e77c7e214e877a9539e0899e14c53cfdd3e71a57
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IBasicOperations.cxx
1 using namespace std;
2
3 #include "GEOMImpl_IBasicOperations.hxx"
4
5 #include "utilities.h"
6 #include "OpUtil.hxx"
7 #include "Utils_ExceptHandlers.hxx"
8
9 #include <TFunction_DriverTable.hxx>
10 #include <TFunction_Driver.hxx>
11 #include <TFunction_Logbook.hxx>
12 #include <TDF_Tool.hxx>
13
14 #include "GEOM_Function.hxx"
15
16 #include "GEOMImpl_PointDriver.hxx"
17 #include "GEOMImpl_VectorDriver.hxx"
18 #include "GEOMImpl_LineDriver.hxx"
19 #include "GEOMImpl_PlaneDriver.hxx"
20 #include "GEOMImpl_MarkerDriver.hxx"
21
22 #include "GEOMImpl_IPoint.hxx"
23 #include "GEOMImpl_IVector.hxx"
24 #include "GEOMImpl_ILine.hxx"
25 #include "GEOMImpl_IPlane.hxx"
26 #include "GEOMImpl_IMarker.hxx"
27
28 #include "GEOMImpl_Types.hxx"
29
30 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
31
32 //=============================================================================
33 /*!
34  *   constructor:
35  */
36 //=============================================================================
37 GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID)
38 : GEOM_IOperations(theEngine, theDocID)
39 {
40   MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations");
41 }
42
43 //=============================================================================
44 /*!
45  *  destructor
46  */
47 //=============================================================================
48 GEOMImpl_IBasicOperations::~GEOMImpl_IBasicOperations()
49 {
50   MESSAGE("GEOMImpl_IBasicOperations::~GEOMImpl_IBasicOperations");
51 }
52
53
54 //=============================================================================
55 /*!
56  *  MakePointXYZ
57  */
58 //=============================================================================
59 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ
60                                         (double theX, double theY, double theZ)
61 {
62   SetErrorCode(KO);
63
64   //Add a new Point object
65   Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
66
67   //Add a new Point function with XYZ parameters
68   Handle(GEOM_Function) aFunction =
69     aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ);
70   if (aFunction.IsNull()) return NULL;
71
72   //Check if the function is set correctly
73   if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL;
74
75   GEOMImpl_IPoint aPI(aFunction);
76
77   aPI.SetX(theX);
78   aPI.SetY(theY);
79   aPI.SetZ(theZ);
80
81   //Compute the point value
82   try {
83     if (!GetSolver()->ComputeFunction(aFunction)) {
84       SetErrorCode("Point driver failed");
85       return NULL;
86     }
87   }
88   catch (Standard_Failure) {
89     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
90     SetErrorCode(aFail->GetMessageString());
91     return NULL;
92   }
93
94   //Make a Python command
95   TCollection_AsciiString anEntry, aDescr;
96   TDF_Tool::Entry(aPoint->GetEntry(), anEntry);
97   aDescr += (anEntry+" = IBasicOperations.MakePointXYZ(");
98   aDescr += (TCollection_AsciiString(theX)+", ");
99   aDescr += (TCollection_AsciiString(theY)+", ");
100   aDescr += (TCollection_AsciiString(theZ)+")");
101
102   aFunction->SetDescription(aDescr);
103
104   SetErrorCode(OK);
105   return aPoint;
106 }
107
108 //=============================================================================
109 /*!
110  *  MakePointWithReference
111  */
112 //=============================================================================
113 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
114       (Handle(GEOM_Object) theReference, double theX, double theY, double theZ)
115 {
116   SetErrorCode(KO);
117
118   if (theReference.IsNull()) return NULL;
119
120   //Add a new Point object
121   Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
122
123   //Add a new Point function for creation a point relativley another point
124   Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF);
125
126   //Check if the function is set correctly
127   if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL;
128
129   GEOMImpl_IPoint aPI(aFunction);
130
131   Handle(GEOM_Function) aRefFunction = theReference->GetLastFunction();
132   if (aRefFunction.IsNull()) return NULL;
133
134   aPI.SetRef(aRefFunction);
135   aPI.SetX(theX);
136   aPI.SetY(theY);
137   aPI.SetZ(theZ);
138
139   //Compute the point value
140   try {
141     if (!GetSolver()->ComputeFunction(aFunction)) {
142       SetErrorCode("Point driver failed");
143       return NULL;
144     }
145   }
146   catch (Standard_Failure) {
147     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
148     SetErrorCode(aFail->GetMessageString());
149     return NULL;
150   }
151
152   //Make a Python command
153   TCollection_AsciiString anEntry, aDescr;
154   TDF_Tool::Entry(aPoint->GetEntry(), anEntry);
155   aDescr += (anEntry+" = IBasicOperations.MakePointReference(");
156   TDF_Tool::Entry(theReference->GetEntry(), anEntry);
157   aDescr += (anEntry+", ");
158   aDescr += (TCollection_AsciiString(theX)+", ");
159   aDescr += (TCollection_AsciiString(theY)+", ");
160   aDescr += (TCollection_AsciiString(theZ)+")");
161
162   aFunction->SetDescription(aDescr);
163
164   SetErrorCode(OK);
165   return aPoint;
166 }
167
168 //=============================================================================
169 /*!
170  *  MakePointOnCurve
171  */
172 //=============================================================================
173 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurve
174                             (Handle(GEOM_Object) theCurve, double theParameter)
175 {
176   SetErrorCode(KO);
177
178   if (theCurve.IsNull()) return NULL;
179
180   //Add a new Point object
181   Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
182
183   //Add a new Point function for creation a point relativley another point
184   Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_CURVE_PAR);
185
186   //Check if the function is set correctly
187   if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL;
188
189   GEOMImpl_IPoint aPI (aFunction);
190
191   Handle(GEOM_Function) aRefFunction = theCurve->GetLastFunction();
192   if (aRefFunction.IsNull()) return NULL;
193
194   aPI.SetCurve(aRefFunction);
195   aPI.SetParameter(theParameter);
196
197   //Compute the point value
198   try {
199     if (!GetSolver()->ComputeFunction(aFunction)) {
200       SetErrorCode("Point driver failed");
201       return NULL;
202     }
203   }
204   catch (Standard_Failure) {
205     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
206     SetErrorCode(aFail->GetMessageString());
207     return NULL;
208   }
209
210   //Make a Python command
211   TCollection_AsciiString anEntry, aDescr;
212   TDF_Tool::Entry(aPoint->GetEntry(), anEntry);
213   aDescr += (anEntry+" = IBasicOperations.MakePointReference(");
214   TDF_Tool::Entry(theCurve->GetEntry(), anEntry);
215   aDescr += (anEntry+", ");
216   aDescr += (TCollection_AsciiString(theParameter)+")");
217
218   aFunction->SetDescription(aDescr);
219
220   SetErrorCode(OK);
221   return aPoint;
222 }
223
224
225 //=============================================================================
226 /*!
227  *  MakeVectorDXDYDZ
228  */
229 //=============================================================================
230 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ
231                                      (double theDX, double theDY, double theDZ)
232 {
233   SetErrorCode(KO);
234
235   //Add a new Vector object
236   Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
237
238   //Add a new Vector function with DXDYDZ parameters
239   Handle(GEOM_Function) aFunction =
240     aVector->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_DX_DY_DZ);
241   if (aFunction.IsNull()) return NULL;
242
243   //Check if the function is set correctly
244   if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL;
245
246   GEOMImpl_IVector aPI (aFunction);
247
248   aPI.SetDX(theDX);
249   aPI.SetDY(theDY);
250   aPI.SetDZ(theDZ);
251
252   //Compute the Vector value
253   try {
254     if (!GetSolver()->ComputeFunction(aFunction)) {
255       SetErrorCode("Vector driver failed");
256       return NULL;
257     }
258   }
259   catch (Standard_Failure) {
260     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
261     SetErrorCode(aFail->GetMessageString());
262     return NULL;
263   }
264
265   //Make a Python command
266   TCollection_AsciiString anEntry, aDescr;
267   TDF_Tool::Entry(aVector->GetEntry(), anEntry);
268   aDescr += (anEntry+" = IBasicOperations.MakeVectorDXDYDZ(");
269   aDescr += (TCollection_AsciiString(theDX)+", ");
270   aDescr += (TCollection_AsciiString(theDY)+", ");
271   aDescr += (TCollection_AsciiString(theDZ)+")");
272
273   aFunction->SetDescription(aDescr);
274
275   SetErrorCode(OK);
276   return aVector;
277 }
278
279 //=============================================================================
280 /*!
281  *  MakeVectorTwoPnt
282  */
283 //=============================================================================
284 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt
285                      (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2)
286 {
287   SetErrorCode(KO);
288
289   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
290
291   //Add a new Vector object
292   Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
293
294   //Add a new Vector function
295   Handle(GEOM_Function) aFunction =
296     aVector->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TWO_PNT);
297
298   //Check if the function is set correctly
299   if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL;
300
301   GEOMImpl_IVector aPI (aFunction);
302
303   Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction();
304   Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction();
305   if (aRef1.IsNull() || aRef2.IsNull()) return NULL;
306
307   aPI.SetPoint1(aRef1);
308   aPI.SetPoint2(aRef2);
309
310   //Compute the Vector value
311   try {
312     if (!GetSolver()->ComputeFunction(aFunction)) {
313       SetErrorCode("Vector driver failed");
314       return NULL;
315     }
316   }
317   catch (Standard_Failure) {
318     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
319     SetErrorCode(aFail->GetMessageString());
320     return NULL;
321   }
322
323   //Make a Python command
324   TCollection_AsciiString anEntry, aDescr;
325   TDF_Tool::Entry(aVector->GetEntry(), anEntry);
326   aDescr += (anEntry+" = IBasicOperations.MakeVectorTwoPnt(");
327   TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
328   aDescr += (anEntry+", ");
329   TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
330   aDescr += (anEntry+")");
331
332   aFunction->SetDescription(aDescr);
333
334   SetErrorCode(OK);
335   return aVector;
336 }
337
338
339 //=============================================================================
340 /*!
341  *  MakeLineTwoPnt
342  */
343 //=============================================================================
344 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt
345                      (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2)
346 {
347   SetErrorCode(KO);
348
349   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
350
351   //Add a new Line object
352   Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
353
354   //Add a new Line function
355   Handle(GEOM_Function) aFunction =
356     aLine->AddFunction(GEOMImpl_LineDriver::GetID(), LINE_TWO_PNT);
357
358   //Check if the function is set correctly
359   if (aFunction->GetDriverGUID() != GEOMImpl_LineDriver::GetID()) return NULL;
360
361   GEOMImpl_ILine aPI (aFunction);
362
363   Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction();
364   Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction();
365   if (aRef1.IsNull() || aRef2.IsNull()) return NULL;
366
367   aPI.SetPoint1(aRef1);
368   aPI.SetPoint2(aRef2);
369
370   //Compute the Line value
371   try {
372     if (!GetSolver()->ComputeFunction(aFunction)) {
373       SetErrorCode("Line driver failed");
374       return NULL;
375     }
376   }
377   catch (Standard_Failure) {
378     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
379     SetErrorCode(aFail->GetMessageString());
380     return NULL;
381   }
382
383   //Make a Python command
384   TCollection_AsciiString anEntry, aDescr;
385   TDF_Tool::Entry(aLine->GetEntry(), anEntry);
386   aDescr += (anEntry+" = IBasicOperations.MakeLineTwoPnt(");
387   TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
388   aDescr += (anEntry+", ");
389   TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
390   aDescr += (anEntry+")");
391
392   aFunction->SetDescription(aDescr);
393
394   SetErrorCode(OK);
395   return aLine;
396 }
397
398
399 //=============================================================================
400 /*!
401  *  MakePlaneThreePnt
402  */
403 //=============================================================================
404 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt
405                      (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2,
406                       Handle(GEOM_Object) thePnt3, double theSize)
407 {
408   SetErrorCode(KO);
409
410   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
411
412   //Add a new Plane object
413   Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
414
415   //Add a new Plane function
416   Handle(GEOM_Function) aFunction =
417     aPlane->AddFunction(GEOMImpl_PlaneDriver::GetID(), PLANE_THREE_PNT);
418
419   //Check if the function is set correctly
420   if (aFunction->GetDriverGUID() != GEOMImpl_PlaneDriver::GetID()) return NULL;
421
422   GEOMImpl_IPlane aPI (aFunction);
423
424   Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction();
425   Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction();
426   Handle(GEOM_Function) aRef3 = thePnt3->GetLastFunction();
427   if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) return NULL;
428
429   aPI.SetPoint1(aRef1);
430   aPI.SetPoint2(aRef2);
431   aPI.SetPoint3(aRef3);
432   aPI.SetSize(theSize);
433
434   //Compute the Plane value
435   try {
436     if (!GetSolver()->ComputeFunction(aFunction)) {
437       SetErrorCode("Plane driver failed");
438       return NULL;
439     }
440   }
441   catch (Standard_Failure) {
442     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
443     SetErrorCode(aFail->GetMessageString());
444     return NULL;
445   }
446
447   //Make a Python command
448   TCollection_AsciiString anEntry, aDescr;
449   TDF_Tool::Entry(aPlane->GetEntry(), anEntry);
450   aDescr += (anEntry+" = IBasicOperations.MakePlaneThreePnt(");
451   TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
452   aDescr += (anEntry+", ");
453   TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
454   aDescr += (anEntry+", ");
455   TDF_Tool::Entry(thePnt3->GetEntry(), anEntry);
456   aDescr += (anEntry+", ");
457   aDescr += TCollection_AsciiString(theSize) + ")";
458
459   aFunction->SetDescription(aDescr);
460
461   SetErrorCode(OK);
462   return aPlane;
463 }
464
465 //=============================================================================
466 /*!
467  *  MakePlanePntVec
468  */
469 //=============================================================================
470 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec
471                        (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec,
472                         double theSize)
473 {
474   SetErrorCode(KO);
475
476   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
477
478   //Add a new Plane object
479   Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
480
481   //Add a new Plane function
482   Handle(GEOM_Function) aFunction =
483     aPlane->AddFunction(GEOMImpl_PlaneDriver::GetID(), PLANE_PNT_VEC);
484
485   //Check if the function is set correctly
486   if (aFunction->GetDriverGUID() != GEOMImpl_PlaneDriver::GetID()) return NULL;
487
488   GEOMImpl_IPlane aPI (aFunction);
489
490   Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction();
491   Handle(GEOM_Function) aRefVec = theVec->GetLastFunction();
492   if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL;
493
494   aPI.SetPoint(aRefPnt);
495   aPI.SetVector(aRefVec);
496   aPI.SetSize(theSize);
497
498   //Compute the Plane value
499   try {
500     if (!GetSolver()->ComputeFunction(aFunction)) {
501       SetErrorCode("Plane driver failed");
502       return NULL;
503     }
504   }
505   catch (Standard_Failure) {
506     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
507     SetErrorCode(aFail->GetMessageString());
508     return NULL;
509   }
510
511   //Make a Python command
512   TCollection_AsciiString anEntry, aDescr;
513   TDF_Tool::Entry(aPlane->GetEntry(), anEntry);
514   aDescr += (anEntry+" = IBasicOperations.MakePlanePntVec(");
515   TDF_Tool::Entry(thePnt->GetEntry(), anEntry);
516   aDescr += (anEntry+", ");
517   TDF_Tool::Entry(theVec->GetEntry(), anEntry);
518   aDescr += (anEntry+", ");
519   aDescr += TCollection_AsciiString(theSize) + ")";
520
521   aFunction->SetDescription(aDescr);
522
523   SetErrorCode(OK);
524   return aPlane;
525 }
526
527 //=============================================================================
528 /*!
529  *  MakePlaneFace
530  */
531 //=============================================================================
532 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace
533                        (Handle(GEOM_Object) theFace, double theSize)
534 {
535   SetErrorCode(KO);
536
537   if (theFace.IsNull()) return NULL;
538
539   //Add a new Plane object
540   Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
541
542   //Add a new Plane function
543   Handle(GEOM_Function) aFunction =
544     aPlane->AddFunction(GEOMImpl_PlaneDriver::GetID(), PLANE_FACE);
545
546   //Check if the function is set correctly
547   if (aFunction->GetDriverGUID() != GEOMImpl_PlaneDriver::GetID()) return NULL;
548
549   GEOMImpl_IPlane aPI (aFunction);
550
551   Handle(GEOM_Function) aRef = theFace->GetLastFunction();
552   if (aRef.IsNull()) return NULL;
553
554   aPI.SetFace(aRef);
555   aPI.SetSize(theSize);
556
557   //Compute the Plane value
558   try {
559     if (!GetSolver()->ComputeFunction(aFunction)) {
560       SetErrorCode("Plane driver failed");
561       return NULL;
562     }
563   }
564   catch (Standard_Failure) {
565     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
566     SetErrorCode(aFail->GetMessageString());
567     return NULL;
568   }
569
570   //Make a Python command
571   TCollection_AsciiString anEntry, aDescr;
572   TDF_Tool::Entry(aPlane->GetEntry(), anEntry);
573   aDescr += (anEntry+" = IBasicOperations.MakePlaneFace(");
574   TDF_Tool::Entry(theFace->GetEntry(), anEntry);
575   aDescr += (anEntry+", ");
576   aDescr += TCollection_AsciiString(theSize) + ")";
577
578   aFunction->SetDescription(aDescr);
579
580   SetErrorCode(OK);
581   return aPlane;
582 }
583
584
585 //=============================================================================
586 /*!
587  *  MakeMarker
588  */
589 //=============================================================================
590 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker
591                                   (double theOX,  double theOY,  double theOZ,
592                                    double theXDX, double theXDY, double theXDZ,
593                                    double theYDX, double theYDY, double theYDZ)
594 {
595   SetErrorCode(KO);
596
597   //Add a new Marker object
598   Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
599
600   //Add a new Marker function
601   Handle(GEOM_Function) aFunction =
602     aMarker->AddFunction(GEOMImpl_MarkerDriver::GetID(), MARKER_CS);
603   if (aFunction.IsNull()) return NULL;
604
605   //Check if the function is set correctly
606   if (aFunction->GetDriverGUID() != GEOMImpl_MarkerDriver::GetID()) return NULL;
607
608   GEOMImpl_IMarker aPI(aFunction);
609
610   aPI.SetOrigin(theOX, theOY, theOZ);
611   aPI.SetXDir(theXDX, theXDY, theXDZ);
612   aPI.SetYDir(theYDX, theYDY, theYDZ);
613
614   //Compute the marker value
615   try {
616     if (!GetSolver()->ComputeFunction(aFunction)) {
617       SetErrorCode("Marker driver failed");
618       return NULL;
619     }
620   }
621   catch (Standard_Failure) {
622     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
623     SetErrorCode(aFail->GetMessageString());
624     return NULL;
625   }
626
627   //Make a Python command
628   TCollection_AsciiString anEntry, aDescr;
629   TDF_Tool::Entry(aMarker->GetEntry(), anEntry);
630   aDescr += anEntry + " = IBasicOperations.MakeMarker(";
631   aDescr += TCollection_AsciiString(theOX) + ", ";
632   aDescr += TCollection_AsciiString(theOY) + ", ";
633   aDescr += TCollection_AsciiString(theOZ) + ", ";
634   aDescr += TCollection_AsciiString(theXDX) + ", ";
635   aDescr += TCollection_AsciiString(theXDY) + ", ";
636   aDescr += TCollection_AsciiString(theXDZ) + ", ";
637   aDescr += TCollection_AsciiString(theYDX) + ", ";
638   aDescr += TCollection_AsciiString(theYDY) + ", ";
639   aDescr += TCollection_AsciiString(theYDZ) + ")";
640
641   aFunction->SetDescription(aDescr);
642
643   SetErrorCode(OK);
644   return aMarker;
645 }