// Step 3. Collect history
//HYDROData_DataMapOfShapeListOfShape aDM1;
BOPCol_ListIteratorOfListOfShape anIt(aLS);
- //TCollection_AsciiString aNamM ("EdgM_");
- //TCollection_AsciiString aNamG ("EdgG_");
+ TCollection_AsciiString aNamM ("EdgM_");
+ TCollection_AsciiString aNamG ("EdgG_");
for (int i =1;anIt.More();anIt.Next(),i++) {
Standard_Boolean foundF(Standard_False);
const TopTools_ListOfShape& aListOfNew = splitTool.Modified(anIt.Value());
if(aCheck.IsValid()) {
#ifdef DEB_SPLIT_TO_ZONES
BRepTools::Write(aComResult,"CommonV.brep");
+ BRepTools::Write(limFace,"limFace.brep");
#endif
aBndName = thePolyline->GetName();
hasLimits = Standard_True; // DM2 should be filled here
const TopoDS_Shape& anEdge = exp.Current();
if(anEdge.IsNull()) continue;
aBndView.Add(anEdge);
+ QStringList aListOfNames;
+ aListOfNames.append(aBndName);
+ aDM3.Bind(anEdge, aListOfNames);
+ TopTools_ListOfShape aList;
+ aList.Append(anEdge);
+ aDM1.Bind(anEdge,aList);
}
HYDROData_MapOfShape aView;
exp.Init (aResult, TopAbs_FACE);
}
}
}
- } //end DM4 filling (phase 1)
+ } //end DM4 filling (phase 1)
//cout << "DM4 Ext = " <<aDM4.Extent() <<endl;
// phase 2 (from tool)
+#ifdef DEB_SPLIT_TO_ZONES
+ TCollection_AsciiString aNam("BEd_");
+#endif
TopExp_Explorer expt (limFace, TopAbs_EDGE);
- for(;expt.More();expt.Next()) {
+ for(int i =1;expt.More();expt.Next(),i++) {
const TopoDS_Shape& anEdge = expt.Current();
if(!anEdge.IsNull()) {
- const TopTools_ListOfShape& aListOfNewEd = mkCom.Modified(anEdge);
+ const TopTools_ListOfShape& aListOfNewEd = mkCom.Modified(anEdge);
+#ifdef DEB_SPLIT_TO_ZONES
+ TopTools_ListIteratorOfListOfShape itl(aListOfNewEd);
+ for(int j=1;itl.More();itl.Next(),j++) {
+ TCollection_AsciiString aName = aNam + i + "_" + j + ".brep";
+ BRepTools::Write(itl.Value(), aName.ToCString());
+ cout <<aName.ToCString()<<" = "<< itl.Value().TShape() <<endl;
+ }
+#endif
if(!aListOfNewEd.IsEmpty())
aDM4.Bind(anEdge, aListOfNewEd);
else {
if(!aDM4.IsBound(it.Value())) // bi - is deleted
continue; // go to the next bi
else {
+ //cout <<"DM4_Key: TShape = " <<it.Value().TShape() <<endl;
const TopTools_ListOfShape& aListOfNew4 = aDM4.Find(it.Value());
TopTools_ListIteratorOfListOfShape it4(aListOfNew4); // {c1, c2, c3,...}
for(;it4.More();it4.Next()) {
+ //cout <<"DM4_Value: TShape = " <<it4.Value().TShape() <<endl;
if(!aDM2.IsBound(it4.Value()))
aDM2.Bind(it4.Value(), aList);
else {
}
}
}
- }
+ }//###
}
} else {
hasLimits = Standard_False;
BRepTools::Write(aSh ,aName.ToCString());
#endif
} else {
+#ifdef DEB_SPLIT_TO_ZONES
+ TCollection_AsciiString aName = aNam4 +"__" + i +"_" + j + ".brep";
+ BRepTools::Write(aSh ,aName.ToCString());
+ cout <<aName.ToCString()<<" = "<< aSh.TShape() <<endl;
+#endif
if(aBndView.Contains(aSh) && hasLimits) {
aListOfNames.append(aBndName);
#ifdef DEB_SPLIT_TO_ZONES