1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include <Standard_Stream.hxx>
25 #include "GEOM_ITransformOperations_i.hh"
27 #include "utilities.h"
29 #include "Utils_ExceptHandlers.hxx"
31 #include <TDF_Label.hxx>
32 #include <TDF_Tool.hxx>
33 #include <TCollection_AsciiString.hxx>
34 #include "GEOM_Engine.hxx"
35 #include "GEOM_Object.hxx"
37 #define SUBSHAPE_ERROR "Sub shape cannot be transformed"
39 //=============================================================================
43 //=============================================================================
45 GEOM_ITransformOperations_i::GEOM_ITransformOperations_i (PortableServer::POA_ptr thePOA,
46 GEOM::GEOM_Gen_ptr theEngine,
47 ::GEOMImpl_ITransformOperations* theImpl)
48 :GEOM_IOperations_i(thePOA, theEngine, theImpl)
50 MESSAGE("GEOM_ITransformOperations_i::GEOM_ITransformOperations_i");
53 //=============================================================================
57 //=============================================================================
59 GEOM_ITransformOperations_i::~GEOM_ITransformOperations_i()
61 MESSAGE("GEOM_ITransformOperations_i::~GEOM_ITransformOperations_i");
65 //=============================================================================
69 //=============================================================================
70 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints
71 (GEOM::GEOM_Object_ptr theObject,
72 GEOM::GEOM_Object_ptr thePoint1,
73 GEOM::GEOM_Object_ptr thePoint2)
76 GetOperations()->SetNotDone();
77 GEOM::GEOM_Object_var aGEOMObject;
79 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
81 //check if the object is a sub-shape
82 if (!theObject->IsMainShape()) {
83 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
84 return aGEOMObject._retn();
87 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
89 //Get the object itself
90 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
91 if (anObject.IsNull()) return aGEOMObject._retn();
93 //Get the first point of translation
94 Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
95 if (aPoint1.IsNull()) return aGEOMObject._retn();
97 //Get the second point of translation
98 Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
99 if (aPoint2.IsNull()) return aGEOMObject._retn();
101 //Perform the translation
102 GetOperations()->TranslateTwoPoints(anObject, aPoint1, aPoint2);
105 UpdateGUIForObject(theObject);
107 return aGEOMObject._retn();
110 //=============================================================================
112 * TranslateTwoPointsCopy
114 //=============================================================================
115 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPointsCopy
116 (GEOM::GEOM_Object_ptr theObject,
117 GEOM::GEOM_Object_ptr thePoint1,
118 GEOM::GEOM_Object_ptr thePoint2)
120 GEOM::GEOM_Object_var aGEOMObject;
122 //Set a not done flag
123 GetOperations()->SetNotDone();
125 //Get the object itself
126 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
127 if (aBasicObject.IsNull()) return aGEOMObject._retn();
129 //Get the first point of translation
130 Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
131 if (aPoint1.IsNull()) return aGEOMObject._retn();
133 //Get the second point of translation
134 Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
135 if (aPoint2.IsNull()) return aGEOMObject._retn();
137 //Create the translated shape
138 Handle(::GEOM_Object) anObject =
139 GetOperations()->TranslateTwoPointsCopy(aBasicObject, aPoint1, aPoint2);
140 if (!GetOperations()->IsDone() || anObject.IsNull())
141 return aGEOMObject._retn();
143 return GetObject(anObject);
146 //=============================================================================
150 //=============================================================================
151 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
152 (GEOM::GEOM_Object_ptr theObject,
153 CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
155 //Set a not done flag
156 GetOperations()->SetNotDone();
157 GEOM::GEOM_Object_var aGEOMObject;
159 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
161 //check if the object is a sub-shape
162 if (!theObject->IsMainShape()) {
163 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
164 return aGEOMObject._retn();
167 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
169 //Get the object itself
170 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
171 if (anObject.IsNull()) return aGEOMObject._retn();
173 //Perform the translation
174 GetOperations()->TranslateDXDYDZ(anObject, theDX, theDY, theDZ);
177 UpdateGUIForObject(theObject);
179 return aGEOMObject._retn();
182 //=============================================================================
184 * TranslateDXDYDZCopy
186 //=============================================================================
187 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy
188 (GEOM::GEOM_Object_ptr theObject,
189 CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ)
191 GEOM::GEOM_Object_var aGEOMObject;
193 //Set a not done flag
194 GetOperations()->SetNotDone();
196 //Get the object itself
197 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
198 if (aBasicObject.IsNull()) return aGEOMObject._retn();
200 //Create the translated shape
201 Handle(::GEOM_Object) anObject =
202 GetOperations()->TranslateDXDYDZCopy(aBasicObject, theDX, theDY, theDZ);
203 if (!GetOperations()->IsDone() || anObject.IsNull())
204 return aGEOMObject._retn();
206 return GetObject(anObject);
209 //=============================================================================
213 //=============================================================================
214 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector
215 (GEOM::GEOM_Object_ptr theObject,
216 GEOM::GEOM_Object_ptr theVector)
218 //Set a not done flag
219 GetOperations()->SetNotDone();
220 GEOM::GEOM_Object_var aGEOMObject;
222 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
224 //check if the object is a sub-shape
225 if (!theObject->IsMainShape()) {
226 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
227 return aGEOMObject._retn();
230 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
232 //Get the object itself
233 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
234 if (anObject.IsNull()) return aGEOMObject._retn();
236 //Get the vector of translation
237 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
238 if (aVector.IsNull()) return aGEOMObject._retn();
240 //Perform the translation
241 GetOperations()->TranslateVector(anObject, aVector);
244 UpdateGUIForObject(theObject);
246 return aGEOMObject._retn();
249 //=============================================================================
251 * TranslateVectorCopy
253 //=============================================================================
254 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorCopy
255 (GEOM::GEOM_Object_ptr theObject,
256 GEOM::GEOM_Object_ptr theVector)
258 GEOM::GEOM_Object_var aGEOMObject;
260 //Set a not done flag
261 GetOperations()->SetNotDone();
263 //Get the object itself
264 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
265 if (aBasicObject.IsNull()) return aGEOMObject._retn();
267 //Get the vector of translation
268 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
269 if (aVector.IsNull()) return aGEOMObject._retn();
271 //Perform the translation
272 Handle(::GEOM_Object) anObject = GetOperations()->TranslateVectorCopy(aBasicObject, aVector);
273 if (!GetOperations()->IsDone() || anObject.IsNull())
274 return aGEOMObject._retn();
276 return GetObject(anObject);
279 //=============================================================================
281 * TranslateVectorDistance
283 //=============================================================================
284 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance
285 (GEOM::GEOM_Object_ptr theObject,
286 GEOM::GEOM_Object_ptr theVector,
287 CORBA::Double theDistance,
288 CORBA::Boolean theCopy)
290 GEOM::GEOM_Object_var aGEOMObject;
291 GetOperations()->SetNotDone(); //Set a not done flag
293 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
295 //check if the object is a sub-shape
296 if (!theCopy && !theObject->IsMainShape()) {
297 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
298 return aGEOMObject._retn();
302 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
304 //Get the object itself
305 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
306 if (aBasicObject.IsNull()) return aGEOMObject._retn();
308 //Get the vector of translation
309 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
310 if (aVector.IsNull()) return aGEOMObject._retn();
312 //Perform the translation
314 Handle(::GEOM_Object) anObject = GetOperations()->
315 TranslateVectorDistance(aBasicObject, aVector, theDistance, theCopy);
316 if (!GetOperations()->IsDone() || anObject.IsNull())
317 return aGEOMObject._retn();
319 return GetObject(anObject);
322 GetOperations()->TranslateVectorDistance(aBasicObject, aVector, theDistance, theCopy);
325 UpdateGUIForObject(theObject);
327 return aGEOMObject._retn();
330 //=============================================================================
334 //=============================================================================
335 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr theObject,
336 GEOM::GEOM_Object_ptr theAxis,
337 CORBA::Double theAngle)
339 //Set a not done flag
340 GetOperations()->SetNotDone();
341 GEOM::GEOM_Object_var aGEOMObject;
343 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
345 //check if the object is a sub-shape
346 if (!theObject->IsMainShape()) {
347 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
348 return aGEOMObject._retn();
351 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
353 //Get the object itself
354 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
355 if (anObject.IsNull()) return aGEOMObject._retn();
357 //Get the axis of revolution
358 Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
359 if (anAxis.IsNull()) return aGEOMObject._retn();
361 //Perform the rotation
362 GetOperations()->Rotate(anObject, anAxis, theAngle);
365 UpdateGUIForObject(theObject);
367 return aGEOMObject._retn();
370 //=============================================================================
374 //=============================================================================
375 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object_ptr theObject,
376 GEOM::GEOM_Object_ptr theAxis,
377 CORBA::Double theAngle)
379 GEOM::GEOM_Object_var aGEOMObject;
381 //Set a not done flag
382 GetOperations()->SetNotDone();
384 //Get the object itself
385 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
386 if (aBasicObject.IsNull()) return aGEOMObject._retn();
388 //Get the axis of rotation
389 Handle(::GEOM_Object) anAxis = GetObjectImpl(theAxis);
390 if (anAxis.IsNull()) return aGEOMObject._retn();
392 //Perform the rotation
393 Handle(::GEOM_Object) anObject = GetOperations()->RotateCopy(aBasicObject, anAxis, theAngle);
394 if (!GetOperations()->IsDone() || anObject.IsNull())
395 return aGEOMObject._retn();
397 return GetObject(anObject);
400 //=============================================================================
404 //=============================================================================
405 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane
406 (GEOM::GEOM_Object_ptr theObject,
407 GEOM::GEOM_Object_ptr thePlane)
409 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
411 //Set a not done flag
412 GetOperations()->SetNotDone();
414 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
416 //check if the object is a sub-shape
417 if (!theObject->IsMainShape()) {
418 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
419 return aGEOMObject._retn();
422 //Get the object itself
423 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
424 if (anObject.IsNull()) return aGEOMObject._retn();
427 Handle(::GEOM_Object) aPlane = GetObjectImpl(thePlane);
428 if (aPlane.IsNull()) return aGEOMObject._retn();
431 GetOperations()->MirrorPlane(anObject, aPlane);
434 UpdateGUIForObject(theObject);
436 return aGEOMObject._retn();
439 //=============================================================================
443 //=============================================================================
444 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlaneCopy
445 (GEOM::GEOM_Object_ptr theObject,
446 GEOM::GEOM_Object_ptr thePlane)
448 GEOM::GEOM_Object_var aGEOMObject;
450 //Set a not done flag
451 GetOperations()->SetNotDone();
453 //Get the object itself
454 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
455 if (aBasicObject.IsNull()) return aGEOMObject._retn();
457 //Get the vector of translation
458 Handle(::GEOM_Object) aPlane = GetObjectImpl(thePlane);
459 if (aPlane.IsNull()) return aGEOMObject._retn();
462 Handle(::GEOM_Object) anObject = GetOperations()->MirrorPlaneCopy(aBasicObject, aPlane);
463 if (!GetOperations()->IsDone() || anObject.IsNull())
464 return aGEOMObject._retn();
466 return GetObject(anObject);
469 //=============================================================================
473 //=============================================================================
474 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis
475 (GEOM::GEOM_Object_ptr theObject,
476 GEOM::GEOM_Object_ptr theAxis)
478 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
480 //Set a not done flag
481 GetOperations()->SetNotDone();
483 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
485 //check if the object is a sub-shape
486 if (!theObject->IsMainShape()) {
487 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
488 return aGEOMObject._retn();
491 //Get the object itself
492 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
493 if (anObject.IsNull()) return aGEOMObject._retn();
496 Handle(::GEOM_Object) aAxis = GetObjectImpl(theAxis);
497 if (aAxis.IsNull()) return aGEOMObject._retn();
500 GetOperations()->MirrorAxis(anObject, aAxis);
503 UpdateGUIForObject(theObject);
505 return aGEOMObject._retn();
508 //=============================================================================
512 //=============================================================================
513 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxisCopy
514 (GEOM::GEOM_Object_ptr theObject,
515 GEOM::GEOM_Object_ptr theAxis)
517 GEOM::GEOM_Object_var aGEOMObject;
519 //Set a not done flag
520 GetOperations()->SetNotDone();
522 //Get the object itself
523 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
524 if (aBasicObject.IsNull()) return aGEOMObject._retn();
526 //Get the vector of translation
527 Handle(::GEOM_Object) aAxis = GetObjectImpl(theAxis);
528 if (aAxis.IsNull()) return aGEOMObject._retn();
531 Handle(::GEOM_Object) anObject = GetOperations()->MirrorAxisCopy(aBasicObject, aAxis);
532 if (!GetOperations()->IsDone() || anObject.IsNull())
533 return aGEOMObject._retn();
535 return GetObject(anObject);
538 //=============================================================================
542 //=============================================================================
543 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint
544 (GEOM::GEOM_Object_ptr theObject,
545 GEOM::GEOM_Object_ptr thePoint)
547 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
549 //Set a not done flag
550 GetOperations()->SetNotDone();
552 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
554 //check if the object is a sub-shape
555 if (!theObject->IsMainShape()) {
556 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
557 return aGEOMObject._retn();
560 //Get the object itself
561 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
562 if (anObject.IsNull()) return aGEOMObject._retn();
565 Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
566 if (aPoint.IsNull()) return aGEOMObject._retn();
569 GetOperations()->MirrorPoint(anObject, aPoint);
572 UpdateGUIForObject(theObject);
574 return aGEOMObject._retn();
577 //=============================================================================
581 //=============================================================================
582 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy
583 (GEOM::GEOM_Object_ptr theObject,
584 GEOM::GEOM_Object_ptr thePoint)
586 GEOM::GEOM_Object_var aGEOMObject;
588 //Set a not done flag
589 GetOperations()->SetNotDone();
591 //Get the object itself
592 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
593 if (aBasicObject.IsNull()) return aGEOMObject._retn();
595 //Get the vector of translation
596 Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
597 if (aPoint.IsNull()) return aGEOMObject._retn();
600 Handle(::GEOM_Object) anObject = GetOperations()->MirrorPointCopy(aBasicObject, aPoint);
601 if (!GetOperations()->IsDone() || anObject.IsNull())
602 return aGEOMObject._retn();
604 return GetObject(anObject);
607 //=============================================================================
611 //=============================================================================
612 GEOM::GEOM_Object_ptr
613 GEOM_ITransformOperations_i::OffsetShape (GEOM::GEOM_Object_ptr theObject,
614 CORBA::Double theOffset,
615 CORBA::Boolean theJoinByPipes)
617 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
619 //Set a not done flag
620 GetOperations()->SetNotDone();
622 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
624 //check if the object is a sub-shape
625 if (!theObject->IsMainShape()) {
626 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
627 return aGEOMObject._retn();
630 //Get the basic object
631 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
632 if (aBasicObject.IsNull()) return aGEOMObject._retn();
634 //Create the offset shape
635 GetOperations()->OffsetShape( aBasicObject, theOffset, theJoinByPipes );
638 UpdateGUIForObject(theObject);
640 return aGEOMObject._retn();
643 //=============================================================================
647 //=============================================================================
648 GEOM::GEOM_Object_ptr
649 GEOM_ITransformOperations_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
650 CORBA::Double theOffset,
651 CORBA::Boolean theJoinByPipes)
653 GEOM::GEOM_Object_var aGEOMObject;
655 //Set a not done flag
656 GetOperations()->SetNotDone();
658 //Get the basic object
659 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
660 if (aBasicObject.IsNull()) return aGEOMObject._retn();
662 //Create the offset shape
663 Handle(::GEOM_Object) anObject =
664 GetOperations()->OffsetShapeCopy(aBasicObject, theOffset, theJoinByPipes);
665 if (!GetOperations()->IsDone() || anObject.IsNull())
666 return aGEOMObject._retn();
668 return GetObject(anObject);
671 //=============================================================================
675 //=============================================================================
676 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ProjectShapeCopy
677 (GEOM::GEOM_Object_ptr theSource,
678 GEOM::GEOM_Object_ptr theTarget)
680 GEOM::GEOM_Object_var aGEOMObject;
682 //Set a not done flag
683 GetOperations()->SetNotDone();
685 //Get the input objects
686 Handle(::GEOM_Object) aSource = GetObjectImpl(theSource);
687 Handle(::GEOM_Object) aTarget = GetObjectImpl(theTarget);
688 if (aSource.IsNull() || aTarget.IsNull()) return aGEOMObject._retn();
690 //Create the projection
691 Handle(::GEOM_Object) anObject = GetOperations()->ProjectShapeCopy(aSource, aTarget);
692 if (!GetOperations()->IsDone() || anObject.IsNull())
693 return aGEOMObject._retn();
695 return GetObject(anObject);
698 //=============================================================================
702 //=============================================================================
703 CORBA::Double GEOM_ITransformOperations_i::ProjectPointOnWire
704 (GEOM::GEOM_Object_ptr thePoint,
705 GEOM::GEOM_Object_ptr theWire,
706 GEOM::GEOM_Object_out thePointOnEdge,
707 CORBA::Long& theEdgeInWireIndex)
709 //Set a not done flag
710 GetOperations()->SetNotDone();
712 //Get the reference shape
713 Handle(::GEOM_Object) aPoint = GetObjectImpl(thePoint);
714 Handle(::GEOM_Object) aWire = GetObjectImpl(theWire);
716 if (aPoint.IsNull() || aWire.IsNull()) {
720 Handle(::GEOM_Object) aPointOnEdge;
721 Standard_Integer anEdgeIndex;
722 CORBA::Double aResult = GetOperations()->ProjectPointOnWire
723 (aPoint, aWire, aPointOnEdge, anEdgeIndex);
725 if (!aPointOnEdge.IsNull()) {
726 thePointOnEdge = GetObject(aPointOnEdge);
727 theEdgeInWireIndex = anEdgeIndex;
733 //=============================================================================
737 //=============================================================================
738 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape
739 (GEOM::GEOM_Object_ptr theObject,
740 GEOM::GEOM_Object_ptr thePoint,
741 CORBA::Double theFactor)
743 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
745 //Set a not done flag
746 GetOperations()->SetNotDone();
748 if (theObject->_is_nil()) return aGEOMObject._retn();
750 //check if the object is a sub-shape
751 if (!theObject->IsMainShape()) {
752 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
753 return aGEOMObject._retn();
756 //Get the object itself
757 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
758 if (anObject.IsNull()) return aGEOMObject._retn();
761 Handle(::GEOM_Object) aPoint;
762 if (!thePoint->_is_nil()) {
763 aPoint = GetObjectImpl(thePoint);
764 if (aPoint.IsNull()) return aGEOMObject._retn();
768 GetOperations()->ScaleShape(anObject, aPoint, theFactor);
771 UpdateGUIForObject(theObject);
773 return aGEOMObject._retn();
776 //=============================================================================
780 //=============================================================================
781 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeCopy
782 (GEOM::GEOM_Object_ptr theObject,
783 GEOM::GEOM_Object_ptr thePoint,
784 CORBA::Double theFactor)
786 GEOM::GEOM_Object_var aGEOMObject;
788 //Set a not done flag
789 GetOperations()->SetNotDone();
791 //Get the basic object
792 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
793 if (aBasicObject.IsNull()) return aGEOMObject._retn();
796 Handle(::GEOM_Object) aPoint;
797 if (!thePoint->_is_nil()) {
798 aPoint = GetObjectImpl(thePoint);
799 if (aPoint.IsNull()) return aGEOMObject._retn();
803 Handle(::GEOM_Object) anObject =
804 GetOperations()->ScaleShapeCopy(aBasicObject, aPoint, theFactor);
805 if (!GetOperations()->IsDone() || anObject.IsNull())
806 return aGEOMObject._retn();
808 return GetObject(anObject);
811 //=============================================================================
813 * ScaleShapeAlongAxes
815 //=============================================================================
816 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxes
817 (GEOM::GEOM_Object_ptr theObject,
818 GEOM::GEOM_Object_ptr thePoint,
819 CORBA::Double theFactorX,
820 CORBA::Double theFactorY,
821 CORBA::Double theFactorZ)
823 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
825 //Set a not done flag
826 GetOperations()->SetNotDone();
828 if (theObject->_is_nil()) return aGEOMObject._retn();
830 //check if the object is a sub-shape
831 if (!theObject->IsMainShape()) {
832 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
833 return aGEOMObject._retn();
836 //Get the object itself
837 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
838 if (anObject.IsNull()) return aGEOMObject._retn();
841 Handle(::GEOM_Object) aPoint;
842 if (!thePoint->_is_nil()) {
843 aPoint = GetObjectImpl(thePoint);
844 if (aPoint.IsNull()) return aGEOMObject._retn();
848 GetOperations()->ScaleShapeAlongAxes
849 (anObject, aPoint, theFactorX, theFactorY, theFactorZ, /*doCopy*/false);
852 UpdateGUIForObject(theObject);
854 return aGEOMObject._retn();
857 //=============================================================================
859 * ScaleShapeAlongAxesCopy
861 //=============================================================================
862 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxesCopy
863 (GEOM::GEOM_Object_ptr theObject,
864 GEOM::GEOM_Object_ptr thePoint,
865 CORBA::Double theFactorX,
866 CORBA::Double theFactorY,
867 CORBA::Double theFactorZ)
869 GEOM::GEOM_Object_var aGEOMObject;
871 //Set a not done flag
872 GetOperations()->SetNotDone();
874 //Get the basic object
875 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
876 if (aBasicObject.IsNull()) return aGEOMObject._retn();
879 Handle(::GEOM_Object) aPoint;
880 if (!thePoint->_is_nil()) {
881 aPoint = GetObjectImpl(thePoint);
882 if (aPoint.IsNull()) return aGEOMObject._retn();
886 Handle(::GEOM_Object) anObject = GetOperations()->ScaleShapeAlongAxes
887 (aBasicObject, aPoint, theFactorX, theFactorY, theFactorZ, /*doCopy*/true);
888 if (!GetOperations()->IsDone() || anObject.IsNull())
889 return aGEOMObject._retn();
891 return GetObject(anObject);
894 //=============================================================================
898 //=============================================================================
899 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape
900 (GEOM::GEOM_Object_ptr theObject,
901 GEOM::GEOM_Object_ptr theStartLCS,
902 GEOM::GEOM_Object_ptr theEndLCS)
904 GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
906 //Set a not done flag
907 GetOperations()->SetNotDone();
909 if (CORBA::is_nil(theObject) || CORBA::is_nil(theEndLCS))
910 return aGEOMObject._retn();
912 //check if the object is a sub-shape
913 if (!theObject->IsMainShape()) {
914 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
915 return aGEOMObject._retn();
918 //Get the basic object
919 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
920 if (anObject.IsNull()) return aGEOMObject._retn();
922 //Get the Start LCS (may be NULL for positioning from global LCS)
923 Handle(::GEOM_Object) aStartLCS;
924 if (!CORBA::is_nil(theStartLCS)) {
925 aStartLCS = GetObjectImpl(theStartLCS);
926 if (aStartLCS.IsNull()) return aGEOMObject._retn();
930 Handle(::GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
931 if (aEndLCS.IsNull()) return aGEOMObject._retn();
933 //Perform the Position
934 GetOperations()->PositionShape(anObject, aStartLCS, aEndLCS);
937 UpdateGUIForObject(theObject);
939 return aGEOMObject._retn();
942 //=============================================================================
946 //=============================================================================
947 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShapeCopy
948 (GEOM::GEOM_Object_ptr theObject,
949 GEOM::GEOM_Object_ptr theStartLCS,
950 GEOM::GEOM_Object_ptr theEndLCS)
952 GEOM::GEOM_Object_var aGEOMObject;
954 //Set a not done flag
955 GetOperations()->SetNotDone();
957 //Get the basic object
958 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
959 if (aBasicObject.IsNull()) return aGEOMObject._retn();
961 //Get the Start LCS (may be NULL for positioning from global LCS)
962 Handle(::GEOM_Object) aStartLCS;
963 if (!CORBA::is_nil(theStartLCS)) {
964 aStartLCS = GetObjectImpl(theStartLCS);
965 if (aStartLCS.IsNull()) return aGEOMObject._retn();
969 Handle(::GEOM_Object) aEndLCS = GetObjectImpl(theEndLCS);
970 if (aEndLCS.IsNull()) return aGEOMObject._retn();
972 //Perform the position
973 Handle(::GEOM_Object) anObject =
974 GetOperations()->PositionShapeCopy(aBasicObject, aStartLCS, aEndLCS);
975 if (!GetOperations()->IsDone() || anObject.IsNull())
976 return aGEOMObject._retn();
978 return GetObject(anObject);
981 //=============================================================================
985 //=============================================================================
986 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionAlongPath
987 (GEOM::GEOM_Object_ptr theObject,
988 GEOM::GEOM_Object_ptr thePath,
989 CORBA::Double theDistance,
990 CORBA::Boolean theCopy,
991 CORBA::Boolean theReverse)
993 GEOM::GEOM_Object_var aGEOMObject;
995 //Set a not done flag
996 GetOperations()->SetNotDone();
998 //Get the basic object
999 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1000 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1002 //Get the path object
1003 Handle(::GEOM_Object) aPathObject = GetObjectImpl(thePath);
1004 if (aPathObject.IsNull()) return aGEOMObject._retn();
1006 //Perform the position
1007 Handle(::GEOM_Object) anObject =
1008 GetOperations()->PositionAlongPath(aBasicObject, aPathObject, theDistance, theCopy, theReverse);
1009 if (!GetOperations()->IsDone() || anObject.IsNull())
1010 return aGEOMObject._retn();
1014 UpdateGUIForObject(theObject);
1017 return GetObject(anObject);
1020 //=============================================================================
1024 //=============================================================================
1025 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate1D
1026 (GEOM::GEOM_Object_ptr theObject,
1027 GEOM::GEOM_Object_ptr theVector,
1028 CORBA::Double theStep, CORBA::Long theNbTimes)
1030 //Set a not done flag
1031 GetOperations()->SetNotDone();
1033 GEOM::GEOM_Object_var aGEOMObject;
1035 //Get the object itself
1036 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1037 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1039 //Get the vector of translation
1040 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
1041 //if (aVector.IsNull()) return aGEOMObject._retn(); // DX by default
1043 //Perform the translation
1044 Handle(::GEOM_Object) anObject =
1045 GetOperations()->Translate1D(aBasicObject, aVector, theStep, theNbTimes);
1046 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1048 return GetObject(anObject);
1051 //=============================================================================
1055 //=============================================================================
1056 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject,
1057 GEOM::GEOM_Object_ptr theVector1,
1058 CORBA::Double theStep1,
1059 CORBA::Long theNbTimes1,
1060 GEOM::GEOM_Object_ptr theVector2,
1061 CORBA::Double theStep2,
1062 CORBA::Long theNbTimes2)
1064 //Set a not done flag
1065 GetOperations()->SetNotDone();
1067 GEOM::GEOM_Object_var aGEOMObject;
1069 //Get the object itself
1070 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1071 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1073 //Get the vector1 of translation
1074 Handle(::GEOM_Object) aVector1 = GetObjectImpl(theVector1);
1075 //if (aVector1.IsNull()) return aGEOMObject._retn(); // DX by default
1077 //Get the vector2 of translation
1078 Handle(::GEOM_Object) aVector2 = GetObjectImpl(theVector2);
1079 //if (aVector2.IsNull()) return aGEOMObject._retn(); // DY by default
1081 //Perform the translation
1082 Handle(::GEOM_Object) anObject = GetOperations()->Translate2D
1083 (aBasicObject, aVector1, theStep1, theNbTimes1, aVector2, theStep2, theNbTimes2);
1084 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1086 return GetObject(anObject);
1089 //=============================================================================
1093 //=============================================================================
1094 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
1095 GEOM::GEOM_Object_ptr theVector,
1096 CORBA::Long theNbTimes)
1098 //Set a not done flag
1099 GetOperations()->SetNotDone();
1101 GEOM::GEOM_Object_var aGEOMObject;
1103 //Get the object itself
1104 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1105 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1107 //Get the a directon of rotation
1108 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
1109 //if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
1111 //Perform the rotation
1112 Handle(::GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theNbTimes);
1113 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1115 return GetObject(anObject);
1118 //=============================================================================
1120 * MultiRotate1DByStep
1122 //=============================================================================
1123 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate1DByStep (GEOM::GEOM_Object_ptr theObject,
1124 GEOM::GEOM_Object_ptr theVector,
1125 CORBA::Double theAngleStep,
1126 CORBA::Long theNbSteps)
1128 //Set a not done flag
1129 GetOperations()->SetNotDone();
1131 GEOM::GEOM_Object_var aGEOMObject;
1133 //Get the object itself
1134 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1135 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1137 //Get the a directon of rotation
1138 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
1139 //if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
1141 //Perform the rotation
1142 Handle(::GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theAngleStep, theNbSteps);
1143 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1145 return GetObject(anObject);
1148 //=============================================================================
1150 * MultiRotate2DNbTimes
1152 //=============================================================================
1153 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2DNbTimes (GEOM::GEOM_Object_ptr theObject,
1154 GEOM::GEOM_Object_ptr theVector,
1155 CORBA::Long theNbObjects,
1156 CORBA::Double theRadialStep,
1157 CORBA::Long theNbSteps)
1159 //Set a not done flag
1160 GetOperations()->SetNotDone();
1162 GEOM::GEOM_Object_var aGEOMObject;
1164 //Get the object itself
1165 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1166 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1168 //Get the a directon of rotation
1169 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
1170 //if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
1172 //Perform the rotation
1173 Handle(::GEOM_Object) anObject = GetOperations()->Rotate2D
1174 (aBasicObject, aVector, theNbObjects, theRadialStep, theNbSteps);
1175 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1177 return GetObject(anObject);
1180 //=============================================================================
1182 * MultiRotate2DByStep
1184 //=============================================================================
1185 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2DByStep (GEOM::GEOM_Object_ptr theObject,
1186 GEOM::GEOM_Object_ptr theVector,
1187 CORBA::Double theAngle,
1188 CORBA::Long theNbTimes1,
1189 CORBA::Double theStep,
1190 CORBA::Long theNbTimes2)
1192 //Set a not done flag
1193 GetOperations()->SetNotDone();
1195 GEOM::GEOM_Object_var aGEOMObject;
1197 //Get the object itself
1198 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1199 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1201 //Get the a directon of rotation
1202 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
1203 //if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
1205 //Perform the rotation
1206 Handle(::GEOM_Object) anObject = GetOperations()->Rotate2D
1207 (aBasicObject, aVector, theAngle, theNbTimes1, theStep, theNbTimes2);
1208 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1210 return GetObject(anObject);
1213 //=============================================================================
1217 //=============================================================================
1218 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject,
1219 GEOM::GEOM_Object_ptr theVector,
1220 CORBA::Double theAngle,
1221 CORBA::Long theNbTimes1,
1222 CORBA::Double theStep,
1223 CORBA::Long theNbTimes2)
1225 //Set a not done flag
1226 GetOperations()->SetNotDone();
1228 GEOM::GEOM_Object_var aGEOMObject;
1230 //Get the object itself
1231 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1232 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1234 //Get the a directon of rotation
1235 Handle(::GEOM_Object) aVector = GetObjectImpl(theVector);
1236 //if (aVector.IsNull()) return aGEOMObject._retn(); // DZ by default
1238 double anAngle = M_PI * theAngle / 180.;
1240 //Perform the rotation
1241 Handle(::GEOM_Object) anObject = GetOperations()->Rotate2D
1242 (aBasicObject, aVector, anAngle, theNbTimes1, theStep, theNbTimes2);
1243 if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn();
1245 return GetObject(anObject);
1248 //=============================================================================
1252 //=============================================================================
1253 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
1254 (GEOM::GEOM_Object_ptr theObject,
1255 GEOM::GEOM_Object_ptr theCentPoint,
1256 GEOM::GEOM_Object_ptr thePoint1,
1257 GEOM::GEOM_Object_ptr thePoint2)
1259 //Set a not done flag
1260 GetOperations()->SetNotDone();
1261 GEOM::GEOM_Object_var aGEOMObject;
1263 if (CORBA::is_nil(theObject))
1264 return aGEOMObject._retn();
1266 //check if the object is a sub-shape
1267 if (!theObject->IsMainShape()) {
1268 GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
1269 return aGEOMObject._retn();
1272 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
1274 //Get the object itself
1275 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
1276 if (anObject.IsNull()) return aGEOMObject._retn();
1278 //Get the central point of rotation
1279 Handle(::GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
1280 if (aCentPoint.IsNull()) return aGEOMObject._retn();
1282 //Get the first point
1283 Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
1284 if (aPoint1.IsNull()) return aGEOMObject._retn();
1286 //Get the second point
1287 Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
1288 if (aPoint2.IsNull()) return aGEOMObject._retn();
1290 //Perform the translation
1291 GetOperations()->RotateThreePoints(anObject, aCentPoint, aPoint1, aPoint2);
1294 UpdateGUIForObject(theObject);
1296 return aGEOMObject._retn();
1299 //=============================================================================
1301 * RotateThreePointsCopy
1303 //=============================================================================
1304 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy
1305 (GEOM::GEOM_Object_ptr theObject,
1306 GEOM::GEOM_Object_ptr theCentPoint,
1307 GEOM::GEOM_Object_ptr thePoint1,
1308 GEOM::GEOM_Object_ptr thePoint2)
1310 GEOM::GEOM_Object_var aGEOMObject;
1312 //Set a not done flag
1313 GetOperations()->SetNotDone();
1315 //Get the object itself
1316 Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
1317 if (aBasicObject.IsNull()) return aGEOMObject._retn();
1319 //Get the central point of rotation
1320 Handle(::GEOM_Object) aCentPoint = GetObjectImpl(theCentPoint);
1321 if (aCentPoint.IsNull()) return aGEOMObject._retn();
1323 //Get the first point
1324 Handle(::GEOM_Object) aPoint1 = GetObjectImpl(thePoint1);
1325 if (aPoint1.IsNull()) return aGEOMObject._retn();
1327 //Get the second point
1328 Handle(::GEOM_Object) aPoint2 = GetObjectImpl(thePoint2);
1329 if (aPoint2.IsNull()) return aGEOMObject._retn();
1331 //Perform the rotation
1332 Handle(::GEOM_Object) anObject =
1333 GetOperations()->RotateThreePointsCopy(aBasicObject, aCentPoint, aPoint1, aPoint2);
1334 if (!GetOperations()->IsDone() || anObject.IsNull())
1335 return aGEOMObject._retn();
1337 return GetObject(anObject);
1340 //=============================================================================
1342 * TransformLikeOtherCopy
1344 //=============================================================================
1345 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TransformLikeOtherCopy
1346 (GEOM::GEOM_Object_ptr theObject,
1347 GEOM::GEOM_Object_ptr theSample)
1349 GEOM::GEOM_Object_var aGEOMObject;
1351 //Set a not done flag
1352 GetOperations()->SetNotDone();
1354 //Get the object itself
1355 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
1356 if (anObject.IsNull()) return aGEOMObject._retn();
1358 //Get the sample object
1359 Handle(::GEOM_Object) aSample = GetObjectImpl(theSample);
1360 if (aSample.IsNull()) return aGEOMObject._retn();
1362 //Perform the transformation
1363 Handle(::GEOM_Object) aResObject =
1364 GetOperations()->TransformLikeOtherCopy(anObject, aSample);
1365 if (!GetOperations()->IsDone() || aResObject.IsNull())
1366 return aGEOMObject._retn();
1368 return GetObject(aResObject);
1371 //=============================================================================
1375 //=============================================================================
1376 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RecomputeObject
1377 (GEOM::GEOM_Object_ptr theObject)
1379 //Set a not done flag
1380 GetOperations()->SetNotDone();
1381 GEOM::GEOM_Object_var aGEOMObject;
1383 if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
1385 aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
1387 //Get the object itself
1388 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
1389 if (anObject.IsNull()) return aGEOMObject._retn();
1391 //Perform the recomputation
1392 Handle(::GEOM_Function) aLastFunction = anObject->GetLastFunction();
1393 if (aLastFunction.IsNull()) return aGEOMObject._retn();
1394 GetOperations()->GetSolver()->ComputeFunction(aLastFunction);
1396 return aGEOMObject._retn();
1399 //=============================================================================
1401 * MakeProjectionOnCylinder
1403 //=============================================================================
1404 GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MakeProjectionOnCylinder
1405 (GEOM::GEOM_Object_ptr theObject,
1406 CORBA::Double theRadius,
1407 CORBA::Double theStartAngle,
1408 CORBA::Double theAngleLength,
1409 CORBA::Double theAngleRotation)
1411 GEOM::GEOM_Object_var aGEOMObject;
1413 //Set a not done flag
1414 GetOperations()->SetNotDone();
1417 Handle(::GEOM_Object) anObject = GetObjectImpl(theObject);
1419 if (anObject.IsNull()) {
1420 return aGEOMObject._retn();
1423 //Perform the transformation
1424 Handle(::GEOM_Object) aResObject = GetOperations()->MakeProjectionOnCylinder
1425 (anObject, theRadius, theStartAngle, theAngleLength, theAngleRotation);
1427 if (!GetOperations()->IsDone() || aResObject.IsNull()) {
1428 return aGEOMObject._retn();
1431 return GetObject(aResObject);