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