#include <QHash>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
+#include <Prs3d_IsoAspect.hxx>
#include <GEOMUtils.hxx>
#include <TopTools_ListOfShape.hxx>
}
}
-void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor )
+void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor,
+ int theUIANb, int theVIANb)
{
Handle(AIS_Shape) aShape = new AIS_Shape( theShape );
if( theShape.ShapeType()==TopAbs_VERTEX )
aShape->Attributes()->PointAspect()->SetTypeOfMarker( Aspect_TOM_X );
+ if (theShape.ShapeType()==TopAbs_FACE)
+ {
+ context()->DefaultDrawer()->UIsoAspect()->SetNumber(theUIANb);
+ context()->DefaultDrawer()->VIsoAspect()->SetNumber(theVIANb);
+ Handle_Prs3d_Drawer aDrawer = aShape->Attributes();
+ aDrawer->UIsoAspect()->SetNumber(theUIANb);
+ aDrawer->VIsoAspect()->SetNumber(theVIANb);
+ }
aShape->SetMaterial( Graphic3d_NOM_PLASTIC );
aShape->SetColor( HYDROData_Tool::toOccColor( theColor ) );
context()->Display( aShape, theMode, 0, Standard_False );
viewWindow()->onFitAll();
}
}
-
-void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey )
+void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey,
+ int theUIANb, int theVIANb)
{
QString aNewKey = theKey;
if( !aNewKey.isEmpty() )
GEOMUtils::SortShapes(aListOfFaces);
TopTools_ListIteratorOfListOfShape aLF(aListOfFaces);
for( ; aLF.More(); aLF.Next(), i++)
- show( aLF.Value(), theMode, false, GetColor(i) );
+ show( aLF.Value(), theMode, false, GetColor(i), theUIANb, theVIANb );
//show all independent wires
TopTools_ListOfShape aListOfWires;
int theLinesToOmit,
QString& theMsg )
{
- QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
+ QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
anExpectedRefFilePath += "/" + theBaseName;
QString anActualFilePath = QDir::tempPath() + "/" + theBaseName;
static void eraseAll( bool isUpdate );
static void show( const Handle_AIS_InteractiveObject& theObject,
int theMode, int theSelectionMode, bool isFitAll, const char* theKey );
- static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor );
- static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey );
+ static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor,
+ int theUIANb = 10, int theVIANb = 10);
+ static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey,
+ int theUIANb = 10, int theVIANb = 10);
static bool AssertImages( QString& theMessage, const QImage* = 0, const char* theCase = 0 );
static QColor GetColor(int i);
TopTools_IndexedDataMapOfShapeShape ls;
HYDROData_SplitToZonesTool::CutByEdges(InF, Wires, OutSh, &ls, NULL);
CPPUNIT_ASSERT_EQUAL(1, OutSh.Extent());
- TestViewer::show( OutSh.First(), AIS_WireFrame, true, "cc_int_w_3" );
+ TestViewer::show( OutSh.First(), AIS_WireFrame, true, "cc_int_w_3", 1, 1 );
CPPUNIT_ASSERT_IMAGES
}