// Preparation.
// Collect the object shapes to split. InputDataList will contain elements which will hold shape & name_of_shape.
SplitDataList anInputSplitDataList;
+ //TCollection_AsciiString aNam("Faces_");
for( int anIndex = 1, aLength = theObjectList.Length(); anIndex <= aLength; anIndex++ )
{
Handle(HYDROData_Object) aGeomObj =
TopoDS_Shape aShape = aGeomObj->GetTopShape();
if ( aShape.IsNull() )
continue;
+//TCollection_AsciiString aName = aNam + anIndex + ".brep";
+//BRepTools::Write(aShape, aName.ToCString());
if ( aShape.ShapeType() == TopAbs_COMPOUND ) {
// Create split data for each face contained in the compound
//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 = aBuilder->Modified(anIt.Value());
+ if(!aListOfNew.IsEmpty())
+ foundF = Standard_True;
TopTools_ListOfShape aList;
TopTools_ListIteratorOfListOfShape it(aListOfNew);
for(;it.More();it.Next())
aList.Append(it.Value());
// Bug in History: partition should give only modified entities! => temporary solution is used
const TopTools_ListOfShape& aListOfGen = aBuilder->Generated(anIt.Value());
+ if(!aListOfGen.IsEmpty())
+ foundF = Standard_True;
it.Initialize(aListOfGen);
for(;it.More();it.Next())
aList.Append(it.Value());
-
+ if(!foundF) // face is not modified
+ aList.Append (anIt.Value());
aDM1.Bind(anIt.Value(), aList);
//TCollection_AsciiString aName;
- if(!anInputGroupList.isEmpty() ) {
+ if(!anInputGroupList.isEmpty() ) { // 1
aList.Clear();
TopExp_Explorer exp (anIt.Value(), TopAbs_EDGE);
for (int j =1;exp.More();exp.Next(),j++) {
+ Standard_Boolean foundE(Standard_False);
const TopTools_ListOfShape& aListM = aBuilder->Modified(exp.Current());
//cout << "NB_EDGE_M = " << aListM.Extent() <<endl;
+ if(aListM.Extent()) foundE = Standard_True;
it.Initialize(aListM);
for(int k=1;it.More();it.Next(),k++) {
aList.Append(it.Value());
//BRepTools::Write(it.Value(),aName.ToCString());
}
const TopTools_ListOfShape& aListG = aBuilder->Generated(exp.Current());
+ if(aListG.Extent()) foundE = Standard_True;
it.Initialize(aListG);
for(int k=1;it.More();it.Next(),k++) {
aList.Append(it.Value());
//BRepTools::Write(it.Value(),aName.ToCString());
}
//cout << "NB_EDGE = " << aList.Extent() <<endl;
+ if(!foundE) //{
+ aList.Append (exp.Current());
+ //aName = aNamG + i + j +".brep";
+ //BRepTools::Write(exp.Current(),aName.ToCString());
+ //}
aDM1.Bind(exp.Current(), aList);
}
}