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_LandCoverMap.h>
20 #include <HYDROData_Object.h>
21 #include <HYDROData_PolylineXY.h>
22 #include <HYDROData_Tool.h>
23 #include <HYDROData_ShapeFile.h>
25 #include <BOPAlgo_BOP.hxx>
26 #include <BOPAlgo_Builder.hxx>
27 #include <BOPAlgo_PaveFiller.hxx>
28 #include <BOPCol_ListOfShape.hxx>
29 #include <BRep_Builder.hxx>
30 #include <BRepAdaptor_Curve.hxx>
31 #include <BRepAlgoAPI_Fuse.hxx>
32 #include <BRepBuilderAPI_MakeFace.hxx>
33 #include <GCPnts_QuasiUniformDeflection.hxx>
35 #include <TopoDS_Compound.hxx>
36 #include <TopoDS_Edge.hxx>
37 #include <TopoDS_Face.hxx>
38 #include <TopoDS_Iterator.hxx>
39 #include <TopoDS_Shell.hxx>
40 #include <TopExp_Explorer.hxx>
41 #include <TopTools_ListIteratorOfListOfShape.hxx>
42 #include <BOPAlgo_PaveFiller.hxx>
43 #include <BRepTools.hxx>
44 #include <TopExp_Explorer.hxx>
45 #include <ShapeUpgrade_UnifySameDomain.hxx>
49 #include <QTextStream>
51 const char TELEMAC_FORMAT = 'f';
52 const int TELEMAC_PRECISION = 3;
55 IMPLEMENT_STANDARD_HANDLE(HYDROData_LandCoverMap, HYDROData_Entity)
56 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_LandCoverMap, HYDROData_Entity)
60 @param theMap the land cover map to iterate through
62 HYDROData_LandCoverMap::Iterator::Iterator( const HYDROData_LandCoverMap& theMap )
67 HYDROData_LandCoverMap::Iterator::Iterator( const Handle( HYDROData_LandCoverMap )& theMap )
79 Initialize the iterator
80 @param theMap the land cover map to iterate through
82 void HYDROData_LandCoverMap::Iterator::Init( const HYDROData_LandCoverMap& theMap )
84 TopoDS_Shape aShape = theMap.GetShape();
88 myIterator = new TopoDS_Iterator( aShape );
90 theMap.myLab.FindChild( DataTag_Types ).FindAttribute( TDataStd_ExtStringArray::GetID(), myArray );
91 if( myArray.IsNull() )
94 myIndex = myArray->Lower();
100 HYDROData_LandCoverMap::Iterator::~Iterator()
106 Return the current 0-based index of the iterator
107 @return the current index
109 int HYDROData_LandCoverMap::Iterator::Index() const
111 if( myArray.IsNull() )
114 return myIndex - myArray->Lower();
118 Return if the iterator has more elements
119 @return if the iterator has more elements
121 bool HYDROData_LandCoverMap::Iterator::More() const
123 return !myArray.IsNull() && myIterator && myIterator->More();
127 Move iterator to the next element
129 void HYDROData_LandCoverMap::Iterator::Next()
139 Get the current land cover (face)
140 @return the land cover's face
142 TopoDS_Face HYDROData_LandCoverMap::Iterator::Face() const
145 return TopoDS::Face( myIterator->Value() );
147 return TopoDS_Face();
151 Get the current land cover's Strickler type
152 @return the land cover's Strickler type
154 QString HYDROData_LandCoverMap::Iterator::StricklerType() const
156 if( myArray.IsNull() || myIndex < myArray->Lower() || myIndex > myArray->Upper() )
159 return HYDROData_Tool::toQString( myArray->Value( myIndex ) );
163 Set the Strickler type for the current land cover
164 @param theType the Strickler type
166 void HYDROData_LandCoverMap::Iterator::SetStricklerType( const QString& theType )
168 if( myArray.IsNull() || myIndex < myArray->Lower() || myIndex > myArray->Upper() )
171 myArray->SetValue( myIndex, HYDROData_Tool::toExtString( theType ) );
177 HYDROData_LandCoverMap::HYDROData_LandCoverMap()
178 : HYDROData_Entity( Geom_No )
185 HYDROData_LandCoverMap::~HYDROData_LandCoverMap()
191 @return object's kind
193 const ObjectKind HYDROData_LandCoverMap::GetKind() const
195 return KIND_LAND_COVER_MAP;
198 int HYDROData_LandCoverMap::GetLCCount() const
200 Iterator anIt( *this );
202 for( ; anIt.More(); anIt.Next() )
207 bool HYDROData_LandCoverMap::IsEmpty() const
209 Iterator anIt( *this );
217 Load attributes from DBF File
220 HYDROData_LandCoverMap::DBFStatus HYDROData_LandCoverMap::ImportDBF( const QString& theDBFFileName,
221 const QString& theFieldName,
222 const QStringList& theDBFValues,
223 const QStringList& theStricklerTypes,
224 const QList<int>& theIndices )
226 if (theDBFValues.size() != theStricklerTypes.size())
227 return DBFStatus_DIFF_SIZE_ERROR;
228 HYDROData_ShapeFile aDBFImporter;
229 if (!aDBFImporter.DBF_OpenDBF(theDBFFileName))
230 return DBFStatus_OPEN_FILE_ERROR; //cant open file
232 QStringList FieldList = aDBFImporter.DBF_GetFieldList();
233 int FieldNameIndex = FieldList.indexOf(theFieldName);
234 if (FieldNameIndex == -1)
235 return DBFStatus_NO_SUCH_FIELD_ERROR; //no such field
237 std::vector<HYDROData_ShapeFile::DBF_AttrValue> theAttrV;
238 aDBFImporter.DBF_GetAttributeList(FieldNameIndex, theAttrV );
241 Iterator anIt( *this );
242 for( ; anIt.More(); anIt.Next() )
244 int CurIndex = anIt.Index();
245 HYDROData_ShapeFile::DBF_AttrValue AValue = theAttrV[theIndices[CurIndex]];
246 int StricklerTypesInd = theDBFValues.indexOf(QString(AValue.myStrVal));
247 if ( StricklerTypesInd != -1)
248 anIt.SetStricklerType(theStricklerTypes[StricklerTypesInd]);
255 return DBFStatus_NO_DBFVALUES_CORRESPONDENCE_WARNING;
259 Export attributes to DBF File
262 void HYDROData_LandCoverMap::ExportDBF( const QString& theDBFFileName,
263 const QString& theFieldName,
264 const QStringList& theDBFValues,
265 const QStringList& theStricklerTypes) const
267 HYDROData_ShapeFile anExporter;
268 std::vector<HYDROData_ShapeFile::DBF_AttrValue> theAttrV;
269 Iterator anIt( *this );
270 for( ; anIt.More(); anIt.Next() )
272 QString CurST = anIt.StricklerType();
273 HYDROData_ShapeFile::DBF_AttrValue aCurAttrV;
274 aCurAttrV.myIsNull = false;
275 int StricklerTypesInd = theStricklerTypes.indexOf(CurST);
276 if (StricklerTypesInd != -1)
278 aCurAttrV.myStrVal = theDBFValues[StricklerTypesInd];
279 aCurAttrV.myFieldType = HYDROData_ShapeFile::DBF_FieldType_String;
280 theAttrV.push_back(aCurAttrV);
283 aCurAttrV.myIsNull = true;
286 anExporter.DBF_WriteFieldAndValues(theDBFFileName, theFieldName, HYDROData_ShapeFile::DBF_FieldType_String, theAttrV, true);
290 int HashCode( const gp_Pnt& thePoint, const Standard_Integer theUpper )
292 int aHashX = HashCode( thePoint.X(), theUpper );
293 int aHashY = HashCode( thePoint.Y(), theUpper );
294 return (aHashX^aHashY)%theUpper;
297 bool operator == ( const gp_Pnt& thePoint1, const gp_Pnt& thePoint2 )
299 return thePoint1.IsEqual( thePoint2, Precision::Confusion() );
302 bool EdgeDiscretization( const TopoDS_Edge& theEdge,
303 Standard_Real theDeflection,
304 NCollection_IndexedMap<gp_Pnt>& theVerticesMap,
305 QList<int>& theVerticesIds )
307 BRepAdaptor_Curve aCurve( theEdge );
308 GCPnts_QuasiUniformDeflection aDiscrete( aCurve, theDeflection );
309 if( !aDiscrete.IsDone() )
312 int n = aDiscrete.NbPoints();
313 for( int i=1; i<=n; i++ )
315 gp_Pnt aPnt = aDiscrete.Value( i );
317 if( theVerticesMap.Contains( aPnt ) )
318 anId = theVerticesMap.FindIndex( aPnt );
321 anId = theVerticesMap.Size();
322 theVerticesMap.Add( aPnt );
324 theVerticesIds.append( anId );
330 Export the land cover map for the solver (Telemac)
331 @param theFileName the name of file
332 @return if the export is successful
334 bool HYDROData_LandCoverMap::ExportTelemac( const QString& theFileName, Standard_Real theDeflection ) const
336 TopoDS_Shape aLandCoverMapShape = GetShape();
337 TopTools_ListOfShape aListOfFaces;
338 TopExp_Explorer anExp( aLandCoverMapShape, TopAbs_FACE );
339 for( ; anExp.More(); anExp.Next() )
340 aListOfFaces.Append( anExp.Current() );
342 TopoDS_Shape aShape = MergeFaces( aListOfFaces, false );
344 NCollection_IndexedMap<gp_Pnt> aVerticesMap;
345 NCollection_IndexedDataMap< TopoDS_Edge, QList<int> > anEdgesMap;
346 NCollection_IndexedDataMap< TopoDS_Face, QList<int> > aFacesMap;
348 // add into the map all edges existing in the shell
349 TopExp_Explorer anExp1( aShape, TopAbs_EDGE );
350 for( ; anExp1.More(); anExp1.Next() )
352 TopoDS_Edge anEdge = TopoDS::Edge( anExp1.Current() );
353 QList<int> aVerticesIdsList;
354 if( EdgeDiscretization( anEdge, theDeflection, aVerticesMap, aVerticesIdsList ) )
355 anEdgesMap.Add( anEdge, aVerticesIdsList );
358 // add into the map all faces existing in the shell and correspondence between face and edges ids
359 TopExp_Explorer anExp2( aShape, TopAbs_FACE );
360 for( ; anExp2.More(); anExp2.Next() )
362 TopoDS_Face aFace = TopoDS::Face( anExp2.Current() );
363 TopExp_Explorer anExp3( aFace, TopAbs_EDGE );
364 QList<int> anEdgesIdsList;
365 for( ; anExp3.More(); anExp3.Next() )
367 TopoDS_Edge anEdge = TopoDS::Edge( anExp3.Current() );
368 int anEdgeId = anEdgesMap.FindIndex( anEdge );
369 anEdgesIdsList.append( anEdgeId );
371 aFacesMap.Add( aFace, anEdgesIdsList );
374 QFile aFile( theFileName );
375 if( !aFile.open( QFile::WriteOnly | QFile::Text ) )
378 QTextStream aStream( &aFile );
379 aStream << "# nodes\n";
380 NCollection_IndexedMap<gp_Pnt>::Iterator anIt1( aVerticesMap );
381 for( ; anIt1.More(); anIt1.Next() )
383 gp_Pnt aPnt = anIt1.Value();
384 aStream << QString::number( aPnt.X(), TELEMAC_FORMAT, TELEMAC_PRECISION );
386 aStream << QString::number( aPnt.Y(), TELEMAC_FORMAT, TELEMAC_PRECISION );
388 aStream << QString::number( aPnt.Z(), TELEMAC_FORMAT, TELEMAC_PRECISION );
393 aStream << "# edges\n";
394 NCollection_IndexedDataMap< TopoDS_Edge, QList<int> >::Iterator anIt2( anEdgesMap );
395 for( ; anIt2.More(); anIt2.Next() )
397 QList<int> aVerticesIds = anIt2.Value();
398 foreach( int anId, aVerticesIds )
399 aStream << anId << " ";
404 aStream << "# faces\n";
405 NCollection_IndexedDataMap< TopoDS_Face, QList<int> >::Iterator anIt3( aFacesMap );
406 for( ; anIt3.More(); anIt3.Next() )
408 QList<int> anEdgesIds = anIt3.Value();
409 foreach( int anId, anEdgesIds )
410 aStream << anId << " ";
420 Add a new object as land cover
421 @param theObject the object to add as land cover
422 @param theType the Strickler type for the new land cover
423 @return if the addition is successful
425 bool HYDROData_LandCoverMap::Add( const Handle( HYDROData_Object )& theObject, const QString& theType )
427 if( theObject.IsNull() )
430 TopoDS_Shape aShape = theObject->GetTopShape();
431 if( aShape.ShapeType()!=TopAbs_FACE )
434 TopoDS_Face aFace = TopoDS::Face( aShape );
435 return LocalPartition( aFace, theType );
439 Add a new polyline as land cover
440 @param thePolyline the polyline to add as land cover
441 @param theType the Strickler type for the new land cover
442 @return if the addition is successful
444 bool HYDROData_LandCoverMap::Add( const Handle( HYDROData_PolylineXY )& thePolyline, const QString& theType )
446 if( thePolyline.IsNull() )
449 TopoDS_Shape aShape = thePolyline->GetShape();
450 if( aShape.ShapeType()!=TopAbs_WIRE )
453 TopoDS_Wire aWire = TopoDS::Wire( aShape );
454 if( !aWire.Closed() )
457 TopoDS_Face aFace = BRepBuilderAPI_MakeFace( aWire, Standard_True ).Face();
458 return LocalPartition( aFace, theType );
462 Remove the given face from land cover map
463 @param theFace the face to be removed
464 @return if the removing is successful
466 bool HYDROData_LandCoverMap::Remove( const TopoDS_Face& theFace )
468 TopTools_ListOfShape aList;
469 aList.Append( theFace );
470 return Remove( aList );
474 Remove the given faces from land cover map
475 @param theFacesToRemove the face list to be removed
476 @return if the removing is successful
478 bool HYDROData_LandCoverMap::Remove( const TopTools_ListOfShape& theFacesToRemove )
480 HYDROData_MapOfFaceToStricklerType aFacesToRemove, aNewFaces;
481 TopTools_ListIteratorOfListOfShape aFIt( theFacesToRemove );
482 for( ; aFIt.More(); aFIt.Next() )
484 TopoDS_Shape aShape = aFIt.Value();
485 if( aShape.ShapeType()==TopAbs_FACE )
486 aFacesToRemove.Add( TopoDS::Face( aShape ), "" );
489 Iterator anIt( *this );
490 for( ; anIt.More(); anIt.Next() )
491 if( !aFacesToRemove.Contains( anIt.Face() ) )
492 aNewFaces.Add( anIt.Face(), anIt.StricklerType() );
494 StoreLandCovers( aNewFaces );
499 Split the land cover map by the given polyline
500 @param thePolyline the tool polyline to split the land cover map
501 @return if the removing is successful
503 bool HYDROData_LandCoverMap::Split( const Handle( HYDROData_PolylineXY )& thePolyline )
505 if( thePolyline.IsNull() )
508 TopoDS_Shape aShape = thePolyline->GetShape();
509 return LocalPartition( aShape, "" );
513 Merge the given faces in the land cover
514 @param theFaces the faces to merge in the land cover map
515 @param theType the Strickler type for the merged land cover
516 @return if the merge is successful
518 bool HYDROData_LandCoverMap::Merge( const TopTools_ListOfShape& theFaces, const QString& theType )
520 // 1. to fuse the faces into the new face
521 TopoDS_Shape aMergedFace = MergeFaces( theFaces, true );
522 if( aMergedFace.ShapeType()==TopAbs_FACE )
524 // 2. to remove the merged faces from the current map
527 // 3. to add the face into the map
528 return LocalPartition( TopoDS::Face( aMergedFace ), theType );
534 Merge the given faces into the shell/face
535 @param theFaces the faces to merge
536 @param IsToUnify if the common edges should be removed (fused)
537 @param theTolerance the operation's tolerance
538 @return result shape (face or shell)
540 TopoDS_Shape HYDROData_LandCoverMap::MergeFaces( const TopTools_ListOfShape& theFaces,
541 bool IsToUnify, double theTolerance )
544 TopTools_ListIteratorOfListOfShape anIt;
545 BOPCol_ListOfShape aLC;
546 anIt.Initialize(theFaces);
547 for( ; anIt.More(); anIt.Next() )
549 if (anIt.Value().ShapeType() != TopAbs_FACE)
550 return TopoDS_Shape();
551 aLC.Append( anIt.Value() );
554 BOPAlgo_PaveFiller aPF;
555 aPF.SetArguments( aLC );
556 aPF.SetRunParallel( Standard_False );
557 aPF.SetFuzzyValue( theTolerance );
560 anError = aPF.ErrorStatus();
562 return TopoDS_Shape();
564 BOPAlgo_Builder anAlgo;
565 anIt.Initialize( theFaces );
566 for( ; anIt.More(); anIt.Next() )
567 anAlgo.AddArgument( anIt.Value() );
569 anAlgo.PerformWithFiller( aPF );
570 anError = anAlgo.ErrorStatus();
572 return TopoDS_Shape();
574 const TopoDS_Shape& aMergedShape = anAlgo.Shape();
576 BRep_Builder aBuilder;
578 aBuilder.MakeShell( aShell );
579 aShell.Closed( Standard_False );
580 TopExp_Explorer anExplorer( aMergedShape, TopAbs_FACE );
581 for( ; anExplorer.More(); anExplorer.Next() )
583 const TopoDS_Face& aFace = TopoDS::Face(anExplorer.Current());
586 if( aFace.ShapeType() == TopAbs_FACE )
588 aBuilder.Add( aShell, aFace );
589 aShell.Closed( Standard_False );
593 TopoDS_Shape aResult;
596 ShapeUpgrade_UnifySameDomain aUSD;
597 aUSD.Initialize( aShell );
599 aResult = aUSD.Shape();
604 anExplorer.Init( aResult, TopAbs_FACE );
606 TopoDS_Face anOneFace;
607 for( ; anExplorer.More(); anExplorer.Next(), n++ )
608 anOneFace = TopoDS::Face( anExplorer.Current() );
617 Get the shape of the land cover map
619 TopoDS_Shape HYDROData_LandCoverMap::GetShape() const
621 return HYDROData_Entity::GetShape( DataTag_Shape );
625 Set the shape of the land cover map
626 @param theShape the new shape for the land cover map
628 void HYDROData_LandCoverMap::SetShape( const TopoDS_Shape& theShape )
630 HYDROData_Entity::SetShape( DataTag_Shape, theShape );
634 Perform the local partition algorithm on the land cover
635 @param theNewShape the new shape to add into the land cover
636 @param theNewType the new Strickler type for the new land cover
637 @return if the local partition is successful
639 bool HYDROData_LandCoverMap::LocalPartition( const TopoDS_Shape& theNewShape, const QString& theNewType )
641 if( theNewShape.IsNull() )
644 BOPCol_ListOfShape aShapesList;
645 BOPAlgo_PaveFiller aPaveFiller;
646 HYDROData_MapOfFaceToStricklerType aNewFaces;
648 // add faces to shapes list
649 Iterator anIt( *this );
650 for( ; anIt.More(); anIt.Next() )
651 aShapesList.Append( anIt.Face() );
652 aShapesList.Append( theNewShape );
654 if( aShapesList.Size()==1 && theNewShape.ShapeType()==TopAbs_FACE )
656 aNewFaces.Add( TopoDS::Face( theNewShape ), theNewType );
657 StoreLandCovers( aNewFaces );
661 // prepare pave filler
662 aPaveFiller.SetArguments( aShapesList );
663 aPaveFiller.Perform();
664 Standard_Integer anError = aPaveFiller.ErrorStatus();
668 // add faces to builder
669 BOPAlgo_Builder aBuilder;
671 for( ; anIt.More(); anIt.Next() )
672 aBuilder.AddArgument( anIt.Face() );
673 aBuilder.AddArgument( theNewShape );
675 // perform the partition with the pave filler
676 aBuilder.PerformWithFiller( aPaveFiller );
677 anError = aBuilder.ErrorStatus();
681 //std::cout << "History:" << std::endl;
682 // analysis of the history
683 // a. to fill map of shapes which come from the new face
684 NCollection_IndexedMap<int> aShapesFromNewFace;
685 //std::cout << "from NEW " << theNewShape << ":" << theNewType << std::endl;
686 TopTools_ListOfShape aModified = aBuilder.Modified( theNewShape );
687 TopTools_ListIteratorOfListOfShape aMIt( aModified );
688 for( ; aMIt.More(); aMIt.Next() )
690 //std::cout << " " << aMIt.Value() << std::endl;
691 int aKey = (int)(uintptr_t)aMIt.Value().TShape().operator->();
692 aShapesFromNewFace.Add( aKey );
695 // b. to fill map of parts except parts from new face
697 for( ; anIt.More(); anIt.Next() )
699 QString aSType = anIt.StricklerType();
700 //std::cout << "from " << anIt.Face() << ": " << anIt.StricklerType() << std::endl;
701 TopTools_ListOfShape aModified = aBuilder.Modified( anIt.Face() );
702 if( aModified.Extent() == 0 )
703 aModified.Append( anIt.Face() );
705 TopTools_ListIteratorOfListOfShape aMIt( aModified );
706 for( ; aMIt.More(); aMIt.Next() )
708 TopoDS_Shape aShape = aMIt.Value();
709 bool isFace = aShape.ShapeType()==TopAbs_FACE;
710 int aKey = (int)(uintptr_t)aShape.TShape().operator->();
711 bool isAlsoFromNew = aShapesFromNewFace.Contains( aKey );
712 //std::cout << " " << aShape << " " << isAlsoFromNew << std::endl;
713 if( isFace && !isAlsoFromNew )
714 aNewFaces.Add( TopoDS::Face( aShape ), aSType );
718 // c. add the new shape if it is face with its type
719 if( theNewShape.ShapeType()==TopAbs_FACE )
720 aNewFaces.Add( TopoDS::Face( theNewShape ), theNewType );
722 // convert map of shape to type to compound and list of types
723 StoreLandCovers( aNewFaces );
728 Replace the set of land covers in the land cover map
729 @param theMap the map of shape (face) to Strickler type (string)
731 void HYDROData_LandCoverMap::StoreLandCovers( const HYDROData_MapOfFaceToStricklerType& theMap )
733 TopTools_ListOfShape aListOfFaces;
735 int n = theMap.Size();
737 Handle( TDataStd_ExtStringArray ) aTypes =
738 TDataStd_ExtStringArray::Set( myLab.FindChild( DataTag_Types ), 0, n-1, Standard_True );
740 HYDROData_MapOfFaceToStricklerType::Iterator aNFIt( theMap );
741 for( int i=0; aNFIt.More(); aNFIt.Next(), i++ )
743 TopoDS_Face aFace = aNFIt.Key();
746 QString aType = aNFIt.Value();
747 aListOfFaces.Append(aFace);
748 aTypes->SetValue( i, HYDROData_Tool::toExtString( aType ) );
751 TopoDS_Shape aResult;
752 if( aListOfFaces.Extent() == 1 )
755 BRep_Builder aShellBuilder;
756 aShellBuilder.MakeShell( aShell );
757 aShell.Closed( Standard_False );
758 aShellBuilder.Add( aShell, aListOfFaces.First() );
761 else if( aListOfFaces.Extent() > 1 )
762 aResult = MergeFaces( aListOfFaces, false );
768 Find the land cover for the given point
769 @param thePoint the point laying in some land cover
770 @param theType the returned type
771 @return the found land cover's face
773 TopoDS_Face HYDROData_LandCoverMap::FindByPoint( const gp_Pnt2d& thePoint, QString& theType ) const
775 //TODO: some more optimal algorithm
776 Iterator anIt( *this );
777 for( ; anIt.More(); anIt.Next() )
778 if( HYDROData_Tool::ComputePointState( thePoint.XY(), anIt.Face() ) == TopAbs_IN )
780 theType = anIt.StricklerType();
785 return TopoDS_Face();
790 @param theTreatedObjects the map of treated objects
792 QStringList HYDROData_LandCoverMap::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
794 QStringList aResList = dumpObjectCreation( theTreatedObjects );
795 QString aName = GetObjPyName();
797 //Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
798 //setPythonReferenceObject( theTreatedObjects, aResList, aHydAxis, "SetHydraulicAxis" );
800 //HYDROData_SequenceOfObjects aSeqOfProfiles = GetProfiles();
801 //for ( int i = 1, aNb = aSeqOfProfiles.Size(); i <= aNb; ++i )
803 //const Handle(HYDROData_Entity) aProfile = aSeqOfProfiles.Value( i );
804 //setPythonReferenceObject( theTreatedObjects, aResList, aProfile, "AddProfile" );