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