]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_I/GEOM_IBasicOperations_i.cc
Salome HOME
4bea49cc2464baaf2ecaf33abf03e4212a325ef6
[modules/geom.git] / src / GEOM_I / GEOM_IBasicOperations_i.cc
1 //  Copyright (C) 2007-2010  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_IBasicOperations_i.hh"
25
26 #include "utilities.h"
27 #include "OpUtil.hxx"
28 #include "Utils_ExceptHandlers.hxx"
29
30 #include "GEOM_Engine.hxx"
31 #include "GEOM_Object.hxx"
32
33 //=============================================================================
34 /*!
35  *   constructor:
36  */
37 //=============================================================================
38 GEOM_IBasicOperations_i::GEOM_IBasicOperations_i (PortableServer::POA_ptr thePOA,
39                                                   GEOM::GEOM_Gen_ptr theEngine,
40                                                   ::GEOMImpl_IBasicOperations* theImpl)
41      :GEOM_IOperations_i(thePOA, theEngine, theImpl)
42 {
43   MESSAGE("GEOM_IBasicOperations_i::GEOM_IBasicOperations_i");
44 }
45
46 //=============================================================================
47 /*!
48  *  destructor
49  */
50 //=============================================================================
51 GEOM_IBasicOperations_i::~GEOM_IBasicOperations_i()
52 {
53   MESSAGE("GEOM_IBasicOperations_i::~GEOM_IBasicOperations_i");
54 }
55
56
57 //=============================================================================
58 /*!
59  *  MakePointXYZ
60  */
61 //=============================================================================
62 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointXYZ
63   (CORBA::Double theX, CORBA::Double theY, CORBA::Double theZ)
64 {
65   GEOM::GEOM_Object_var aGEOMObject;
66
67   //Set a not done flag
68   GetOperations()->SetNotDone();
69
70   //Create the point
71   Handle(GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ);
72   if (!GetOperations()->IsDone() || anObject.IsNull())
73     return aGEOMObject._retn();
74
75   return GetObject(anObject);
76 }
77
78 //=============================================================================
79 /*!
80  *  MakePointWithReference
81  */
82 //=============================================================================
83 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointWithReference
84   (GEOM::GEOM_Object_ptr theReference, CORBA::Double theX, CORBA::Double theY, CORBA::Double theZ)
85 {
86   GEOM::GEOM_Object_var aGEOMObject;
87
88   //Set a not done flag
89   GetOperations()->SetNotDone();
90
91   //Get the reference point
92   Handle(GEOM_Object) aReference = GetObjectImpl(theReference);
93   if (aReference.IsNull()) return aGEOMObject._retn();
94
95   //Create the point
96   Handle(GEOM_Object) anObject =
97     GetOperations()->MakePointWithReference(aReference, theX, theY, theZ);
98   if (!GetOperations()->IsDone() || anObject.IsNull())
99     return aGEOMObject._retn();
100
101   return GetObject(anObject);
102 }
103
104 //=============================================================================
105 /*!
106  *  MakePointOnLinesIntersection
107  */
108 //=============================================================================
109 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnLinesIntersection
110                   (GEOM::GEOM_Object_ptr theLine1,  GEOM::GEOM_Object_ptr theLine2)
111 {
112   GEOM::GEOM_Object_var aGEOMObject;
113
114   //Set a not done flag
115   GetOperations()->SetNotDone();
116
117   //Get the reference Lines
118   Handle(GEOM_Object) aRef1 = GetObjectImpl(theLine1);
119   Handle(GEOM_Object) aRef2 = GetObjectImpl(theLine2);
120   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
121
122   //Create the point
123   Handle(GEOM_Object) anObject =
124     GetOperations()->MakePointOnLinesIntersection(aRef1, aRef2);
125   if (!GetOperations()->IsDone() || anObject.IsNull())
126     return aGEOMObject._retn();
127
128   return GetObject(anObject);
129 }
130
131 //=============================================================================
132 /*!
133  *  MakePointOnCurve
134  */
135 //=============================================================================
136 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve
137                   (GEOM::GEOM_Object_ptr theCurve,  CORBA::Double theParameter)
138 {
139   GEOM::GEOM_Object_var aGEOMObject;
140
141   //Set a not done flag
142   GetOperations()->SetNotDone();
143
144   //Get the reference curve
145   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
146   if (aReference.IsNull()) return aGEOMObject._retn();
147
148   //Create the point
149   Handle(GEOM_Object) anObject =
150     GetOperations()->MakePointOnCurve(aReference, theParameter);
151   if (!GetOperations()->IsDone() || anObject.IsNull())
152     return aGEOMObject._retn();
153
154   return GetObject(anObject);
155 }
156
157 //=============================================================================
158 /*!
159  *  MakePointOnCurveByLength
160  */
161 //=============================================================================
162 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurveByLength
163                   (GEOM::GEOM_Object_ptr theCurve,  
164                    CORBA::Double         theLength,
165                    GEOM::GEOM_Object_ptr theStartPoint)
166 {
167   GEOM::GEOM_Object_var aGEOMObject;
168
169   //Set a not done flag
170   GetOperations()->SetNotDone();
171
172   //Get the reference curve
173   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
174   if (aReference.IsNull()) return aGEOMObject._retn();
175
176   //Get the reference point (can be NULL)
177   Handle(GEOM_Object) aRefPoint;
178   if (!CORBA::is_nil(theStartPoint)) {
179     aRefPoint = GetObjectImpl(theStartPoint);
180   }
181
182   //Create the point
183   Handle(GEOM_Object) anObject =
184     GetOperations()->MakePointOnCurveByLength(aReference, theLength, aRefPoint);
185   if (!GetOperations()->IsDone() || anObject.IsNull())
186     return aGEOMObject._retn();
187
188   return GetObject(anObject);
189 }
190
191 //=============================================================================
192 /*!
193  *  MakePointOnCurveByCoord
194  */
195 //=============================================================================
196 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurveByCoord
197                   (GEOM::GEOM_Object_ptr theCurve, 
198                    CORBA::Double theXParameter,
199                    CORBA::Double theYParameter,
200                    CORBA::Double theZParameter)
201 {
202   GEOM::GEOM_Object_var aGEOMObject;
203
204   //Set a not done flag
205   GetOperations()->SetNotDone();
206
207   //Get the reference curve
208   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
209   if (aReference.IsNull()) return aGEOMObject._retn();
210
211   //Create the point
212   Handle(GEOM_Object) anObject =
213     GetOperations()->MakePointOnCurveByCoord(aReference, theXParameter,
214                                              theYParameter, theZParameter);
215   if (!GetOperations()->IsDone() || anObject.IsNull())
216     return aGEOMObject._retn();
217
218   return GetObject(anObject);
219 }
220
221 //=============================================================================
222 /*!
223  *  MakePointOnSurface
224  */
225 //=============================================================================
226 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurface
227                                              (GEOM::GEOM_Object_ptr theSurface,
228                                               CORBA::Double theUParameter,
229                                               CORBA::Double theVParameter)
230 {
231   GEOM::GEOM_Object_var aGEOMObject;
232
233   //Set a not done flag
234   GetOperations()->SetNotDone();
235
236   //Get the reference surface
237   Handle(GEOM_Object) aReference = GetObjectImpl(theSurface);
238   if (aReference.IsNull()) return aGEOMObject._retn();
239
240   //Create the point
241   Handle(GEOM_Object) anObject =
242     GetOperations()->MakePointOnSurface(aReference, theUParameter, theVParameter);
243   if (!GetOperations()->IsDone() || anObject.IsNull())
244     return aGEOMObject._retn();
245
246   return GetObject(anObject);
247 }
248
249 //=============================================================================
250 /*!
251  *  MakePointOnSurfaceByCoord
252  */
253 //=============================================================================
254 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurfaceByCoord
255                                              (GEOM::GEOM_Object_ptr theSurface,
256                                               CORBA::Double theXParameter,
257                                               CORBA::Double theYParameter,
258                                               CORBA::Double theZParameter)
259 {
260   GEOM::GEOM_Object_var aGEOMObject;
261
262   //Set a not done flag
263   GetOperations()->SetNotDone();
264
265   //Get the reference surface
266   Handle(GEOM_Object) aReference = GetObjectImpl(theSurface);
267   if (aReference.IsNull()) return aGEOMObject._retn();
268
269   //Create the point
270   Handle(GEOM_Object) anObject =
271     GetOperations()->MakePointOnSurfaceByCoord(aReference, theXParameter,
272                                                theYParameter, theZParameter);
273   if (!GetOperations()->IsDone() || anObject.IsNull())
274     return aGEOMObject._retn();
275
276   return GetObject(anObject);
277 }
278
279
280 //=============================================================================
281 /*!
282  *  MakeTangentOnCurve
283  */
284 //=============================================================================
285 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentOnCurve
286                   (GEOM::GEOM_Object_ptr theCurve,  CORBA::Double theParameter)
287 {
288   GEOM::GEOM_Object_var aGEOMObject;
289
290   //Set a not done flag
291   GetOperations()->SetNotDone();
292
293   //Get the reference curve
294   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
295   if (aReference.IsNull()) return aGEOMObject._retn();
296
297   //Create the vector
298   Handle(GEOM_Object) anObject =
299     GetOperations()->MakeTangentOnCurve(aReference, theParameter);
300   if (!GetOperations()->IsDone() || anObject.IsNull())
301     return aGEOMObject._retn();
302
303   return GetObject(anObject);
304 }
305
306 //=============================================================================
307 /*!
308  *  MakeVectorDXDYDZ
309  */
310 //=============================================================================
311 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorDXDYDZ
312   (CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
313 {
314   GEOM::GEOM_Object_var aGEOMObject;
315
316   //Set a not done flag
317   GetOperations()->SetNotDone();
318
319   //Create the Vector
320
321   Handle(GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ);
322   if (!GetOperations()->IsDone() || anObject.IsNull())
323     return aGEOMObject._retn();
324
325   return GetObject(anObject);
326 }
327
328 //=============================================================================
329 /*!
330  *  MakeVectorTwoPnt
331  */
332 //=============================================================================
333 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorTwoPnt
334                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2)
335 {
336   GEOM::GEOM_Object_var aGEOMObject;
337
338   //Set a not done flag
339   GetOperations()->SetNotDone();
340
341   //Get the reference points
342   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
343   Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
344   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
345
346   //Create the vector
347   Handle(GEOM_Object) anObject = GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
348   if (!GetOperations()->IsDone() || anObject.IsNull())
349     return aGEOMObject._retn();
350
351   return GetObject(anObject);
352 }
353
354
355 //=============================================================================
356 /*!
357  *  MakeLine
358  */
359 //=============================================================================
360 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLine
361                    (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theDir)
362 {
363   GEOM::GEOM_Object_var aGEOMObject;
364
365   //Set a not done flag
366   GetOperations()->SetNotDone();
367
368   //Get the reference objects
369   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
370   Handle(GEOM_Object) aRef2 = GetObjectImpl(theDir);
371   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
372
373   //Create the Line
374   Handle(GEOM_Object) anObject = GetOperations()->MakeLine(aRef1, aRef2);
375   if (!GetOperations()->IsDone() || anObject.IsNull())
376     return aGEOMObject._retn();
377
378   return GetObject(anObject);
379 }
380
381 //=============================================================================
382 /*!
383  *  MakeLineTwoPnt
384  */
385 //=============================================================================
386 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoPnt
387                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2)
388 {
389   GEOM::GEOM_Object_var aGEOMObject;
390
391   //Set a not done flag
392   GetOperations()->SetNotDone();
393
394   //Get the reference points
395   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
396   Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
397   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
398
399   //Create the Line
400   Handle(GEOM_Object) anObject = GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
401   if (!GetOperations()->IsDone() || anObject.IsNull())
402     return aGEOMObject._retn();
403
404   return GetObject(anObject);
405 }
406
407 //=============================================================================
408 /*!
409  *  MakeLineTwoFaces
410  */
411 //=============================================================================
412 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoFaces
413                  (GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2)
414 {
415   GEOM::GEOM_Object_var aGEOMObject;
416
417   //Set a not done flag
418   GetOperations()->SetNotDone();
419
420   //Get the reference points
421   Handle(GEOM_Object) aRef1 = GetObjectImpl(theFace1);
422   Handle(GEOM_Object) aRef2 = GetObjectImpl(theFace2);
423   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
424
425   //Create the Line
426   Handle(GEOM_Object) anObject =
427     GetOperations()->MakeLineTwoFaces(aRef1, aRef2);
428   if (!GetOperations()->IsDone() || anObject.IsNull())
429     return aGEOMObject._retn();
430
431   return GetObject(anObject);
432 }
433
434
435 //=============================================================================
436 /*!
437  *  MakePlanePntVec
438  */
439 //=============================================================================
440 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlanePntVec
441                  (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
442                   CORBA::Double theTrimSize)
443 {
444   GEOM::GEOM_Object_var aGEOMObject;
445
446   //Set a not done flag
447   GetOperations()->SetNotDone();
448
449   //Get the references
450   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
451   Handle(GEOM_Object) aRef2 = GetObjectImpl(theVec);
452   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
453
454   //Create the plane
455   Handle(GEOM_Object) anObject =
456     GetOperations()->MakePlanePntVec(aRef1, aRef2, theTrimSize);
457   if (!GetOperations()->IsDone() || anObject.IsNull())
458     return aGEOMObject._retn();
459
460   return GetObject(anObject);
461 }
462
463 //=============================================================================
464 /*!
465  *  MakePlaneThreePnt
466  */
467 //=============================================================================
468 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneThreePnt
469                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
470                   GEOM::GEOM_Object_ptr thePnt3, CORBA::Double theTrimSize)
471 {
472   GEOM::GEOM_Object_var aGEOMObject;
473
474   //Set a not done flag
475   GetOperations()->SetNotDone();
476
477   //Get the reference points
478   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
479   Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
480   Handle(GEOM_Object) aRef3 = GetObjectImpl(thePnt3);
481   if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull())
482     return aGEOMObject._retn();
483
484   //Create the plane
485   Handle(GEOM_Object) anObject =
486     GetOperations()->MakePlaneThreePnt(aRef1, aRef2, aRef3, theTrimSize);
487   if (!GetOperations()->IsDone() || anObject.IsNull())
488     return aGEOMObject._retn();
489
490   return GetObject(anObject);
491 }
492
493 //=============================================================================
494 /*!
495  *  MakePlaneFace
496  */
497 //=============================================================================
498 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneFace
499                      (GEOM::GEOM_Object_ptr theFace, CORBA::Double theTrimSize)
500 {
501   GEOM::GEOM_Object_var aGEOMObject;
502
503   //Set a not done flag
504   GetOperations()->SetNotDone();
505
506   //Get the reference face
507   Handle(GEOM_Object) aRef = GetObjectImpl(theFace);
508   if (aRef.IsNull()) return aGEOMObject._retn();
509
510   //Create the plane
511   Handle(GEOM_Object) anObject =
512     GetOperations()->MakePlaneFace(aRef, theTrimSize);
513   if (!GetOperations()->IsDone() || anObject.IsNull())
514     return aGEOMObject._retn();
515
516   return GetObject(anObject);
517 }
518
519 //=============================================================================
520 /*!
521  *  MakePlane2Vec
522  */
523 //=============================================================================
524 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlane2Vec
525                  (GEOM::GEOM_Object_ptr theVec1, GEOM::GEOM_Object_ptr theVec2,
526                   CORBA::Double theTrimSize)
527 {
528   GEOM::GEOM_Object_var aGEOMObject;
529
530   //Set a not done flag
531   GetOperations()->SetNotDone();
532
533   //Get the references
534   Handle(GEOM_Object) aRef1 = GetObjectImpl(theVec1);
535   Handle(GEOM_Object) aRef2 = GetObjectImpl(theVec2);
536   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
537
538   //Create the plane
539   Handle(GEOM_Object) anObject =
540     GetOperations()->MakePlane2Vec(aRef1, aRef2, theTrimSize);
541   if (!GetOperations()->IsDone() || anObject.IsNull())
542     return aGEOMObject._retn();
543
544   return GetObject(anObject);
545 }
546
547 //=============================================================================
548 /*!
549  *  MakePlaneLCS
550  */
551 //=============================================================================
552 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneLCS
553                  (GEOM::GEOM_Object_ptr theLCS, CORBA::Double theTrimSize,
554                   CORBA::Double theOrientation)
555 {
556   GEOM::GEOM_Object_var aGEOMObject;
557
558   //Set a not done flag
559   GetOperations()->SetNotDone();
560
561   //Get the references
562   Handle(GEOM_Object) aRef1 = GetObjectImpl(theLCS);
563
564   //Create the plane
565   Handle(GEOM_Object) anObject =
566     GetOperations()->MakePlaneLCS(aRef1, theTrimSize, theOrientation);
567   if (!GetOperations()->IsDone() || anObject.IsNull())
568     return aGEOMObject._retn();
569
570   return GetObject(anObject);
571 }
572
573 //=============================================================================
574 /*!
575  *  MakeMarker
576  */
577 //=============================================================================
578 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarker
579   (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
580    CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
581    CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
582 {
583   GEOM::GEOM_Object_var aGEOMObject;
584
585   //Set a not done flag
586   GetOperations()->SetNotDone();
587
588   //Create the point
589   Handle(GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ,
590                                                              theXDX, theXDY, theXDZ,
591                                                              theYDX, theYDY, theYDZ);
592   if (!GetOperations()->IsDone() || anObject.IsNull())
593     return aGEOMObject._retn();
594
595   return GetObject(anObject);
596 }
597
598 //=============================================================================
599 /*!
600  *  MakeMarkerFromShape
601  */
602 //=============================================================================
603 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarkerFromShape
604                                               (GEOM::GEOM_Object_ptr theShape)
605 {
606   GEOM::GEOM_Object_var aGEOMObject;
607
608   //Set a not done flag
609   GetOperations()->SetNotDone();
610
611   //Get the referenced object
612   Handle(GEOM_Object) aRef = GetObjectImpl(theShape);
613   if (aRef.IsNull()) return aGEOMObject._retn();
614
615   //Create the point
616   Handle(GEOM_Object) anObject = GetOperations()->MakeMarkerFromShape(aRef);
617   if (!GetOperations()->IsDone() || anObject.IsNull())
618     return aGEOMObject._retn();
619
620   return GetObject(anObject);
621 }
622
623 //=============================================================================
624 /*!
625  *  MakeMarkerPntTwoVec
626  */
627 //=============================================================================
628 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarkerPntTwoVec
629                                               (GEOM::GEOM_Object_ptr theOrigin,
630                                                GEOM::GEOM_Object_ptr theXVec,
631                                                GEOM::GEOM_Object_ptr theYVec)
632 {
633   GEOM::GEOM_Object_var aGEOMObject;
634
635   //Set a not done flag
636   GetOperations()->SetNotDone();
637
638   //Get the referenced objects
639   Handle(GEOM_Object) aRef1 = GetObjectImpl(theOrigin);
640   Handle(GEOM_Object) aRef2 = GetObjectImpl(theXVec);
641   Handle(GEOM_Object) aRef3 = GetObjectImpl(theYVec);
642   if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) return aGEOMObject._retn();
643
644   //Create the point
645   Handle(GEOM_Object) anObject = GetOperations()->MakeMarkerPntTwoVec(aRef1,
646                                                                       aRef2,
647                                                                       aRef3);
648   if (!GetOperations()->IsDone() || anObject.IsNull())
649     return aGEOMObject._retn();
650
651   return GetObject(anObject);
652 }
653
654 //=============================================================================
655 /*!
656  *  MakeTangentPlaneOnFace
657  */
658 //=============================================================================
659
660 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentPlaneOnFace
661                      (GEOM::GEOM_Object_ptr theFace,
662                       CORBA::Double theParameterU,
663                       CORBA::Double theParameterV,
664                       CORBA::Double theTrimSize)
665 {
666   GEOM::GEOM_Object_var aGEOMObject;
667
668   //Set a not done flag
669   GetOperations()->SetNotDone();
670
671   //Get the reference face
672   Handle(GEOM_Object) aRef = GetObjectImpl(theFace);
673   if (aRef.IsNull()) return aGEOMObject._retn();
674
675   //Create the plane
676   Handle(GEOM_Object) anObject =
677     GetOperations()->MakeTangentPlaneOnFace(aRef, theParameterU,theParameterV,theTrimSize);
678   if (!GetOperations()->IsDone() || anObject.IsNull())
679     return aGEOMObject._retn();
680
681   return GetObject(anObject);
682 }