myShell = shell;
myShape = shell;
Standard_Integer aNumMultShell =0;
- for (TopoDS_Iterator iter(shell); iter.More(); iter.Next())
- Lface.Append(iter.Value());
+ Standard_Integer nbF = 0;
+ TopTools_MapOfShape aMapAdded;
+ for (TopoDS_Iterator iter(shell); iter.More(); iter.Next(),nbF++)
+ {
+ if(aMapAdded.Add(iter.Value()))
+ Lface.Append(iter.Value());
+ }
+ if(Lface.Length() < nbF)
+ done = Standard_True;
+
TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
TopExp::MapShapesAndAncestors(myShell,TopAbs_EDGE,TopAbs_FACE,aMapEdgeFaces);
TopTools_MapOfShape aMapMultiConnectEdges;
BRep_Builder aB;
aB.MakeCompSolid(aCompSolid);
isDone = (aShape.ShapeType() != TopAbs_COMPSOLID || isDone);
+ Standard_Integer nbSol = 0;
+
for(TopTools_ListIteratorOfListOfShape lItSh(lshells);lItSh.More(); lItSh.Next()) {
if(ShellSolid.Contains(lItSh.Value())) {
- for(TopExp_Explorer aExpSol(ShellSolid.FindFromKey(lItSh.Value()),TopAbs_SOLID);aExpSol.More(); aExpSol.Next())
+ const TopoDS_Shape& aShape = ShellSolid.FindFromKey(lItSh.Value());
+ TopExp_Explorer aExpSol(aShape, TopAbs_SOLID);
+
+ for(;aExpSol.More(); aExpSol.Next())
+ {
aB.Add(aCompSolid,aExpSol.Current());
- ShellSolid.ChangeFromKey(lItSh.Value()) = aCompSolid;
+ nbSol++;
+ }
+
}
}
+ if(nbSol >1)
+ {
+ for(TopTools_ListIteratorOfListOfShape lItSh1(lshells);lItSh1.More(); lItSh1.Next())
+ {
+ if(ShellSolid.Contains(lItSh1.Value()))
+ ShellSolid.ChangeFromKey(lItSh1.Value()) = aCompSolid;
+ }
+ }
+
}
for(Standard_Integer kk =1 ; kk <= ShellSolid.Extent();kk++)
if(!aMapSolids.Contains(ShellSolid.FindFromIndex(kk)))
mySolid = TopoDS::Solid(tmpShape);
}
else {
+ status = Standard_True;
+ myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
TopoDS_Iterator aIt(tmpShape,Standard_False);
Context()->Replace(tmpShape,aIt.Value());
SendFail (Message_Msg ("FixAdvSolid.FixShell.MSG10")); // Solid can not be created from open shell.
--- /dev/null
+puts "========"
+puts "OCC26408"
+puts "========"
+puts ""
+#######################################
+# Exception during fixshape procedure
+#######################################
+
+restore [locate_data_file OCC26408-shape_1.brep] a
+fixshape r a 1.e-7 1.