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_SplitToZonesTool.h"
21 #include "HYDROData_PolylineXY.h"
22 #include "HYDROData_LandCover.h"
23 #include "HYDROData_ShapesGroup.h"
24 #include <HYDROData_Transform.h>
25 #include <BRepAlgoAPI_Cut.hxx>
26 #include <BRepAlgoAPI_Common.hxx>
27 #include <BRepBuilderAPI_MakeFace.hxx>
28 #include <BRep_Builder.hxx>
29 #include <TopExp_Explorer.hxx>
31 #include <TopoDS_Shape.hxx>
32 #include <TopoDS_Compound.hxx>
33 #include <TopoDS_Wire.hxx>
34 #include <TopoDS_Edge.hxx>
35 #include <BRepCheck_Analyzer.hxx>
36 #include <TopTools_ListOfShape.hxx>
37 #include <TopTools_ListIteratorOfListOfShape.hxx>
39 #include <BRepGProp.hxx>
40 #include <GProp_GProps.hxx>
41 #include <Geom_Plane.hxx>
42 #include <BRepBuilderAPI_FindPlane.hxx>
44 //#define DEB_SPLIT_TO_ZONES 1
45 //#define DEB_SPLIT_TO_ZONES_CHECK_PARTITION 1
46 #if (defined (DEB_SPLIT_TO_ZONES) || defined(DEB_SPLIT_TO_ZONES_CHECK_PARTITION))
47 #include <BRepTools.hxx>
48 static TCollection_AsciiString fileNameBefore("BeforeTranslation");
51 TopoDS_Face HYDROData_SplitToZonesTool::SplitData::Face() const
57 if ( Shape.ShapeType() == TopAbs_FACE )
59 aResFace = TopoDS::Face( Shape );
61 else if ( Shape.ShapeType() == TopAbs_WIRE )
63 BRepBuilderAPI_MakeFace aMakeFace( TopoDS::Wire( Shape ), Standard_True );
65 if( aMakeFace.IsDone() )
66 aResFace = aMakeFace.Face();
73 Standard_Boolean buildLimFace(const TopoDS_Wire& theBndWire, TopoDS_Face& outFace)
76 BRepGProp::LinearProperties(theBndWire,G);
77 const gp_Pnt& aCPnt = G.CentreOfMass();
79 BRepBuilderAPI_FindPlane fndPlane (theBndWire, Precision::Confusion());
81 aPln = fndPlane.Plane()->Pln();
83 aPln = gp_Pln(aCPnt, gp::OZ().Direction());
84 BRepBuilderAPI_MakeFace aMkFace(aPln, theBndWire);
85 if(aMkFace.IsDone()) {
86 outFace = aMkFace.Face();
87 if(!outFace.IsNull()) {
88 #ifdef DEB_SPLIT_TO_ZONES
89 // BRepTools::Write(limFace,"FL.brep");
94 return Standard_False;
96 //======================================================================================
98 void HYDROData_SplitToZonesTool::SetFileNames(const QString& theNameBefore, const QString& theNameAfter)
100 #ifdef DEB_SPLIT_TO_ZONES_CHECK_PARTITION
101 if(!theNameBefore.isNull() && !theNameBefore.isEmpty())
103 TCollection_AsciiString aName (theNameBefore.toStdString().data());
104 fileNameBefore = aName;
106 if(!theNameAfter.isNull() && !theNameAfter.isEmpty())
108 TCollection_AsciiString aName (theNameAfter.toStdString().data());
109 HYDROData_Transform::SetFileName (aName);
113 //======================================================================================
114 Standard_Integer HYDROData_SplitToZonesTool::SplitFaces(const TopoDS_Compound& theComp,
115 HYDROData_Transform& theTool)
118 theTool.SetArgument(theComp);
120 const Standard_Boolean bToTransform = theTool.ToTransform();
121 theTool.SetToTransform(bToTransform);
123 Standard_Integer anErr = theTool.ErrorStatus();
127 //======================================================================================
128 HYDROData_SplitToZonesTool::SplitDataList
129 HYDROData_SplitToZonesTool::Split( const HYDROData_SequenceOfObjects& theObjectList,
130 const HYDROData_SequenceOfObjects& theGroupsList,
131 const Handle(HYDROData_PolylineXY)& thePolyline )
133 SplitDataList anOutputSplitDataList;
134 if(theObjectList.IsEmpty()) return anOutputSplitDataList;
136 // Collect the object shapes to split. InputDataList will contain elements which will hold shape & name_of_shape.
137 SplitDataList anInputSplitDataList;
138 #ifdef DEB_SPLIT_TO_ZONES
139 TCollection_AsciiString aNam("Faces_");
141 for( int anIndex = 1, aLength = theObjectList.Length(); anIndex <= aLength; anIndex++ )
143 Handle(HYDROData_Entity) anObj = theObjectList.Value( anIndex );
146 Handle(HYDROData_Object) aGeomObj = Handle(HYDROData_Object)::DownCast( anObj );
147 if( !aGeomObj.IsNull() ) {
148 aShape = aGeomObj->GetTopShape();
150 Handle(HYDROData_LandCover) aLandCoverObj = Handle(HYDROData_LandCover)::DownCast( anObj );
151 if ( !aLandCoverObj.IsNull() ) {
152 aShape = aLandCoverObj->GetShape();
156 if ( aShape.IsNull() )
158 #ifdef DEB_SPLIT_TO_ZONES
159 TCollection_AsciiString aName = aNam + anIndex + ".brep";
160 BRepTools::Write(aShape, aName.ToCString());
162 if ( aShape.ShapeType() == TopAbs_COMPOUND ) {
163 // Create split data for each face contained in the compound
164 TopExp_Explorer anExp( aShape, TopAbs_FACE );
165 for ( ; anExp.More(); anExp.Next() ) {
166 const TopoDS_Face& aFace = TopoDS::Face( anExp.Current() );
167 if ( !aFace.IsNull() ) {
168 SplitData aSplitData( SplitData::Data_Zone, aFace, anObj->GetName() );
169 anInputSplitDataList.append( aSplitData );
173 SplitData aSplitData( SplitData::Data_Zone, aShape, anObj->GetName() );
174 anInputSplitDataList.append( aSplitData );
178 SplitDataList anInputGroupList;
179 for( int anIndex = 1, aLength = theGroupsList.Length(); anIndex <=aLength; anIndex++ )
181 Handle(HYDROData_ShapesGroup) aGeomGroup =
182 Handle(HYDROData_ShapesGroup)::DownCast( theGroupsList.Value( anIndex ) );
183 if( aGeomGroup.IsNull() )
186 TopTools_SequenceOfShape aGroupShapes;
187 aGeomGroup->GetShapes( aGroupShapes );
188 for( int i = 1, aNbShapes = aGroupShapes.Length(); i <= aNbShapes; i++ ) {
189 const TopoDS_Shape& aGroupShape = aGroupShapes.Value( i );
190 if ( aGroupShape.IsNull() )
193 if ( aGroupShape.ShapeType() == TopAbs_COMPOUND ) {
194 TopExp_Explorer anExp( aGroupShape, TopAbs_EDGE );
195 for ( ; anExp.More(); anExp.Next() ) {
196 const TopoDS_Edge& anEdge = TopoDS::Edge( anExp.Current() );
197 if ( !anEdge.IsNull() ) {
198 SplitData aSplitData( SplitData::Data_Edge, anEdge, aGeomGroup->GetName() );
199 anInputGroupList.append( aSplitData );
203 SplitData aSplitData( SplitData::Data_Edge, aGroupShape, aGeomGroup->GetName() );
204 anInputGroupList.append( aSplitData );
205 #ifdef DEB_SPLIT_TO_ZONES
206 QString aStr = aSplitData.ObjectNames.join(" ");
207 cout << "Group# = " <<anIndex <<" Nmb in grp = " << i<< " Names = "<<aStr.toStdString() << " size = " <<aSplitData.ObjectNames.size() <<endl;
212 // If only one shape is given we don't split it
213 // algorithm just returns the unpacked input data
214 bool limplus1Object(false);
215 if(theObjectList.Size() == 1 ) {
216 if(thePolyline.IsNull()) {
217 anOutputSplitDataList.append(anInputSplitDataList);
218 if(!theGroupsList.IsEmpty() )
219 anOutputSplitDataList.append(anInputGroupList);
220 return anOutputSplitDataList;
222 limplus1Object = true;// size =1 && hasLimits
224 HYDROData_DataMapOfShapeListOfString aDM3;
225 if(!anInputGroupList.isEmpty()) {// Old edge ==> List_Of_Names
226 QStringList aListOfNames;
227 for (int i=0;i < anInputGroupList.size() ;i++) {
228 const TopoDS_Shape& aSh = anInputGroupList.at(i).Shape;
229 aDM3.Add(aSh, anInputGroupList.at(i).ObjectNames);
233 // Step 1. Prepare Partition structures.
234 TopoDS_Shape aResult;
235 BOPCol_ListOfShape aLS;
236 QStringList aListOfNames;
237 TopoDS_Compound aCmp;
239 aBB.MakeCompound(aCmp);
240 for (int i=0;i < anInputSplitDataList.size() ;i++) {
241 const TopoDS_Shape& aSh = anInputSplitDataList.at(i).Shape;
242 aDM3.Add(aSh, anInputSplitDataList.at(i).ObjectNames);
245 #ifdef DEB_SPLIT_TO_ZONES
246 //TCollection_AsciiString aName = aNam + i + ".brep";
247 //BRepTools::Write(aSh, aName.ToCString());
250 #ifdef DEB_SPLIT_TO_ZONES_CHECK_PARTITION
251 TCollection_AsciiString aNameBefore = fileNameBefore + ".brep";
252 BRepTools::Write(aCmp, aNameBefore.ToCString());
255 HYDROData_DataMapOfShapeListOfShape aDM1;
256 if(anInputSplitDataList.size() > 1) {
257 HYDROData_Transform splitTool;
258 const Standard_Integer anErr = SplitFaces(aCmp, splitTool);
260 return anOutputSplitDataList;
261 aResult = splitTool.Shape();
262 if (aResult.IsNull())
263 return anOutputSplitDataList;
264 BRepCheck_Analyzer aCheck (aResult);
265 if(!aCheck.IsValid()) {
266 #ifdef DEB_SPLIT_TO_ZONES
267 cout << "result is not valid" <<endl;
268 BRepTools::Write(aResult, "SplitFacesNV.brep");
270 return anOutputSplitDataList;
272 #ifdef DEB_SPLIT_TO_ZONES
273 BRepTools::Write(aResult, "SplitFacesV.brep");
276 // Step 3. Collect history
277 //HYDROData_DataMapOfShapeListOfShape aDM1;
278 BOPCol_ListIteratorOfListOfShape anIt(aLS);
279 #ifdef DEB_SPLIT_TO_ZONES
280 TCollection_AsciiString aNamM ("EdgM_");
281 TCollection_AsciiString aNamG ("EdgG_");
283 for (int i =1;anIt.More();anIt.Next(),i++) {
284 Standard_Boolean foundF(Standard_False);
285 const TopTools_ListOfShape& aListOfNew = splitTool.Modified(anIt.Value());
286 if(!aListOfNew.IsEmpty())
287 foundF = Standard_True;
289 TopTools_ListOfShape aList;
291 TopTools_ListIteratorOfListOfShape it(aListOfNew);
292 for(;it.More();it.Next())
293 aList.Append(it.Value());
294 /* *********************************************************************
295 // Bug in History: partition should give only modified entities! => temporary solution is used
296 //const TopTools_ListOfShape& aListOfGen = splitTool.Generated(anIt.Value());
297 //if(!aListOfGen.IsEmpty())
298 //foundF = Standard_True;
299 //it.Initialize(aListOfGen);
300 //for(;it.More();it.Next())
301 // aList.Append(it.Value());
302 ********************************************************************* */
303 if(!foundF) // face is not modified
304 aList.Append (anIt.Value());
305 aDM1.Add(anIt.Value(), aList);
306 #ifdef DEB_SPLIT_TO_ZONES
307 TCollection_AsciiString aName;
309 if(!anInputGroupList.isEmpty() ) { // 1
310 TopExp_Explorer exp (anIt.Value(), TopAbs_EDGE);
311 for (int j =1;exp.More();exp.Next(),j++) {
313 Standard_Boolean foundE(Standard_False);
314 const TopTools_ListOfShape& aListM = splitTool.Modified(exp.Current());
315 //cout << "NB_EDGE_M = " << aListM.Extent() <<endl;
316 if(aListM.Extent()) foundE = Standard_True;
317 it.Initialize(aListM);
318 for(int k=1;it.More();it.Next(),k++) {
319 aList.Append(it.Value());
320 #ifdef DEB_SPLIT_TO_ZONES
321 //aName = aNamM + i + j +k +".brep";
322 //BRepTools::Write(it.Value(),aName.ToCString());
325 /* *********************************************************************
326 //const TopTools_ListOfShape& aListG = splitTool.Generated(exp.Current());
327 //if(aListG.Extent()) foundE = Standard_True;
328 //it.Initialize(aListG);
329 //for(int k=1;it.More();it.Next(),k++)
330 //aList.Append(it.Value());
331 //cout << "NB_EDGE = " << aList.Extent() <<endl;
332 ************************************************************************** */
334 aList.Append (exp.Current());
335 #ifdef DEB_SPLIT_TO_ZONES
336 aName = aNamG + i + j +".brep";
337 BRepTools::Write(exp.Current(),aName.ToCString());
338 cout << aName.ToCString()<< " = " << exp.Current().TShape() <<endl;
341 aDM1.Add(exp.Current(), aList);
346 aResult = anInputSplitDataList.at(0).Shape; // get single input shape
349 // aDM2: NewShape ==> ListOfOldShapes
350 HYDROData_DataMapOfShapeListOfShape aDM2;
351 // make limiting face
352 HYDROData_DataMapOfShapeListOfShape aDM4;
353 Standard_Boolean hasLimits(Standard_False);
355 HYDROData_MapOfShape aBndView;
356 if (! thePolyline.IsNull()) {
357 const TopoDS_Wire aBndWire = TopoDS::Wire(thePolyline->GetShape());
358 if(!aBndWire.IsNull()) {
360 if(buildLimFace(aBndWire, limFace)) {
361 TopoDS_Shape aComResult;
362 BRepAlgoAPI_Common mkCom(aResult, limFace);
364 aComResult = mkCom.Shape();
365 BRepCheck_Analyzer aCheck (aComResult);
366 if(aCheck.IsValid()) {
367 #ifdef DEB_SPLIT_TO_ZONES
368 BRepTools::Write(aComResult,"CommonV.brep");
369 BRepTools::Write(limFace,"limFace.brep");
371 aBndName = thePolyline->GetName();
372 hasLimits = Standard_True; // DM2 should be filled here
373 TopExp_Explorer exp (limFace, TopAbs_EDGE);
374 for (int i =1;exp.More();exp.Next(),i++) {
375 const TopoDS_Shape& anEdge = exp.Current();
376 if(anEdge.IsNull()) continue;
377 aBndView.Add(anEdge);
378 QStringList aListOfNames;
379 aListOfNames.append(aBndName);
380 aDM3.Add(anEdge, aListOfNames);
381 TopTools_ListOfShape aList;
382 aList.Append(anEdge);
383 aDM1.Add(anEdge,aList);
385 HYDROData_MapOfShape aView;
386 exp.Init (aResult, TopAbs_FACE);
387 for (int i =1;exp.More();exp.Next(),i++) {
388 const TopoDS_Shape& aFace = exp.Current();
389 if(!aFace.IsNull()) {
390 const TopTools_ListOfShape& aListOfNew = mkCom.Modified(aFace);
391 //cout << "Modified: " << aListOfNew.Extent() <<endl;
392 if(!aListOfNew.IsEmpty()) {
393 aDM4.Add(aFace, aListOfNew);
394 #ifdef DEB_SPLIT_TO_ZONES
395 //TCollection_AsciiString aName = aNam + i + ".brep";
396 //BRepTools::Write(aListOfNew.Last(), aName.ToCString());
400 if(!mkCom.IsDeleted(aFace)) {
401 const TopTools_ListOfShape& aListOfGen = mkCom.Generated(aFace);
402 if(!aListOfGen.IsEmpty()) {
403 /* aDM4.Bind(aFace, aListOfGen); ??? */
404 #ifdef DEB_SPLIT_TO_ZONES
405 //TCollection_AsciiString aName = aNam + i + "g.brep";
406 //BRepTools::Write(aListOfGen.Last(), aName.ToCString());
410 TopTools_ListOfShape aList;
412 aDM4.Add(aFace, aList); //the same face - not modified
416 TopExp_Explorer exp2 (aFace, TopAbs_EDGE);
417 for (int j =1;exp2.More();exp2.Next(),j++) {
418 const TopoDS_Shape& anEdge = exp2.Current();
419 if(!anEdge.IsNull()) {
420 if(aView.Contains(anEdge)) continue;
422 const TopTools_ListOfShape& aListOfNewEd = mkCom.Modified(anEdge);
423 if(!aListOfNewEd.IsEmpty())
424 aDM4.Add(anEdge, aListOfNewEd);
426 if(!mkCom.IsDeleted(anEdge)) {
427 const TopTools_ListOfShape& aListOfGenEd = mkCom.Generated(anEdge);
428 if(!aListOfGenEd.IsEmpty()) {
429 /* aDM4.Bind(anEdge, aListOfGenEd); ???*/
431 TopTools_ListOfShape aList;
432 aList.Append(anEdge);
433 aDM4.Add(anEdge, aList);//the same edge - not modified
440 } //end DM4 filling (phase 1)
441 //cout << "DM4 Ext = " <<aDM4.Extent() <<endl;
442 // phase 2 (from tool)
443 #ifdef DEB_SPLIT_TO_ZONES
444 TCollection_AsciiString aNam("BndEd_");
446 TopExp_Explorer expt (limFace, TopAbs_EDGE);
447 for(int i =1;expt.More();expt.Next(),i++) {
448 const TopoDS_Shape& anEdge = expt.Current();
449 if(!anEdge.IsNull()) {
450 const TopTools_ListOfShape& aListOfNewEd = mkCom.Modified(anEdge);
451 #ifdef DEB_SPLIT_TO_ZONES
452 TopTools_ListIteratorOfListOfShape itl(aListOfNewEd);
453 for(int j=1;itl.More();itl.Next(),j++) {
454 TCollection_AsciiString aName = aNam + i + "_" + j + ".brep";
455 BRepTools::Write(itl.Value(), aName.ToCString());
456 cout <<aName.ToCString()<<" = "<< itl.Value().TShape() <<endl;
459 if(!aListOfNewEd.IsEmpty())
460 aDM4.Add(anEdge, aListOfNewEd);
462 if(!mkCom.IsDeleted(anEdge)) {
463 const TopTools_ListOfShape& aListOfGenEd = mkCom.Generated(anEdge);
464 if(!aListOfGenEd.IsEmpty()) {
465 /* aDM4.Bind(anEdge, aListOfGenEd); ??? */
467 TopTools_ListOfShape aList;
468 aList.Append(anEdge);
469 aDM4.Add(anEdge, aList);//the same edge - not modified
475 //cout << "DM4 Ext = " <<aDM4.Extent() <<endl;
477 // fill DM1 (old - new) and DM2 (new - old)
478 HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape mIt(aDM4);
479 for(;mIt.More();mIt.Next()) {
480 const TopoDS_Shape& aKey = mIt.Key();//old
481 TopTools_ListOfShape aList;
483 const TopTools_ListOfShape& aListOfNew = mIt.Value();
484 aDM1.Add(aKey, aListOfNew);
485 TopTools_ListIteratorOfListOfShape it(aListOfNew);
486 for(;it.More();it.Next()) {
487 if(!aDM2.Contains(it.Value()))
488 aDM2.Add(it.Value(), aList);
490 TopTools_ListOfShape& aList = aDM2.ChangeFromKey(it.Value());
496 HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape aMIt(aDM1);
497 //DM4 contains Old - New after common op. DM1: old - new after Split op.
498 for(;aMIt.More();aMIt.Next()) {
499 const TopoDS_Shape& aKey = aMIt.Key();
500 TopTools_ListOfShape aList;
502 const TopTools_ListOfShape& aListOfNew = aMIt.Value();
503 TopTools_ListIteratorOfListOfShape it(aListOfNew);
504 for(;it.More();it.Next()) {// iterate new: b1, b2, b3...
505 if(!aDM4.Contains(it.Value())) // bi - is deleted
506 continue; // go to the next bi
508 const TopTools_ListOfShape& aListOfNew4 = aDM4.FindFromKey(it.Value());
509 TopTools_ListIteratorOfListOfShape it4(aListOfNew4); // {c1, c2, c3,...}
510 for(;it4.More();it4.Next()) {
511 if(!aDM2.Contains(it4.Value()))
512 aDM2.Add(it4.Value(), aList);
514 TopTools_ListOfShape& aList = aDM2.ChangeFromKey(it4.Value());
523 hasLimits = Standard_False;
524 #ifdef DEB_SPLIT_TO_ZONES
525 BRepTools::Write(aComResult,"CommonNV.brep");
531 }// end limits processing
533 HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape aMIt(aDM1);
534 for(;aMIt.More();aMIt.Next()) {
535 const TopoDS_Shape& aKey = aMIt.Key();
536 TopTools_ListOfShape aList;
538 const TopTools_ListOfShape& aListOfNew = aMIt.Value();
539 TopTools_ListIteratorOfListOfShape it(aListOfNew);
540 for(;it.More();it.Next()) {
541 if(!aDM2.Contains(it.Value()))
542 aDM2.Add(it.Value(), aList);
544 TopTools_ListOfShape& aList = aDM2.ChangeFromKey(it.Value());
550 // Step 4. Fill output structure.
551 #ifdef DEB_SPLIT_TO_ZONES
552 TCollection_AsciiString aNam4 ("SC_");
554 HYDROData_DataMapIteratorOfDataMapOfShapeListOfShape aMIt(aDM2);
555 for(int i =1;aMIt.More();aMIt.Next(),i++) {
556 SplitData aDestSplitData;
557 const TopoDS_Shape& aKey = aMIt.Key(); //new
558 aDestSplitData.Shape = aKey;
559 if(aKey.ShapeType() == TopAbs_FACE)
560 aDestSplitData.Type = SplitData::Data_Zone;
562 aDestSplitData.Type = SplitData::Data_Edge;
563 #ifdef DEB_SPLIT_TO_ZONES
564 TCollection_AsciiString aName = aNam4 + i + ".brep";
565 BRepTools::Write(aKey,aName.ToCString());
569 QStringList aListOfNames; // names processing
570 const TopTools_ListOfShape& aListOfOld = aMIt.Value();
571 TopTools_ListIteratorOfListOfShape it(aListOfOld);
572 for(int j =1;it.More();it.Next(),j++) {
573 const TopoDS_Shape& aSh = it.Value(); //old
574 if(aDM3.Contains(aSh)) {
575 const QStringList& ObjectNames = aDM3.FindFromKey(aSh);
576 aListOfNames.append(ObjectNames);
577 #ifdef DEB_SPLIT_TO_ZONES
578 TCollection_AsciiString aName = aNam4 + i +"_" + j + ".brep";
579 BRepTools::Write(aSh ,aName.ToCString());
582 #ifdef DEB_SPLIT_TO_ZONES
583 TCollection_AsciiString aName = aNam4 +"__" + i +"_" + j + ".brep";
584 BRepTools::Write(aSh ,aName.ToCString());
585 cout <<aName.ToCString()<<" = "<< aSh.TShape() <<endl;
587 if(aBndView.Contains(aSh) && hasLimits) {
588 aListOfNames.append(aBndName);
589 #ifdef DEB_SPLIT_TO_ZONES
590 cout << " BndName = "<<aBndName.toStdString() <<endl;
596 aDestSplitData.ObjectNames = aListOfNames;
597 anOutputSplitDataList.append(aDestSplitData);
598 #ifdef DEB_SPLIT_TO_ZONES
599 QString aStr = aDestSplitData.ObjectNames.join(" ");
600 cout << "New# = " << i<< " Names = "<<aStr.toStdString() << " size = " <<aDestSplitData.ObjectNames.size() <<endl;
604 return anOutputSplitDataList;
607 HYDROData_SplitToZonesTool::SplitDataList
608 HYDROData_SplitToZonesTool::Split( const HYDROData_SequenceOfObjects& theObjectList )
610 HYDROData_SequenceOfObjects aGeomGroups;
611 Handle(HYDROData_PolylineXY) aPolyline;
613 return Split( theObjectList, aGeomGroups, aPolyline );