Salome HOME
PR: synchro V6_main tag mergeto_V7_main_11Feb13
[modules/geom.git] / src / GEOM_I / GEOM_ICurvesOperations_i.cc
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22 #include <Standard_Stream.hxx>
23
24 #include "GEOM_ICurvesOperations_i.hh"
25
26 #include "utilities.h"
27 #include "OpUtil.hxx"
28
29 #include "GEOM_Engine.hxx"
30 #include "GEOM_Object.hxx"
31
32 //=============================================================================
33 /*!
34  *   constructor:
35  */
36 //=============================================================================
37 GEOM_ICurvesOperations_i::GEOM_ICurvesOperations_i (PortableServer::POA_ptr thePOA,
38                                                     GEOM::GEOM_Gen_ptr theEngine,
39                                                     ::GEOMImpl_ICurvesOperations* theImpl)
40 :GEOM_IOperations_i(thePOA, theEngine, theImpl)
41 {
42   MESSAGE("GEOM_ICurvesOperations_i::GEOM_ICurvesOperations_i");
43 }
44
45 //=============================================================================
46 /*!
47  *  destructor
48  */
49 //=============================================================================
50 GEOM_ICurvesOperations_i::~GEOM_ICurvesOperations_i()
51 {
52   MESSAGE("GEOM_ICurvesOperations_i::~GEOM_ICurvesOperations_i");
53 }
54
55
56 //=============================================================================
57 /*!
58  *  MakeCirclePntVecR
59  */
60 //=============================================================================
61 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCirclePntVecR
62                       (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
63                        CORBA::Double theR)
64 {
65   GEOM::GEOM_Object_var aGEOMObject;
66
67   //Set a not done flag
68   GetOperations()->SetNotDone();
69
70   // Not set thePnt means origin of global CS,
71   // Not set theVec means Z axis of global CS
72   //if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
73
74   //Get the arguments
75   Handle(GEOM_Object) aPnt, aVec;
76   if (!CORBA::is_nil(thePnt)) {
77     aPnt = GetObjectImpl(thePnt);
78     if (aPnt.IsNull()) return aGEOMObject._retn();
79   }
80   if (!CORBA::is_nil(theVec)) {
81     aVec = GetObjectImpl(theVec);
82     if (aVec.IsNull()) return aGEOMObject._retn();
83   }
84
85   // Make Circle
86   Handle(GEOM_Object) anObject =
87     GetOperations()->MakeCirclePntVecR(aPnt, aVec, theR);
88   if (!GetOperations()->IsDone() || anObject.IsNull())
89     return aGEOMObject._retn();
90
91   return GetObject(anObject);
92 }
93
94 //=============================================================================
95 /*!
96  *  MakeCircleThreePnt
97  */
98 //=============================================================================
99 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleThreePnt
100                       (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
101                        GEOM::GEOM_Object_ptr thePnt3)
102 {
103   GEOM::GEOM_Object_var aGEOMObject;
104
105   //Set a not done flag
106   GetOperations()->SetNotDone();
107
108   //Get the reference points
109   Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
110   Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
111   Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
112
113   if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
114
115   // Make Circle
116   Handle(GEOM_Object) anObject =
117       GetOperations()->MakeCircleThreePnt(aPnt1, aPnt2, aPnt3);
118   if (!GetOperations()->IsDone() || anObject.IsNull())
119     return aGEOMObject._retn();
120
121   return GetObject(anObject);
122 }
123
124 //=============================================================================
125 /*!
126  *  MakeCircleCenter2Pnt
127  */
128 //=============================================================================
129 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleCenter2Pnt
130                       (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
131                        GEOM::GEOM_Object_ptr thePnt3)
132 {
133   GEOM::GEOM_Object_var aGEOMObject;
134
135   //Set a not done flag
136   GetOperations()->SetNotDone();
137
138   //Get the reference points
139   Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
140   Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
141   Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
142
143   if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
144
145   // Make Circle
146   Handle(GEOM_Object) anObject = GetOperations()->MakeCircleCenter2Pnt(aPnt1, aPnt2, aPnt3);
147   if (!GetOperations()->IsDone() || anObject.IsNull())
148     return aGEOMObject._retn();
149
150   return GetObject(anObject);
151 }
152
153 //=============================================================================
154 /*!
155  *  MakeEllipse
156  */
157 //=============================================================================
158 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipse
159                       (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
160                        CORBA::Double theRMajor, double theRMinor)
161 {
162   GEOM::GEOM_Object_var aGEOMObject;
163
164   //Set a not done flag
165   GetOperations()->SetNotDone();
166
167   // Not set thePnt means origin of global CS,
168   // Not set theVec means Z axis of global CS
169   //if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
170
171   //Get the arguments
172   Handle(GEOM_Object) aPnt, aVec, aVecMaj;
173   if (!CORBA::is_nil(thePnt)) {
174     aPnt = GetObjectImpl(thePnt);
175     if (aPnt.IsNull()) return aGEOMObject._retn();
176   }
177   if (!CORBA::is_nil(theVec)) {
178     aVec = GetObjectImpl(theVec);
179     if (aVec.IsNull()) return aGEOMObject._retn();
180   }
181
182   // Make Ellipse
183   Handle(GEOM_Object) anObject =
184     GetOperations()->MakeEllipse(aPnt, aVec, theRMajor, theRMinor, aVecMaj);
185   if (!GetOperations()->IsDone() || anObject.IsNull())
186     return aGEOMObject._retn();
187
188   return GetObject(anObject);
189 }
190
191 //=============================================================================
192 /*!
193  *  MakeEllipseVec
194  */
195 //=============================================================================
196 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipseVec
197                       (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
198                        CORBA::Double theRMajor, double theRMinor,
199                        GEOM::GEOM_Object_ptr theVecMaj)
200 {
201   GEOM::GEOM_Object_var aGEOMObject;
202
203   //Set a not done flag
204   GetOperations()->SetNotDone();
205
206   // Not set thePnt means origin of global CS,
207   // Not set theVec means Z axis of global CS
208   // Not set theVecMaj means X axis of global CS
209   //if (thePnt == NULL || theVec == NULL || theVecMaj == NULL) return aGEOMObject._retn();
210
211   //Get the arguments
212   Handle(GEOM_Object) aPnt, aVec, aVecMaj;
213   if (!CORBA::is_nil(thePnt)) {
214     aPnt = GetObjectImpl(thePnt);
215     if (aPnt.IsNull()) return aGEOMObject._retn();
216   }
217   if (!CORBA::is_nil(theVec)) {
218     aVec = GetObjectImpl(theVec);
219     if (aVec.IsNull()) return aGEOMObject._retn();
220   }
221   if (!CORBA::is_nil(theVecMaj)) {
222     aVecMaj = GetObjectImpl(theVecMaj);
223     if (aVecMaj.IsNull()) return aGEOMObject._retn();
224   }
225
226   // Make Ellipse
227   Handle(GEOM_Object) anObject =
228     GetOperations()->MakeEllipse(aPnt, aVec, theRMajor, theRMinor, aVecMaj);
229   if (!GetOperations()->IsDone() || anObject.IsNull())
230     return aGEOMObject._retn();
231
232   return GetObject(anObject);
233 }
234
235 //=============================================================================
236 /*!
237  *  MakeArc
238  */
239 //=============================================================================
240 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArc
241                                                 (GEOM::GEOM_Object_ptr thePnt1,
242                                                  GEOM::GEOM_Object_ptr thePnt2,
243                                                  GEOM::GEOM_Object_ptr thePnt3)
244 {
245   GEOM::GEOM_Object_var aGEOMObject;
246
247   //Set a not done flag
248   GetOperations()->SetNotDone();
249
250   //Get the reference points
251   Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
252   Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
253   Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
254
255   if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
256
257   // Make Arc
258   Handle(GEOM_Object) anObject =
259     GetOperations()->MakeArc(aPnt1, aPnt2, aPnt3);
260   if (!GetOperations()->IsDone() || anObject.IsNull())
261     return aGEOMObject._retn();
262
263   return GetObject(anObject);
264 }
265
266
267 //=============================================================================
268 /*!
269  *  MakeArcCenter
270  */
271 //=============================================================================
272 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcCenter
273     (GEOM::GEOM_Object_ptr thePnt1,
274      GEOM::GEOM_Object_ptr thePnt2,
275      GEOM::GEOM_Object_ptr thePnt3,
276      CORBA::Boolean theSense)
277
278 {
279   GEOM::GEOM_Object_var aGEOMObject;
280   //Set a not done flag
281   GetOperations()->SetNotDone();
282
283   //Get the reference points
284   Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
285   Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
286   Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
287
288   if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
289
290   // Make ArcCenter
291   Handle(GEOM_Object) anObject =
292       GetOperations()->MakeArcCenter(aPnt1, aPnt2, aPnt3,theSense);
293   if (!GetOperations()->IsDone() || anObject.IsNull())
294     return aGEOMObject._retn();
295
296   return GetObject(anObject);
297 }
298
299 //=============================================================================
300 /*!
301  *  MakeArc
302  */
303 //=============================================================================
304 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcOfEllipse
305                                                 (GEOM::GEOM_Object_ptr thePnt1,
306                                                  GEOM::GEOM_Object_ptr thePnt2,
307                                                  GEOM::GEOM_Object_ptr thePnt3)
308 {
309   GEOM::GEOM_Object_var aGEOMObject;
310
311   //Set a not done flag
312   GetOperations()->SetNotDone();
313
314   //Get the reference points
315   Handle(GEOM_Object) aPnt1 = GetObjectImpl(thePnt1);
316   Handle(GEOM_Object) aPnt2 = GetObjectImpl(thePnt2);
317   Handle(GEOM_Object) aPnt3 = GetObjectImpl(thePnt3);
318
319   if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
320
321   // Make Arc
322   Handle(GEOM_Object) anObject =
323     GetOperations()->MakeArcOfEllipse(aPnt1, aPnt2, aPnt3);
324   if (!GetOperations()->IsDone() || anObject.IsNull())
325     return aGEOMObject._retn();
326
327   return GetObject(anObject);
328 }
329
330 //=============================================================================
331 /*!
332  *  MakePolyline
333  */
334 //=============================================================================
335 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakePolyline
336                                     (const GEOM::ListOfGO& thePoints,
337                                      CORBA::Boolean        theIsClosed)
338 {
339   GEOM::GEOM_Object_var aGEOMObject;
340
341   //Set a not done flag
342   GetOperations()->SetNotDone();
343
344   //Get the reference point
345   int ind = 0;
346   int aLen = thePoints.length();
347   std::list<Handle(GEOM_Object)> aPoints;
348   for (; ind < aLen; ind++) {
349     Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
350     if (aPnt.IsNull()) return aGEOMObject._retn();
351     aPoints.push_back(aPnt);
352   }
353
354   // Make Polyline
355   Handle(GEOM_Object) anObject =
356     GetOperations()->MakePolyline(aPoints, theIsClosed);
357   if (!GetOperations()->IsDone() || anObject.IsNull())
358     return aGEOMObject._retn();
359
360   return GetObject(anObject);
361 }
362
363 //=============================================================================
364 /*!
365  *  MakeSplineBezier
366  */
367 //=============================================================================
368 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineBezier
369                                               (const GEOM::ListOfGO& thePoints,
370                                                CORBA::Boolean        theIsClosed)
371 {
372   GEOM::GEOM_Object_var aGEOMObject;
373
374   //Set a not done flag
375   GetOperations()->SetNotDone();
376
377   //Get the reference point
378   int ind = 0;
379   int aLen = thePoints.length();
380   std::list<Handle(GEOM_Object)> aPoints;
381   for (; ind < aLen; ind++) {
382     Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
383     if (aPnt.IsNull()) return aGEOMObject._retn();
384     aPoints.push_back(aPnt);
385   }
386
387   // Make Bezier curve
388   Handle(GEOM_Object) anObject =
389       GetOperations()->MakeSplineBezier(aPoints, theIsClosed);
390   if (!GetOperations()->IsDone() || anObject.IsNull())
391     return aGEOMObject._retn();
392
393   return GetObject(anObject);
394 }
395
396 //=============================================================================
397 /*!
398  *  MakeSplineInterpolation
399  */
400 //=============================================================================
401 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineInterpolation
402                                               (const GEOM::ListOfGO& thePoints,
403                                                CORBA::Boolean        theIsClosed,
404                                                CORBA::Boolean        theDoReordering)
405 {
406   GEOM::GEOM_Object_var aGEOMObject;
407
408   //Set a not done flag
409   GetOperations()->SetNotDone();
410
411   //Get the reference point
412   int ind = 0;
413   int aLen = thePoints.length();
414   std::list<Handle(GEOM_Object)> aPoints;
415   for (; ind < aLen; ind++) {
416     Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
417     if (aPnt.IsNull()) return aGEOMObject._retn();
418     aPoints.push_back(aPnt);
419   }
420
421   // Make Polyline
422   Handle(GEOM_Object) anObject =
423     GetOperations()->MakeSplineInterpolation(aPoints, theIsClosed, theDoReordering);
424   if (!GetOperations()->IsDone() || anObject.IsNull())
425     return aGEOMObject._retn();
426
427   return GetObject(anObject);
428 }
429
430 //=============================================================================
431 /*!
432  *  MakeSplineInterpolWithTangents
433  */
434 //=============================================================================
435 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineInterpolWithTangents
436                                               (const GEOM::ListOfGO& thePoints,
437                                                GEOM::GEOM_Object_ptr theFirstVec,
438                                                GEOM::GEOM_Object_ptr theLastVec)
439 {
440   GEOM::GEOM_Object_var aGEOMObject;
441
442   //Set a not done flag
443   GetOperations()->SetNotDone();
444
445   //Get the reference points
446   int ind = 0;
447   int aLen = thePoints.length();
448   std::list<Handle(GEOM_Object)> aPoints;
449   for (; ind < aLen; ind++) {
450     Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]);
451     if (aPnt.IsNull()) return aGEOMObject._retn();
452     aPoints.push_back(aPnt);
453   }
454
455   //Get the reference vectors
456   Handle(GEOM_Object) aVec1 = GetObjectImpl(theFirstVec);
457   Handle(GEOM_Object) aVec2 = GetObjectImpl(theLastVec);
458
459   if (aVec1.IsNull() || aVec2.IsNull()) return aGEOMObject._retn();
460
461   // Make Polyline
462   Handle(GEOM_Object) anObject =
463     GetOperations()->MakeSplineInterpolWithTangents(aPoints, aVec1, aVec2);
464   if (!GetOperations()->IsDone() || anObject.IsNull())
465     return aGEOMObject._retn();
466
467   return GetObject(anObject);
468 }
469
470 //=============================================================================
471 /*!
472  *  MakeCurveParametric
473  */
474 //=============================================================================
475 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCurveParametric
476              (const char* thexExpr, const char* theyExpr, const char* thezExpr,
477               double theParamMin, double theParamMax, double theParamStep,
478               GEOM::curve_type theCurveType)
479 {
480   GEOM::GEOM_Object_var aGEOMObject;
481   //Set a not done flag
482   GetOperations()->SetNotDone();
483
484   GEOMImpl_ICurvesOperations::CurveType aType;
485   switch(theCurveType) {
486   case GEOM::Polyline:
487     aType = GEOMImpl_ICurvesOperations::Polyline;
488     break;
489   case GEOM::Bezier:
490     aType = GEOMImpl_ICurvesOperations::Bezier;
491     break;
492   case GEOM::Interpolation:
493     aType = GEOMImpl_ICurvesOperations::Interpolation;
494     break;
495   default:
496     break;
497   }
498
499   // Make Polyline
500   Handle(GEOM_Object) anObject =
501     GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
502                                          theParamMin, theParamMax,
503                                          theParamStep, aType);
504
505   if (!GetOperations()->IsDone() || anObject.IsNull())
506     return aGEOMObject._retn();
507
508   return GetObject(anObject);
509 }
510
511 //=============================================================================
512 /*!
513  *  MakeCurveParametricNew
514  */
515 //=============================================================================
516 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCurveParametricNew
517              (const char* thexExpr, const char* theyExpr, const char* thezExpr,
518               double theParamMin, double theParamMax, CORBA::Long theParamNbStep,
519               GEOM::curve_type theCurveType)
520 {
521   GEOM::GEOM_Object_var aGEOMObject;
522   //Set a not done flag
523   GetOperations()->SetNotDone();
524
525   GEOMImpl_ICurvesOperations::CurveType aType;
526   switch(theCurveType) {
527   case GEOM::Polyline:
528     aType = GEOMImpl_ICurvesOperations::Polyline;
529     break;
530   case GEOM::Bezier:
531     aType = GEOMImpl_ICurvesOperations::Bezier;
532     break;
533   case GEOM::Interpolation:
534     aType = GEOMImpl_ICurvesOperations::Interpolation;
535     break;
536   default:
537     break;
538   }
539
540   // Make Polyline
541   Handle(GEOM_Object) anObject =
542     GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
543                        theParamMin, theParamMax,
544                        0.0, aType, theParamNbStep, true);
545
546   if (!GetOperations()->IsDone() || anObject.IsNull())
547     return aGEOMObject._retn();
548
549   return GetObject(anObject);
550 }
551
552 //=============================================================================
553 /*!
554  *  MakeSketcher
555  */
556 //=============================================================================
557 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcher
558             (const char* theCommand, const GEOM::ListOfDouble& theWorkingPlane)
559 {
560   //Set a not done flag
561   GetOperations()->SetNotDone();
562
563   int ind = 0;
564   int aLen = theWorkingPlane.length();
565   std::list<double> aWorkingPlane;
566   for (; ind < aLen; ind++)
567     aWorkingPlane.push_back(theWorkingPlane[ind]);
568
569   // Make Sketcher
570   Handle(GEOM_Object) anObject =
571     GetOperations()->MakeSketcher(theCommand, aWorkingPlane);
572   if (!GetOperations()->IsDone() || anObject.IsNull())
573     return GEOM::GEOM_Object::_nil();
574
575   return GetObject(anObject);
576 }
577
578 //=============================================================================
579 /*!
580  *  MakeSketcherOnPlane
581  */
582 //=============================================================================
583 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcherOnPlane
584                 (const char* theCommand, GEOM::GEOM_Object_ptr theWorkingPlane)
585 {
586   //Set a not done flag
587   GetOperations()->SetNotDone();
588
589   Handle(GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
590
591   // Make Sketcher
592   Handle(GEOM_Object) anObject =
593       GetOperations()->MakeSketcherOnPlane(theCommand, aWorkingPlane);
594   if (!GetOperations()->IsDone() || anObject.IsNull())
595     return GEOM::GEOM_Object::_nil();
596
597   return GetObject(anObject);
598 }
599
600 //=============================================================================
601 /*!
602  *  Make3DSketcherCommand
603  */
604 //=============================================================================
605 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::Make3DSketcherCommand (const char* theCommand)
606 {
607   //Set a not done flag
608   GetOperations()->SetNotDone();
609
610   // Make 3D Sketcher
611   Handle(GEOM_Object) anObject = GetOperations()->Make3DSketcherCommand(theCommand);
612   if (!GetOperations()->IsDone() || anObject.IsNull())
613     return GEOM::GEOM_Object::_nil();
614
615   return GetObject(anObject);
616 }
617
618 //=============================================================================
619 /*!
620  *  Make3DSketcher
621  */
622 //=============================================================================
623 GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::Make3DSketcher
624             (const GEOM::ListOfDouble& theCoordinates)
625 {
626   //Set a not done flag
627   GetOperations()->SetNotDone();
628
629   int ind = 0;
630   int aLen = theCoordinates.length();
631   std::list<double> aCoords;
632   for (; ind < aLen; ind++)
633     aCoords.push_back(theCoordinates[ind]);
634
635   // Make Sketcher
636   Handle(GEOM_Object) anObject =
637     GetOperations()->Make3DSketcher(aCoords);
638   if (!GetOperations()->IsDone() || anObject.IsNull())
639     return GEOM::GEOM_Object::_nil();
640
641   return GetObject(anObject);
642 }