1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #include <HYDROData_Entity.h>
20 #include <HYDROData_Document.h>
21 #include <HYDROData_Iterator.h>
22 #include <HYDROData_Tool.h>
23 #include <Standard_GUID.hxx>
24 #include <TDataStd_Name.hxx>
25 #include <TDataStd_ByteArray.hxx>
26 #include <TDataStd_UAttribute.hxx>
27 #include <TDataStd_Integer.hxx>
28 #include <TDataStd_IntegerArray.hxx>
29 #include <TDataStd_ReferenceList.hxx>
30 #include <TDF_CopyLabel.hxx>
31 #include <TDF_ListIteratorOfLabelList.hxx>
32 #include <TNaming_Builder.hxx>
33 #include <TNaming_NamedShape.hxx>
34 #include <TopoDS_Shape.hxx>
37 #include <QStringList>
40 HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects()
41 : NCollection_Sequence<Handle_HYDROData_Entity>()
45 HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const HYDROData_SequenceOfObjects& theSequence )
46 : NCollection_Sequence<Handle_HYDROData_Entity>( theSequence )
50 HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const NCollection_Sequence<Handle_HYDROData_Entity>& theSequence )
51 : NCollection_Sequence<Handle_HYDROData_Entity>( theSequence )
56 IMPLEMENT_STANDARD_HANDLE(HYDROData_Entity,MMgt_TShared)
57 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Entity,MMgt_TShared)
59 // is equal function for unique object mapping
60 bool IsEqual(const Handle_HYDROData_Entity& theObj1, const Handle_HYDROData_Entity& theObj2)
62 if ( !theObj1.IsNull() && !theObj2.IsNull() )
63 return theObj1->Label() == theObj2->Label();
67 QString HYDROData_Entity::GetName() const
69 Handle(TDataStd_Name) aName;
70 if (myLab.FindAttribute(TDataStd_Name::GetID(), aName)) {
71 TCollection_AsciiString aStr(aName->Get());
72 return QString(aStr.ToCString());
77 QString HYDROData_Entity::GetObjPyName() const
79 QString aName = GetName();
80 aName.replace(QRegExp("[\\W]"), "_");
85 void HYDROData_Entity::SetName(const QString& theName)
87 TDataStd_Name::Set(myLab, TCollection_ExtendedString(theName.toLatin1().constData()));
90 QStringList HYDROData_Entity::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
92 QStringList anEmptyList;
96 void HYDROData_Entity::Update()
101 void HYDROData_Entity::UpdateLocalCS( double theDx, double theDy )
103 //On the base level no actions are necessary
106 bool HYDROData_Entity::IsHas2dPrs() const
111 void HYDROData_Entity::Show()
116 Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
117 if ( aDocument.IsNull() )
120 aDocument->Show( this );
123 QVariant HYDROData_Entity::GetDataVariant()
128 void HYDROData_Entity::ClearChanged()
130 TDataStd_Integer::Set( myLab.FindChild( DataTag_GeomChange ), 0 );
133 int HYDROData_Entity::GetGeomChangeFlag() const
135 int aGeomChangeFlag = 0;
136 Handle(TDataStd_Integer) aGeomChangeAttr;
137 TDF_Label aGeomChangeLab = myLab.FindChild( DataTag_GeomChange );
138 aGeomChangeLab.FindAttribute( TDataStd_Integer::GetID(), aGeomChangeAttr );
139 if ( !aGeomChangeAttr.IsNull() )
140 aGeomChangeFlag = aGeomChangeAttr->Get();
141 return aGeomChangeFlag;
144 void HYDROData_Entity::Changed( Geometry theChangedGeometry )
146 Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
147 if( aDocument.IsNull() )
150 int aGeomChangeFlag = 0;
151 Handle(TDataStd_Integer) aGeomChangeAttr;
152 TDF_Label aGeomChangeLab = myLab.FindChild( DataTag_GeomChange );
153 aGeomChangeLab.FindAttribute( TDataStd_Integer::GetID(), aGeomChangeAttr );
154 if ( !aGeomChangeAttr.IsNull() )
155 aGeomChangeFlag = aGeomChangeAttr->Get();
157 int aBitsToChange = ( myGeom & theChangedGeometry );
158 if( aBitsToChange == 0 )
161 aGeomChangeFlag = ( aGeomChangeFlag | aBitsToChange );
162 TDataStd_Integer::Set( aGeomChangeLab, aGeomChangeFlag );
164 HYDROData_Iterator anIter( aDocument );
165 for ( ; anIter.More(); anIter.Next() )
167 Handle(HYDROData_Entity) anObject = anIter.Current();
168 HYDROData_SequenceOfObjects aRefSeq = anObject->GetAllReferenceObjects();
169 for ( int i = 1, n = aRefSeq.Length(); i <= n; ++i )
171 Handle(HYDROData_Entity) aRefObject = aRefSeq.Value( i );
172 if( aRefObject->Label()==myLab )
173 anObject->Changed( theChangedGeometry );
178 bool HYDROData_Entity::IsMustBeUpdated( Geometry theGeom ) const
180 return ( ( GetGeomChangeFlag() & theGeom ) != 0 );
183 bool HYDROData_Entity::CanBeUpdated() const
188 bool HYDROData_Entity::IsRemoved() const
190 return !myLab.HasAttribute();
193 void HYDROData_Entity::Remove()
195 return myLab.ForgetAllAttributes( true );
198 bool HYDROData_Entity::CanRemove()
203 HYDROData_Entity::HYDROData_Entity( Geometry theGeom )
208 HYDROData_Entity::~HYDROData_Entity()
212 void HYDROData_Entity::CopyTo( const Handle(HYDROData_Entity)& theDestination,
213 bool isGenerateNewName ) const
215 Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
216 if ( aDocument.IsNull() ) {
220 TDF_CopyLabel aCopy(myLab, theDestination->Label());
223 if( isGenerateNewName )
225 // generate a new unique name for the clone object:
226 // case 1: Image_1 -> Image_2
227 // case 2: ImageObj -> ImageObj_1
228 QString aName = theDestination->GetName();
229 QString aPrefix = aName;
230 if( aName.contains( '_' ) ) { // case 1
231 QString aSuffix = aName.section( '_', -1 );
232 bool anIsInteger = false;
233 aSuffix.toInt( &anIsInteger );
235 aPrefix = aName.section( '_', 0, -2 );
240 aName = HYDROData_Tool::GenerateObjectName( aDocument, aPrefix );
241 theDestination->SetName( aName );
245 Handle(HYDROData_Entity) HYDROData_Entity::GetFatherObject() const
247 Handle(HYDROData_Entity) aFather;
249 if ( !myLab.IsNull() )
251 TDF_Label aFatherLabel = myLab.Father();
253 while ( aFather.IsNull() && !aFatherLabel.IsNull() && !aFatherLabel.IsRoot() )
255 aFather = HYDROData_Iterator::Object( aFatherLabel );
256 aFatherLabel = aFatherLabel.Father();
263 HYDROData_SequenceOfObjects HYDROData_Entity::GetAllReferenceObjects() const
265 return HYDROData_SequenceOfObjects();
268 Standard_Boolean HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const
272 TDF_Label aLabel = myLab.FindChild( DataTag_ZLevel, false );
273 if ( !aLabel.IsNull() )
275 Handle(TDataStd_Integer) anIntVal;
276 if ( aLabel.FindAttribute( TDataStd_Integer::GetID(), anIntVal ) )
278 theLevel = anIntVal->Get();
279 return Standard_True;
283 return Standard_False;
286 void HYDROData_Entity::SetZLevel( const Standard_Integer& theLevel )
288 TDataStd_Integer::Set( myLab.FindChild( DataTag_ZLevel ), theLevel );
291 void HYDROData_Entity::RemoveZLevel()
293 TDF_Label aLabel = myLab.FindChild( DataTag_ZLevel, false );
294 if ( !aLabel.IsNull() )
295 aLabel.ForgetAllAttributes();
298 void HYDROData_Entity::SetLabel( const TDF_Label& theLabel )
303 void HYDROData_Entity::SaveByteArray( const int theTag,
307 TDF_Label aLab = theTag == 0 ? myLab : myLab.FindChild(theTag);
308 // array is empty, remove the attribute
310 aLab.ForgetAttribute(TDataStd_ByteArray::GetID());
313 // store data of image in byte array
314 Handle(TDataStd_ByteArray) aData;
315 if (!aLab.FindAttribute(TDataStd_ByteArray::GetID(), aData)) {
316 aData = TDataStd_ByteArray::Set(aLab, 1, theLen);
318 // copy bytes one by one
319 if (aData->Length() != theLen) {
320 Handle(TColStd_HArray1OfByte) aNewData = new TColStd_HArray1OfByte(1, theLen);
321 for(int a = 0; a < theLen; a++)
322 aNewData->SetValue(a + 1, theData[a]);
323 aData->ChangeArray(aNewData);
325 for(int a = 0; a < theLen; a++)
326 aData->SetValue(a + 1, theData[a]);
330 const char* HYDROData_Entity::ByteArray(const int theTag, int& theLen) const
332 TDF_Label aLab = theTag == 0 ? myLab : myLab.FindChild(theTag);
333 Handle(TDataStd_ByteArray) aData;
334 if (!aLab.FindAttribute(TDataStd_ByteArray::GetID(), aData))
335 return NULL; // return empty image if there is no array
336 theLen = aData->Length();
338 return (const char*)(&(aData->InternalArray()->ChangeArray1().ChangeValue(1)));
342 int HYDROData_Entity::NbReferenceObjects( const int theTag ) const
344 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
345 return aRefs.IsNull() ? 0 : aRefs->Extent();
348 bool HYDROData_Entity::HasReference( const Handle_HYDROData_Entity& theObj,
349 const int theTag ) const
351 if ( theObj.IsNull() )
354 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
355 if ( aRefs.IsNull() || aRefs->IsEmpty() )
358 TDF_ListIteratorOfLabelList aListIt( aRefs->List() );
359 for ( ; aListIt.More(); aListIt.Next() )
361 const TDF_Label& aRefLabel = aListIt.Value();
362 if ( theObj->Label() == aRefLabel )
369 void HYDROData_Entity::AddReferenceObject( const Handle_HYDROData_Entity& theObj,
372 if ( theObj.IsNull() )
375 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, true );
376 aRefs->Append( theObj->Label() );
379 void HYDROData_Entity::SetReferenceObject( const Handle_HYDROData_Entity& theObj,
383 if ( theObj.IsNull() )
385 RemoveReferenceObject( theTag, theIndex );
389 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, true );
391 if ( theIndex >= aRefs->Extent() )
393 aRefs->Append( theObj->Label() );
395 else if ( theIndex < 0 )
397 aRefs->Prepend( theObj->Label() );
401 RemoveReferenceObject( theTag, theIndex );
403 Handle(HYDROData_Entity) aBeforeObj = GetReferenceObject( theTag, theIndex );
405 aRefs = getReferenceList( theTag, true ); // because reference list can be removed
406 if ( !aBeforeObj.IsNull() )
407 aRefs->InsertBefore( theObj->Label(), aBeforeObj->Label() );
409 aRefs->Append( theObj->Label() );
413 void HYDROData_Entity::InsertReferenceObject( const Handle_HYDROData_Entity& theObj,
415 const int theBeforeIndex )
417 if ( theObj.IsNull() )
420 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, true );
422 if ( theBeforeIndex >= aRefs->Extent() )
424 aRefs->Append( theObj->Label() );
426 else if ( theBeforeIndex < 0 )
428 aRefs->Prepend( theObj->Label() );
432 Handle(HYDROData_Entity) aBeforeObj = GetReferenceObject( theTag, theBeforeIndex );
433 if ( !aBeforeObj.IsNull() )
434 aRefs->InsertBefore( theObj->Label(), aBeforeObj->Label() );
436 aRefs->Append( theObj->Label() );
440 void HYDROData_Entity::SetReferenceObjects( const HYDROData_SequenceOfObjects& theObjects,
443 ClearReferenceObjects( theTag );
444 if ( theObjects.IsEmpty() )
447 HYDROData_SequenceOfObjects::Iterator anIter( theObjects );
448 for ( ; anIter.More(); anIter.Next() )
449 AddReferenceObject( anIter.Value(), theTag );
452 Handle(HYDROData_Entity) HYDROData_Entity::GetReferenceObject( const int theTag,
453 const int theIndex ) const
455 Handle(HYDROData_Entity) aRes;
457 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
458 if ( aRefs.IsNull() || theIndex < 0 || theIndex >= aRefs->Extent() )
461 TDF_ListIteratorOfLabelList anIter( aRefs->List() );
462 for ( int anIndex = 0; anIndex != theIndex && anIter.More(); anIter.Next(), ++anIndex );
464 const TDF_Label& aRefLabel = anIter.Value();
465 aRes = HYDROData_Iterator::Object( aRefLabel );
470 HYDROData_SequenceOfObjects HYDROData_Entity::GetReferenceObjects( const int theTag ) const
472 HYDROData_SequenceOfObjects aRes;
474 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
475 if ( aRefs.IsNull() )
478 TDF_ListIteratorOfLabelList anIter( aRefs->List() );
479 for ( ; anIter.More(); anIter.Next() )
481 const TDF_Label& aRefLabel = anIter.Value();
483 Handle(HYDROData_Entity) aRefObject = HYDROData_Iterator::Object( aRefLabel );
484 if ( aRefObject.IsNull() )
487 aRes.Append( aRefObject );
493 void HYDROData_Entity::RemoveReferenceObject( const TDF_Label& theRefLabel,
496 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
497 if ( aRefs.IsNull() )
500 if ( aRefs->Extent() == 1 )
502 // remove all if only one
503 ClearReferenceObjects( theTag );
507 aRefs->Remove( theRefLabel );
510 void HYDROData_Entity::RemoveReferenceObject( const int theTag,
513 Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
514 if ( aRefs.IsNull() )
517 if ( aRefs->Extent() == 1 && theIndex == 0 )
519 // remove all if only one
520 ClearReferenceObjects( theTag );
525 TDF_ListIteratorOfLabelList anIter( aRefs->List() );
526 for ( ; anIndex != theIndex && anIter.More(); anIter.Next(), ++anIndex );
528 if ( anIndex != theIndex || !anIter.More() )
531 const TDF_Label& aRefLabel = anIter.Value();
532 aRefs->Remove( aRefLabel );
535 void HYDROData_Entity::ClearReferenceObjects( const int theTag )
537 TDF_Label aSetLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
538 aSetLabel.ForgetAttribute( TDataStd_ReferenceList::GetID() );
541 Handle(TDataStd_ReferenceList) HYDROData_Entity::getReferenceList( const int theTag,
542 const bool theIsCreate ) const
544 TDF_Label aLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
546 Handle(TDataStd_ReferenceList) aRefs;
547 if ( !aLabel.FindAttribute( TDataStd_ReferenceList::GetID(), aRefs ) && theIsCreate )
548 aRefs = TDataStd_ReferenceList::Set( aLabel );
553 void HYDROData_Entity::SetColor( const QColor& theColor,
556 TDF_Label aLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
558 Handle(TDataStd_IntegerArray) aColorArray;
559 if ( !aLabel.FindAttribute( TDataStd_IntegerArray::GetID(), aColorArray ) )
560 aColorArray = TDataStd_IntegerArray::Set( aLabel, 1, 4 );
562 aColorArray->SetValue( 1, theColor.red() );
563 aColorArray->SetValue( 2, theColor.green() );
564 aColorArray->SetValue( 3, theColor.blue() );
565 aColorArray->SetValue( 4, theColor.alpha() );
568 QColor HYDROData_Entity::GetColor( const QColor& theDefColor,
569 const int theTag ) const
571 QColor aResColor = theDefColor;
573 TDF_Label aLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
575 Handle(TDataStd_IntegerArray) aColorArray;
576 if ( aLabel.FindAttribute( TDataStd_IntegerArray::GetID(), aColorArray ) )
578 aResColor.setRed( aColorArray->Value( 1 ) );
579 aResColor.setGreen( aColorArray->Value( 2 ) );
580 aResColor.setBlue( aColorArray->Value( 3 ) );
581 aResColor.setAlpha( aColorArray->Value( 4 ) );
587 QStringList HYDROData_Entity::dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const
589 QStringList aResList;
591 Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
592 if ( aDocument.IsNull() )
595 QString aDocName = aDocument->GetDocPyName();
596 QString aName = GetObjPyName();
598 aResList << QString( "%1 = %2.CreateObject( %3 );" )
599 .arg( aName ).arg( aDocName ).arg( getPyTypeID() );
600 aResList << QString( "%1.SetName( \"%2\" );" )
601 .arg( aName ).arg( GetName() );
602 aResList << QString( "" );
606 // Dump object z-level in viewer
607 Standard_Integer anObjZLevel = -1;
608 if ( GetZLevel( anObjZLevel ) )
610 aResList << QString( "%1.SetZLevel( %2 );" )
611 .arg( aName ).arg( anObjZLevel );
612 aResList << QString( "" );
619 QString HYDROData_Entity::getPyTypeID() const
623 case KIND_IMAGE: return "KIND_IMAGE";
624 case KIND_POLYLINE: return "KIND_POLYLINE";
625 case KIND_BATHYMETRY: return "KIND_BATHYMETRY";
626 case KIND_ALTITUDE: return "KIND_ALTITUDE";
627 case KIND_IMMERSIBLE_ZONE: return "KIND_IMMERSIBLE_ZONE";
628 case KIND_RIVER: return "KIND_RIVER";
629 case KIND_STREAM: return "KIND_STREAM";
630 case KIND_CONFLUENCE: return "KIND_CONFLUENCE";
631 case KIND_CHANNEL: return "KIND_CHANNEL";
632 case KIND_OBSTACLE: return "KIND_OBSTACLE";
633 case KIND_DIGUE: return "KIND_DIGUE";
634 case KIND_PROFILE: return "KIND_PROFILE";
635 case KIND_PROFILEUZ: return "KIND_PROFILEUZ";
636 case KIND_POLYLINEXY: return "KIND_POLYLINEXY";
637 case KIND_CALCULATION: return "KIND_CALCULATION";
638 case KIND_ZONE: return "KIND_ZONE";
639 case KIND_REGION: return "KIND_REGION";
640 case KIND_VISUAL_STATE: return "KIND_VISUAL_STATE";
641 case KIND_ARTIFICIAL_OBJECT: return "KIND_ARTIFICIAL_OBJECT";
642 case KIND_NATURAL_OBJECT: return "KIND_NATURAL_OBJECT";
643 case KIND_DUMMY_3D: return "KIND_DUMMY_3D";
644 case KIND_SHAPES_GROUP: return "KIND_SHAPES_GROUP";
645 case KIND_SPLITTED_GROUP: return "KIND_SPLITTED_GROUP";
646 case KIND_STREAM_ALTITUDE: return "KIND_STREAM_ALTITUDE";
647 case KIND_OBSTACLE_ALTITUDE: return "KIND_OBSTACLE_ALTITUDE";
648 case KIND_STRICKLER_TABLE: return "KIND_STRICKLER_TABLE";
649 case KIND_LAND_COVER_OBSOLETE: return "";
650 case KIND_LAND_COVER_MAP: return "KIND_LAND_COVER_MAP";
651 default: return "KIND_UNKNOWN"; ///! Unrecognized object
655 void HYDROData_Entity::setPythonReferenceObject( MapOfTreatedObjects& theTreatedObjects,
656 QStringList& theScript,
657 const Handle(HYDROData_Entity)& theRefObject,
658 const QString& theMethod ) const
660 if ( !checkObjectPythonDefinition( theTreatedObjects, theScript, theRefObject ) )
663 QString aRefObjName = theRefObject->GetObjPyName();
665 QString anObjName = GetObjPyName();
666 theScript << QString( "%1.%2( %3 );" )
667 .arg( anObjName ).arg( theMethod ).arg( aRefObjName );
670 bool HYDROData_Entity::checkObjectPythonDefinition( MapOfTreatedObjects& theTreatedObjects,
671 QStringList& theScript,
672 const Handle(HYDROData_Entity)& theRefObject ) const
674 if ( theRefObject.IsNull() )
677 QString aRefObjName = theRefObject->GetName();
678 if ( aRefObjName.isEmpty() )
681 if ( theTreatedObjects.contains( aRefObjName ) )
684 // The definition of reference object must be dumped before this
685 QStringList aRefObjDump = theRefObject->DumpToPython( theTreatedObjects );
686 if ( aRefObjDump.isEmpty() )
689 QStringList aTmpList = theScript;
690 theScript = aRefObjDump;
692 theScript << QString( "" );
693 theScript << aTmpList;
695 theTreatedObjects.insert( aRefObjName, theRefObject );
700 void HYDROData_Entity::setPythonObjectColor( QStringList& theScript,
701 const QColor& theColor,
702 const QColor& theDefaultColor,
703 const QString& theMethod ) const
705 if ( theColor == theDefaultColor )
706 return; //Do not set the color for object if it like default
708 QString anObjName = GetObjPyName();
709 theScript << QString( "%1.%2( QColor( %3, %4, %5, %6 ) );" )
710 .arg( anObjName ).arg( theMethod )
711 .arg( theColor.red() ).arg( theColor.green() )
712 .arg( theColor.blue() ).arg( theColor.alpha() );
715 void HYDROData_Entity::findPythonReferenceObject( MapOfTreatedObjects& theTreatedObjects,
716 QStringList& theScript ) const
718 Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
719 if ( aDocument.IsNull() )
722 theScript << QString( "%1 = %2.FindObjectByName( \"%3\" );" ).arg( GetObjPyName() )
723 .arg( aDocument->GetDocPyName() )
727 void HYDROData_Entity::SetShape( int theTag, const TopoDS_Shape& theShape )
729 TNaming_Builder aBuilder( myLab.FindChild( theTag ) );
730 aBuilder.Generated( theShape );
733 TopoDS_Shape HYDROData_Entity::GetShape( int theTag ) const
735 TDF_Label aShapeLabel = myLab.FindChild( theTag, false );
736 if ( !aShapeLabel.IsNull() )
738 Handle(TNaming_NamedShape) aNamedShape;
739 if ( aShapeLabel.FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) )
740 return aNamedShape->Get();
742 return TopoDS_Shape();