Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / GEOM_I / GEOM_IBasicOperations_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
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,  
165                    CORBA::Double         theLength,
166                    GEOM::GEOM_Object_ptr theStartPoint)
167 {
168   GEOM::GEOM_Object_var aGEOMObject;
169
170   //Set a not done flag
171   GetOperations()->SetNotDone();
172
173   //Get the reference curve
174   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
175   if (aReference.IsNull()) return aGEOMObject._retn();
176
177   //Get the reference point (can be NULL)
178   Handle(GEOM_Object) aRefPoint;
179   if (!CORBA::is_nil(theStartPoint)) {
180     aRefPoint = GetObjectImpl(theStartPoint);
181   }
182
183   //Create the point
184   Handle(GEOM_Object) anObject =
185     GetOperations()->MakePointOnCurveByLength(aReference, theLength, aRefPoint);
186   if (!GetOperations()->IsDone() || anObject.IsNull())
187     return aGEOMObject._retn();
188
189   return GetObject(anObject);
190 }
191
192 //=============================================================================
193 /*!
194  *  MakePointOnCurveByCoord
195  */
196 //=============================================================================
197 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurveByCoord
198                   (GEOM::GEOM_Object_ptr theCurve, 
199                    CORBA::Double theXParameter,
200                    CORBA::Double theYParameter,
201                    CORBA::Double theZParameter)
202 {
203   GEOM::GEOM_Object_var aGEOMObject;
204
205   //Set a not done flag
206   GetOperations()->SetNotDone();
207
208   //Get the reference curve
209   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
210   if (aReference.IsNull()) return aGEOMObject._retn();
211
212   //Create the point
213   Handle(GEOM_Object) anObject =
214     GetOperations()->MakePointOnCurveByCoord(aReference, theXParameter,
215                                              theYParameter, theZParameter);
216   if (!GetOperations()->IsDone() || anObject.IsNull())
217     return aGEOMObject._retn();
218
219   return GetObject(anObject);
220 }
221
222 //=============================================================================
223 /*!
224  *  MakePointOnSurface
225  */
226 //=============================================================================
227 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurface
228                                              (GEOM::GEOM_Object_ptr theSurface,
229                                               CORBA::Double theUParameter,
230                                               CORBA::Double theVParameter)
231 {
232   GEOM::GEOM_Object_var aGEOMObject;
233
234   //Set a not done flag
235   GetOperations()->SetNotDone();
236
237   //Get the reference surface
238   Handle(GEOM_Object) aReference = GetObjectImpl(theSurface);
239   if (aReference.IsNull()) return aGEOMObject._retn();
240
241   //Create the point
242   Handle(GEOM_Object) anObject =
243     GetOperations()->MakePointOnSurface(aReference, theUParameter, theVParameter);
244   if (!GetOperations()->IsDone() || anObject.IsNull())
245     return aGEOMObject._retn();
246
247   return GetObject(anObject);
248 }
249
250 //=============================================================================
251 /*!
252  *  MakePointOnSurfaceByCoord
253  */
254 //=============================================================================
255 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurfaceByCoord
256                                              (GEOM::GEOM_Object_ptr theSurface,
257                                               CORBA::Double theXParameter,
258                                               CORBA::Double theYParameter,
259                                               CORBA::Double theZParameter)
260 {
261   GEOM::GEOM_Object_var aGEOMObject;
262
263   //Set a not done flag
264   GetOperations()->SetNotDone();
265
266   //Get the reference surface
267   Handle(GEOM_Object) aReference = GetObjectImpl(theSurface);
268   if (aReference.IsNull()) return aGEOMObject._retn();
269
270   //Create the point
271   Handle(GEOM_Object) anObject =
272     GetOperations()->MakePointOnSurfaceByCoord(aReference, theXParameter,
273                                                theYParameter, theZParameter);
274   if (!GetOperations()->IsDone() || anObject.IsNull())
275     return aGEOMObject._retn();
276
277   return GetObject(anObject);
278 }
279
280
281 //=============================================================================
282 /*!
283  *  MakeTangentOnCurve
284  */
285 //=============================================================================
286 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentOnCurve
287                   (GEOM::GEOM_Object_ptr theCurve,  CORBA::Double theParameter)
288 {
289   GEOM::GEOM_Object_var aGEOMObject;
290
291   //Set a not done flag
292   GetOperations()->SetNotDone();
293
294   //Get the reference curve
295   Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
296   if (aReference.IsNull()) return aGEOMObject._retn();
297
298   //Create the vector
299   Handle(GEOM_Object) anObject =
300     GetOperations()->MakeTangentOnCurve(aReference, theParameter);
301   if (!GetOperations()->IsDone() || anObject.IsNull())
302     return aGEOMObject._retn();
303
304   return GetObject(anObject);
305 }
306
307 //=============================================================================
308 /*!
309  *  MakeVectorDXDYDZ
310  */
311 //=============================================================================
312 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorDXDYDZ
313   (CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
314 {
315   GEOM::GEOM_Object_var aGEOMObject;
316
317   //Set a not done flag
318   GetOperations()->SetNotDone();
319
320   //Create the Vector
321
322   Handle(GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ);
323   if (!GetOperations()->IsDone() || anObject.IsNull())
324     return aGEOMObject._retn();
325
326   return GetObject(anObject);
327 }
328
329 //=============================================================================
330 /*!
331  *  MakeVectorTwoPnt
332  */
333 //=============================================================================
334 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorTwoPnt
335                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2)
336 {
337   GEOM::GEOM_Object_var aGEOMObject;
338
339   //Set a not done flag
340   GetOperations()->SetNotDone();
341
342   //Get the reference points
343   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
344   Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
345   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
346
347   //Create the vector
348   Handle(GEOM_Object) anObject = GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
349   if (!GetOperations()->IsDone() || anObject.IsNull())
350     return aGEOMObject._retn();
351
352   return GetObject(anObject);
353 }
354
355
356 //=============================================================================
357 /*!
358  *  MakeLine
359  */
360 //=============================================================================
361 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLine
362                    (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theDir)
363 {
364   GEOM::GEOM_Object_var aGEOMObject;
365
366   //Set a not done flag
367   GetOperations()->SetNotDone();
368
369   //Get the reference objects
370   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
371   Handle(GEOM_Object) aRef2 = GetObjectImpl(theDir);
372   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
373
374   //Create the Line
375   Handle(GEOM_Object) anObject = GetOperations()->MakeLine(aRef1, aRef2);
376   if (!GetOperations()->IsDone() || anObject.IsNull())
377     return aGEOMObject._retn();
378
379   return GetObject(anObject);
380 }
381
382 //=============================================================================
383 /*!
384  *  MakeLineTwoPnt
385  */
386 //=============================================================================
387 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoPnt
388                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2)
389 {
390   GEOM::GEOM_Object_var aGEOMObject;
391
392   //Set a not done flag
393   GetOperations()->SetNotDone();
394
395   //Get the reference points
396   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
397   Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
398   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
399
400   //Create the Line
401   Handle(GEOM_Object) anObject = GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
402   if (!GetOperations()->IsDone() || anObject.IsNull())
403     return aGEOMObject._retn();
404
405   return GetObject(anObject);
406 }
407
408 //=============================================================================
409 /*!
410  *  MakeLineTwoFaces
411  */
412 //=============================================================================
413 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoFaces
414                  (GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2)
415 {
416   GEOM::GEOM_Object_var aGEOMObject;
417
418   //Set a not done flag
419   GetOperations()->SetNotDone();
420
421   //Get the reference points
422   Handle(GEOM_Object) aRef1 = GetObjectImpl(theFace1);
423   Handle(GEOM_Object) aRef2 = GetObjectImpl(theFace2);
424   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
425
426   //Create the Line
427   Handle(GEOM_Object) anObject =
428     GetOperations()->MakeLineTwoFaces(aRef1, aRef2);
429   if (!GetOperations()->IsDone() || anObject.IsNull())
430     return aGEOMObject._retn();
431
432   return GetObject(anObject);
433 }
434
435
436 //=============================================================================
437 /*!
438  *  MakePlanePntVec
439  */
440 //=============================================================================
441 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlanePntVec
442                  (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
443                   CORBA::Double theTrimSize)
444 {
445   GEOM::GEOM_Object_var aGEOMObject;
446
447   //Set a not done flag
448   GetOperations()->SetNotDone();
449
450   //Get the references
451   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt);
452   Handle(GEOM_Object) aRef2 = GetObjectImpl(theVec);
453   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
454
455   //Create the plane
456   Handle(GEOM_Object) anObject =
457     GetOperations()->MakePlanePntVec(aRef1, aRef2, theTrimSize);
458   if (!GetOperations()->IsDone() || anObject.IsNull())
459     return aGEOMObject._retn();
460
461   return GetObject(anObject);
462 }
463
464 //=============================================================================
465 /*!
466  *  MakePlaneThreePnt
467  */
468 //=============================================================================
469 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneThreePnt
470                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
471                   GEOM::GEOM_Object_ptr thePnt3, CORBA::Double theTrimSize)
472 {
473   GEOM::GEOM_Object_var aGEOMObject;
474
475   //Set a not done flag
476   GetOperations()->SetNotDone();
477
478   //Get the reference points
479   Handle(GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
480   Handle(GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
481   Handle(GEOM_Object) aRef3 = GetObjectImpl(thePnt3);
482   if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull())
483     return aGEOMObject._retn();
484
485   //Create the plane
486   Handle(GEOM_Object) anObject =
487     GetOperations()->MakePlaneThreePnt(aRef1, aRef2, aRef3, theTrimSize);
488   if (!GetOperations()->IsDone() || anObject.IsNull())
489     return aGEOMObject._retn();
490
491   return GetObject(anObject);
492 }
493
494 //=============================================================================
495 /*!
496  *  MakePlaneFace
497  */
498 //=============================================================================
499 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneFace
500                      (GEOM::GEOM_Object_ptr theFace, CORBA::Double theTrimSize)
501 {
502   GEOM::GEOM_Object_var aGEOMObject;
503
504   //Set a not done flag
505   GetOperations()->SetNotDone();
506
507   //Get the reference face
508   Handle(GEOM_Object) aRef = GetObjectImpl(theFace);
509   if (aRef.IsNull()) return aGEOMObject._retn();
510
511   //Create the plane
512   Handle(GEOM_Object) anObject =
513     GetOperations()->MakePlaneFace(aRef, theTrimSize);
514   if (!GetOperations()->IsDone() || anObject.IsNull())
515     return aGEOMObject._retn();
516
517   return GetObject(anObject);
518 }
519
520 //=============================================================================
521 /*!
522  *  MakePlane2Vec
523  */
524 //=============================================================================
525 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlane2Vec
526                  (GEOM::GEOM_Object_ptr theVec1, GEOM::GEOM_Object_ptr theVec2,
527                   CORBA::Double theTrimSize)
528 {
529   GEOM::GEOM_Object_var aGEOMObject;
530
531   //Set a not done flag
532   GetOperations()->SetNotDone();
533
534   //Get the references
535   Handle(GEOM_Object) aRef1 = GetObjectImpl(theVec1);
536   Handle(GEOM_Object) aRef2 = GetObjectImpl(theVec2);
537   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
538
539   //Create the plane
540   Handle(GEOM_Object) anObject =
541     GetOperations()->MakePlane2Vec(aRef1, aRef2, theTrimSize);
542   if (!GetOperations()->IsDone() || anObject.IsNull())
543     return aGEOMObject._retn();
544
545   return GetObject(anObject);
546 }
547
548 //=============================================================================
549 /*!
550  *  MakePlaneLCS
551  */
552 //=============================================================================
553 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneLCS
554                  (GEOM::GEOM_Object_ptr theLCS, CORBA::Double theTrimSize,
555                   CORBA::Double theOrientation)
556 {
557   GEOM::GEOM_Object_var aGEOMObject;
558
559   //Set a not done flag
560   GetOperations()->SetNotDone();
561
562   //Get the references
563   Handle(GEOM_Object) aRef1 = GetObjectImpl(theLCS);
564
565   //Create the plane
566   Handle(GEOM_Object) anObject =
567     GetOperations()->MakePlaneLCS(aRef1, theTrimSize, theOrientation);
568   if (!GetOperations()->IsDone() || anObject.IsNull())
569     return aGEOMObject._retn();
570
571   return GetObject(anObject);
572 }
573
574 //=============================================================================
575 /*!
576  *  MakeMarker
577  */
578 //=============================================================================
579 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarker
580   (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ,
581    CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ,
582    CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ)
583 {
584   GEOM::GEOM_Object_var aGEOMObject;
585
586   //Set a not done flag
587   GetOperations()->SetNotDone();
588
589   //Create the point
590   Handle(GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ,
591                                                              theXDX, theXDY, theXDZ,
592                                                              theYDX, theYDY, theYDZ);
593   if (!GetOperations()->IsDone() || anObject.IsNull())
594     return aGEOMObject._retn();
595
596   return GetObject(anObject);
597 }
598
599 //=============================================================================
600 /*!
601  *  MakeMarkerFromShape
602  */
603 //=============================================================================
604 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarkerFromShape
605                                               (GEOM::GEOM_Object_ptr theShape)
606 {
607   GEOM::GEOM_Object_var aGEOMObject;
608
609   //Set a not done flag
610   GetOperations()->SetNotDone();
611
612   //Get the referenced object
613   Handle(GEOM_Object) aRef = GetObjectImpl(theShape);
614   if (aRef.IsNull()) return aGEOMObject._retn();
615
616   //Create the point
617   Handle(GEOM_Object) anObject = GetOperations()->MakeMarkerFromShape(aRef);
618   if (!GetOperations()->IsDone() || anObject.IsNull())
619     return aGEOMObject._retn();
620
621   return GetObject(anObject);
622 }
623
624 //=============================================================================
625 /*!
626  *  MakeMarkerPntTwoVec
627  */
628 //=============================================================================
629 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarkerPntTwoVec
630                                               (GEOM::GEOM_Object_ptr theOrigin,
631                                                GEOM::GEOM_Object_ptr theXVec,
632                                                GEOM::GEOM_Object_ptr theYVec)
633 {
634   GEOM::GEOM_Object_var aGEOMObject;
635
636   //Set a not done flag
637   GetOperations()->SetNotDone();
638
639   //Get the referenced objects
640   Handle(GEOM_Object) aRef1 = GetObjectImpl(theOrigin);
641   Handle(GEOM_Object) aRef2 = GetObjectImpl(theXVec);
642   Handle(GEOM_Object) aRef3 = GetObjectImpl(theYVec);
643   if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) return aGEOMObject._retn();
644
645   //Create the point
646   Handle(GEOM_Object) anObject = GetOperations()->MakeMarkerPntTwoVec(aRef1,
647                                                                       aRef2,
648                                                                       aRef3);
649   if (!GetOperations()->IsDone() || anObject.IsNull())
650     return aGEOMObject._retn();
651
652   return GetObject(anObject);
653 }
654
655 //=============================================================================
656 /*!
657  *  MakeTangentPlaneOnFace
658  */
659 //=============================================================================
660
661 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentPlaneOnFace
662                      (GEOM::GEOM_Object_ptr theFace,
663                       CORBA::Double theParameterU,
664                       CORBA::Double theParameterV,
665                       CORBA::Double theTrimSize)
666 {
667   GEOM::GEOM_Object_var aGEOMObject;
668
669   //Set a not done flag
670   GetOperations()->SetNotDone();
671
672   //Get the reference face
673   Handle(GEOM_Object) aRef = GetObjectImpl(theFace);
674   if (aRef.IsNull()) return aGEOMObject._retn();
675
676   //Create the plane
677   Handle(GEOM_Object) anObject =
678     GetOperations()->MakeTangentPlaneOnFace(aRef, theParameterU,theParameterV,theTrimSize);
679   if (!GetOperations()->IsDone() || anObject.IsNull())
680     return aGEOMObject._retn();
681
682   return GetObject(anObject);
683 }