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