return;
int i = 0;
- if( theShape.ShapeType()==TopAbs_COMPOUND )
- {
- TopExp_Explorer anExplorer( theShape, TopAbs_FACE );
- for( ; anExplorer.More(); anExplorer.Next() )
- ShowShape (anExplorer.Current(), theMode, i);
- }
- else
- ShowShape(theShape, theMode, i);
+ //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) );
if( isFitAll )
{
}
}
-void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i)
+/*void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i)
{
if( theShape.ShapeType()==TopAbs_SHELL )
{
show( theShape, theMode, false, GetColor(i) );
i++;
}
-}
+}*/
bool AreImagesEqual( const QImage& theImage1, const QImage& theImage2, double theTolerance )
{
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_12" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_13" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_22" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_23" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_12" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_13" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_14" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
//
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_22" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_23" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
{
TopTools_ListOfShape Faces;
TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_24" );
CPPUNIT_ASSERT_IMAGES
- CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+ CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
}
}