- if( theShape.ShapeType()==TopAbs_SHELL )
- {
- TopoDS_Iterator anIt( theShape );
- for( ; anIt.More(); anIt.Next(), i++ )
- show( anIt.Value(), theMode, false, GetColor(i) );
- }
- else
- show( theShape, theMode, false, GetColor(0) );
+ //show all faces first
+ TopExp_Explorer aFE( theShape, TopAbs_FACE );
+ for( ; aFE.More(); aFE.Next(), i++ )
+ show( aFE.Current(), theMode, false, GetColor(i) );
+
+ //show all independent wires
+ TopExp_Explorer aWE( theShape, TopAbs_WIRE, TopAbs_FACE );
+ for( ; aWE.More(); aWE.Next(), i++ )
+ show( aWE.Current(), theMode, false, GetColor(i) );
+
+ //show all independent edges
+ TopExp_Explorer anEE( theShape, TopAbs_EDGE, TopAbs_WIRE );
+ for( ; anEE.More(); anEE.Next(), i++ )
+ show( anEE.Current(), theMode, false, GetColor(i) );