return 0;
}
-static Standard_Integer OCC280 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
- Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
- if(aContext.IsNull())
- {
- di << "use 'vinit' command before " << argv[0] << "\n";
- return -1;
- }
- if ( argc != 3) {
- di << "ERROR : Usage : " << argv[0] << " hlr=0/1 setsurfecedetail=0/1; set perspecrive view\n";
- return 1;
- }
-
- Standard_Integer HLR = Draw::Atoi(argv[1]);
- if (HLR != 0) {
- HLR = 1;
- }
-
- TCollection_AsciiString anOldName = ViewerTest::GetCurrentViewName();
- Handle(V3d_Viewer) aViewer = ViewerTest::GetViewerFromContext();
- aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
- Handle(Aspect_Window) asp = ViewerTest::CurrentView()->Window();
- Handle(V3d_View) aNewView = aViewer->CreateView();
- ViewerTest::CurrentView (aNewView);
- TCollection_AsciiString aNewName=anOldName + "_new";
- ViewerTest::InitViewName(aNewName,ViewerTest::CurrentView());
- aNewView->SetWindow (asp);
- if (!asp->IsMapped()) asp->Map();
- aNewView->Redraw();
- ViewerTest::RemoveView(anOldName,false);
- ViewerTest::UnsetEventManager();
- ViewerTest::SetEventManager (new ViewerTest_EventManager (aNewView, ViewerTest::GetAISContext()));
-
- if (HLR == 1)
- {
- di << "HLR\n";
- ViewerTest::CurrentView()->SetComputedMode (Standard_True);
- }
-
- return 0;
-}
-
static Standard_Integer OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv)
{
Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
theCommands.Add ("BUC60915", "BUC60915", __FILE__, BUC60915_1, group);
theCommands.Add ("OCC138", "OCC138", __FILE__, OCC138, group);
theCommands.Add ("OCC353","OCC353",__FILE__,OCC353,group);
- theCommands.Add ("OCC280","OCC280 hlr=0/1 setsurfecedetail=0/1; set perspecrive view",__FILE__,OCC280,group);
theCommands.Add ("OCC138LC", "OCC138LC", __FILE__, OCC138LC, group);
theCommands.Add ("OCC566", "OCC566 shape [ xmin ymin zmin xmax ymax zmax] ; print bounding box", __FILE__, OCC566, group);
theCommands.Add ("OCC570", "OCC570 result", __FILE__, OCC570, group);
+++ /dev/null
-puts "========"
-puts "OCC280"
-puts "2. Highlighting the object, by moving mouse cursor on it does not highlight the object"
-puts "========"
-
-vinit
-box b 100 900 300
-vdisplay b
-
-OCC280 0 0
-
-# selected point
-set x_coord 22
-set y_coord 241
-
-vfit
-
-# There is not selection
-puts "There is not selection"
-
-checkcolor $x_coord $y_coord 1 1 0
-
-# Move a mouse
-puts "Move a mouse"
-vmoveto $x_coord $y_coord
-
-# There is a selection
-puts "There is a selection"
-
-checkcolor $x_coord $y_coord 0 1 1
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-
+++ /dev/null
-puts "========"
-puts "OCC349"
-puts "========"
-puts ""
-puts "2. Fitall with hidden line removal algorithm works incorrect in the perspective view"
-
-vinit
-box b 100 900 300
-vdisplay b
-
-OCC280 1 1
-
-vfit
-
-set yellow_coords {{135 119} {387 33} {172 144} {28 190} {212 272} {60 343} {26 255} {389 113} {60 276}}
-
-set black_coords {{160 257} {365 150} {353 99}}
-
-#
-# ___________2________________
-# /| /|
-# / | / |
-# / | / |
-# / | / |
-# / | / |
-# 1 | 3 |
-# / | / |
-# / | / |
-# / | / |
-# / | / |
-# ----------------4------------ |
-# | | | |
-# | | | |
-# | | | |
-# | 10 | 11
-# | | | |
-# | | | |
-# | | | |
-# | | | |
-# | | | |
-# 9 | 12 |
-# | |___________6____|__________|
-# | / | /
-# | / | /
-# | / | /
-# | / | /
-# | 5 | /
-# | / | 7
-# | / | /
-# | / | /
-# | / | /
-# |/ |/
-# |--------------8------------|
-#
-#
-
-vaspects -setwidth 5
-
-foreach i $yellow_coords {
- if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "YELLOW" } {
- puts "Error : ${i} is not yellow"
- }
-}
-
-foreach i $black_coords {
- if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "BLACK" } {
- puts "Error : ${i} is not black"
- }
-}
-
-checkview -screenshot -3d -path ${imagedir}/${test_image}.png