mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0025777: the standard views are defined incorrectly and mismatch the old display.
Old vright equals new vfront, old vfront equals new vright, old vleft equals new vback, old vback equals new vleft.
This commit is contained in:
parent
9966161704
commit
27af30526d
@ -16,7 +16,7 @@ box b 1 1 1
|
||||
explode b FACE
|
||||
vdisplay b_1 b_2 b_3 b_5 b_6
|
||||
|
||||
vright
|
||||
vfront
|
||||
vfit
|
||||
|
||||
vsetmaterial b_1 plastic
|
||||
|
@ -105,19 +105,19 @@ proc axo {} {
|
||||
view 1 AXON 465 20 800 800
|
||||
# }
|
||||
}
|
||||
help axo ", One axonometric view" "DRAW Graphic Commands"
|
||||
help axo ", One axonometric view. Orientation +X-Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc haxo {} {
|
||||
delete
|
||||
view 1 AXON 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help haxo ", One axonometric horizontal view" "DRAW Graphic Commands"
|
||||
help haxo ", One axonometric horizontal view. Orientation +X-Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc vaxo {} {
|
||||
delete
|
||||
view 1 AXON 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vaxo ", One axonometric vertical view" "DRAW Graphic Commands"
|
||||
help vaxo ", One axonometric vertical view. Orientation +X-Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc pers {} {
|
||||
delete
|
||||
@ -141,109 +141,109 @@ proc front {} {
|
||||
delete
|
||||
view 1 +X+Z 465 20 800 800
|
||||
}
|
||||
help front ", One front view" "DRAW Graphic Commands"
|
||||
help front ", One front view. Orientation +X+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc hfront {} {
|
||||
delete
|
||||
view 1 +X+Z 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help hfront ", One front horizontal view" "DRAW Graphic Commands"
|
||||
help hfront ", One front horizontal view. Orientation +X+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc vfront {} {
|
||||
delete
|
||||
view 1 +X+Z 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vfront ", One front vertical view" "DRAW Graphic Commands"
|
||||
help vfront ", One front vertical view. Orientation +X+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc top {} {
|
||||
delete
|
||||
view 1 +X+Y 465 20 800 800
|
||||
}
|
||||
help top ", One top view" "DRAW Graphic Commands"
|
||||
help top ", One top view. Orientation +X+Y" "DRAW Graphic Commands"
|
||||
|
||||
proc htop {} {
|
||||
delete
|
||||
view 1 +X+Y 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help htop ", One top horizontal view" "DRAW Graphic Commands"
|
||||
help htop ", One top horizontal view. Orientation +X+Y" "DRAW Graphic Commands"
|
||||
|
||||
proc vtop {} {
|
||||
delete
|
||||
view 1 +X+Y 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vtop ", One top vertical view" "DRAW Graphic Commands"
|
||||
help vtop ", One top vertical view. Orientation +X+Y" "DRAW Graphic Commands"
|
||||
|
||||
proc left {} {
|
||||
delete
|
||||
view 1 -Y+Z 465 20 800 800
|
||||
}
|
||||
help left ", One left view" "DRAW Graphic Commands"
|
||||
help left ", One left view. Orientation -Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc hleft {} {
|
||||
delete
|
||||
view 1 -Y+Z 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help hleft ", One left horizontal view" "DRAW Graphic Commands"
|
||||
help hleft ", One left horizontal view. Orientation -Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc vleft {} {
|
||||
delete
|
||||
view 1 -Y+Z 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vleft ", One left vertical view" "DRAW Graphic Commands"
|
||||
help vleft ", One left vertical view. Orientation -Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc back {} {
|
||||
delete
|
||||
view 1 -X+Z 465 20 800 800
|
||||
}
|
||||
help back ", One back view" "DRAW Graphic Commands"
|
||||
help back ", One back view. Orientation -X+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc hback {} {
|
||||
delete
|
||||
view 1 -X+Z 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help hback ", One back horizontal view" "DRAW Graphic Commands"
|
||||
help hback ", One back horizontal view. Orientation -X+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc vback {} {
|
||||
delete
|
||||
view 1 -X+Z 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vback ", One back vertical view" "DRAW Graphic Commands"
|
||||
help vback ", One back vertical view. Orientation -X+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc right {} {
|
||||
delete
|
||||
view 1 +Y+Z 465 20 800 800
|
||||
}
|
||||
help right ", One right view" "DRAW Graphic Commands"
|
||||
help right ", One right view. Orientation +Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc hright {} {
|
||||
delete
|
||||
view 1 +Y+Z 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help hright ", One right horizontal view" "DRAW Graphic Commands"
|
||||
help hright ", One right horizontal view. Orientation +Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc vright {} {
|
||||
delete
|
||||
view 1 +Y+Z 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vright ", One right vertical view" "DRAW Graphic Commands"
|
||||
help vright ", One right vertical view. Orientation +Y+Z" "DRAW Graphic Commands"
|
||||
|
||||
proc bottom {} {
|
||||
delete
|
||||
view 1 +X-Z 465 20 800 800
|
||||
view 1 +X-Y 465 20 800 800
|
||||
}
|
||||
help bottom ", One bottom view" "DRAW Graphic Commands"
|
||||
help bottom ", One bottom view. Orientation +X-Y" "DRAW Graphic Commands"
|
||||
|
||||
proc hbottom {} {
|
||||
delete
|
||||
view 1 +X-Z 465 20 800 800*20.4/29.1
|
||||
view 1 +X-Y 465 20 800 800*20.4/29.1
|
||||
}
|
||||
help hbottom ", One bottom horizontal view" "DRAW Graphic Commands"
|
||||
help hbottom ", One bottom horizontal view. Orientation +X-Y" "DRAW Graphic Commands"
|
||||
|
||||
proc vbottom {} {
|
||||
delete
|
||||
view 1 +X-Z 705 20 800*20.4/29.1 800
|
||||
view 1 +X-Y 705 20 800*20.4/29.1 800
|
||||
}
|
||||
help vbottom ", One bottom vertical view" "DRAW Graphic Commands"
|
||||
help vbottom ", One bottom vertical view. Orientation +X-Y" "DRAW Graphic Commands"
|
||||
|
||||
proc v2d {} {
|
||||
delete
|
||||
|
@ -1804,7 +1804,7 @@ static int VBottom(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
|
||||
static int VLeft(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
{
|
||||
return ViewProject(di, V3d_Ypos);
|
||||
return ViewProject(di, V3d_Xneg);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@ -1815,7 +1815,7 @@ static int VLeft(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
|
||||
static int VRight(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
{
|
||||
return ViewProject(di, V3d_Yneg);
|
||||
return ViewProject(di, V3d_Xpos);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@ -1826,7 +1826,7 @@ static int VRight(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
|
||||
static int VFront(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
{
|
||||
return ViewProject(di, V3d_Xpos);
|
||||
return ViewProject(di, V3d_Yneg);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@ -1837,7 +1837,7 @@ static int VFront(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
|
||||
static int VBack(Draw_Interpretor& di, Standard_Integer , const char** )
|
||||
{
|
||||
return ViewProject(di, V3d_Xneg);
|
||||
return ViewProject(di, V3d_Ypos);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@ -8729,25 +8729,25 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
|
||||
"vhelp : display help on the viewer commands",
|
||||
__FILE__,VHelp,group);
|
||||
theCommands.Add("vtop" ,
|
||||
"vtop or <T> : Top view" ,
|
||||
"vtop or <T> : Top view. Orientation +X+Y" ,
|
||||
__FILE__,VTop,group);
|
||||
theCommands.Add("vbottom" ,
|
||||
"vbottom : Bottom view" ,
|
||||
"vbottom : Bottom view. Orientation +X-Y" ,
|
||||
__FILE__,VBottom,group);
|
||||
theCommands.Add("vleft" ,
|
||||
"vleft : Left view" ,
|
||||
"vleft : Left view. Orientation -Y+Z" ,
|
||||
__FILE__,VLeft,group);
|
||||
theCommands.Add("vright" ,
|
||||
"vright : Right view" ,
|
||||
"vright : Right view. Orientation +Y+Z" ,
|
||||
__FILE__,VRight,group);
|
||||
theCommands.Add("vaxo" ,
|
||||
" vaxo or <A> : Axonometric view ",
|
||||
" vaxo or <A> : Axonometric view. Orientation +X-Y+Z",
|
||||
__FILE__,VAxo,group);
|
||||
theCommands.Add("vfront" ,
|
||||
"vfront : Front view" ,
|
||||
"vfront : Front view. Orientation +X+Z" ,
|
||||
__FILE__,VFront,group);
|
||||
theCommands.Add("vback" ,
|
||||
"vback : Back view" ,
|
||||
"vback : Back view. Orientation -X+Z" ,
|
||||
__FILE__,VBack,group);
|
||||
theCommands.Add("vpick" ,
|
||||
"vpick : vpick X Y Z [shape subshape] ( all variables as string )",
|
||||
|
2
tests/3rdparty/fonts/B4
vendored
2
tests/3rdparty/fonts/B4
vendored
@ -5,7 +5,7 @@ puts "============"
|
||||
puts ""
|
||||
|
||||
vtrihedron trihedr
|
||||
vright
|
||||
vfront
|
||||
|
||||
vsetdispmode 1
|
||||
|
||||
|
2
tests/3rdparty/fonts/B5
vendored
2
tests/3rdparty/fonts/B5
vendored
@ -5,7 +5,7 @@ puts "============"
|
||||
puts ""
|
||||
|
||||
vtrihedron trihedr
|
||||
vright
|
||||
vfront
|
||||
|
||||
vsetdispmode 1
|
||||
|
||||
|
@ -11,7 +11,7 @@ restore [locate_data_file bug24842_10265.brep] b
|
||||
vinit
|
||||
vdisplay b
|
||||
|
||||
vback
|
||||
vleft
|
||||
|
||||
vfit
|
||||
vhlr on
|
||||
|
@ -11,7 +11,7 @@ restore [locate_data_file bug24842_10265.brep] b
|
||||
vinit
|
||||
vdisplay b
|
||||
|
||||
vfront
|
||||
vright
|
||||
|
||||
vfit
|
||||
vhlr on
|
||||
|
@ -11,7 +11,7 @@ restore [locate_data_file bug24842_10265.brep] b
|
||||
vinit
|
||||
vdisplay b
|
||||
|
||||
vleft
|
||||
vback
|
||||
|
||||
vfit
|
||||
vhlr on
|
||||
|
@ -11,7 +11,7 @@ restore [locate_data_file bug24842_10265.brep] b
|
||||
vinit
|
||||
vdisplay b
|
||||
|
||||
vright
|
||||
vfront
|
||||
|
||||
vfit
|
||||
vhlr on
|
||||
|
@ -9,7 +9,7 @@ puts ""
|
||||
restore [locate_data_file OCC25841_Curve_2.brep] a
|
||||
vinit
|
||||
vclear
|
||||
vfront
|
||||
vright
|
||||
vdisplay a
|
||||
vfit
|
||||
set only_screen 1
|
||||
|
@ -45,7 +45,7 @@ set y2 200
|
||||
checkcolor $x2 $y2 1 1 0.94
|
||||
|
||||
#####
|
||||
vleft
|
||||
vback
|
||||
#####
|
||||
|
||||
set x1 120
|
||||
@ -57,7 +57,7 @@ set y2 170
|
||||
checkcolor $x2 $y2 1 1 0.94
|
||||
|
||||
#####
|
||||
vright
|
||||
vfront
|
||||
#####
|
||||
|
||||
set x1 120
|
||||
@ -69,7 +69,7 @@ set y2 170
|
||||
checkcolor $x2 $y2 1 1 0.94
|
||||
|
||||
#####
|
||||
vfront
|
||||
vright
|
||||
#####
|
||||
|
||||
set x1 120
|
||||
@ -81,7 +81,7 @@ set y2 170
|
||||
checkcolor $x2 $y2 1 1 0.94
|
||||
|
||||
#####
|
||||
vback
|
||||
vleft
|
||||
#####
|
||||
|
||||
set x1 120
|
||||
|
@ -10,7 +10,7 @@ pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit
|
||||
vright
|
||||
vfront
|
||||
|
||||
set hpos "left hcenter right"
|
||||
set vpos "above vcenter below"
|
||||
@ -50,7 +50,7 @@ vfit
|
||||
# ------------------------------------------------
|
||||
|
||||
vinit Viewer2/View2
|
||||
vright
|
||||
vfront
|
||||
|
||||
set idx 0
|
||||
for {set r 0} {$r < 3} {incr r} {
|
||||
|
@ -10,7 +10,7 @@ pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit
|
||||
vright
|
||||
vfront
|
||||
|
||||
set hpos "left hcenter right"
|
||||
set vpos "above vcenter below"
|
||||
@ -54,7 +54,7 @@ vfit
|
||||
# ------------------------------------------------
|
||||
|
||||
vinit Viewer2/View2
|
||||
vright
|
||||
vfront
|
||||
|
||||
set idx 0
|
||||
for {set r 0} {$r < 3} {incr r} {
|
||||
|
@ -10,7 +10,7 @@ pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit
|
||||
vright
|
||||
vfront
|
||||
|
||||
set hpos "left hcenter"
|
||||
set vpos "above vcenter below"
|
||||
@ -53,7 +53,7 @@ vfit
|
||||
# ------------------------------------------------
|
||||
|
||||
vinit Viewer2/View2
|
||||
vright
|
||||
vfront
|
||||
|
||||
set idx 0
|
||||
for {set r 0} {$r < 3} {incr r} {
|
||||
|
@ -10,7 +10,7 @@ pload VISUALIZATION
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit
|
||||
vright
|
||||
vfront
|
||||
|
||||
set hpos "left hcenter right"
|
||||
set vpos "above vcenter below"
|
||||
@ -51,7 +51,7 @@ vfit
|
||||
# ------------------------------------------------
|
||||
|
||||
vinit Viewer2/View2
|
||||
vright
|
||||
vfront
|
||||
|
||||
set idx 0
|
||||
for {set r 0} {$r < 3} {incr r} {
|
||||
|
@ -14,7 +14,7 @@ vclear
|
||||
|
||||
box b 10 10 10
|
||||
vdisplay b
|
||||
vright
|
||||
vfront
|
||||
vfit
|
||||
|
||||
vviewparams -size 22
|
||||
|
@ -28,7 +28,7 @@ vsetmaterial wall3 pewter
|
||||
vsetcolor wall1 red
|
||||
vsetcolor wall2 green
|
||||
|
||||
vright
|
||||
vfront
|
||||
vturnview 0 -0.3 0
|
||||
vfit
|
||||
|
||||
|
@ -10,7 +10,7 @@ restore [locate_data_file bug25179_nurbs-with-partial-seam.brep] a
|
||||
|
||||
vinit
|
||||
vdisplay a
|
||||
vback
|
||||
vleft
|
||||
vfit
|
||||
|
||||
set only_screen 1
|
||||
|
@ -29,7 +29,7 @@ for {set x 0} {$x<7} {incr x} {
|
||||
vtop
|
||||
vcamera -persp
|
||||
vfit
|
||||
vback
|
||||
vleft
|
||||
vtop
|
||||
|
||||
#check rectagle selection
|
||||
|
114
tests/bugs/vis/bug25777
Normal file
114
tests/bugs/vis/bug25777
Normal file
@ -0,0 +1,114 @@
|
||||
puts "============"
|
||||
puts "OCC25777: Draw Harness, ViewerTest - make commands defining standard views to match their names"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
|
||||
box b0 -70 -70 -70 140 140 140
|
||||
|
||||
# Top View
|
||||
text2brep top Top -height 30 -aspect bold -halign center -valign center -pos 0 30 70 -plane 0 0 1 1 0 0 -composite on
|
||||
explode top Sh
|
||||
prism ptop top 0 0 -10
|
||||
|
||||
# Bottom View
|
||||
text2brep bottom Bottom -height 30 -aspect bold -halign center -valign center -pos 0 -30 -70 -plane 0 0 -1 1 0 0 -composite on
|
||||
explode bottom Sh
|
||||
prism pbottom bottom 0 0 10
|
||||
|
||||
# Front View
|
||||
text2brep front Front -height 30 -aspect bold -halign left -valign top -pos -70 -70 65 -plane 0 -1 0 1 0 0 -composite on
|
||||
explode front Sh
|
||||
prism pfront front 0 10 0
|
||||
|
||||
# Back View
|
||||
text2brep back Back -height 30 -aspect bold -halign left -valign bottom -pos 70 70 -60 -plane 0 1 0 -1 0 0 -composite on
|
||||
explode back Sh
|
||||
prism pback back 0 -10 0
|
||||
|
||||
# Right View
|
||||
text2brep right Right -height 30 -aspect bold -halign left -valign top -pos 70 -60 65 -plane 1 0 0 0 1 0 -composite on
|
||||
explode right Sh
|
||||
prism pright right -10 0 0
|
||||
|
||||
# Left View
|
||||
text2brep left Left -height 30 -aspect bold -halign left -valign bottom -pos -70 60 -60 -plane -1 0 0 0 -1 0 -composite on
|
||||
explode left Sh
|
||||
prism pleft left 10 0 0
|
||||
|
||||
# Cut operations
|
||||
bcut cutbox b0 ptop
|
||||
bcut cutbox cutbox pbottom
|
||||
bcut cutbox cutbox pfront
|
||||
bcut cutbox cutbox pback
|
||||
bcut cutbox cutbox pleft
|
||||
bcut cutbox cutbox pright
|
||||
|
||||
vclear
|
||||
vclose all
|
||||
vinit
|
||||
|
||||
vtrihedron tr
|
||||
vdisplay cutbox
|
||||
|
||||
vfit
|
||||
|
||||
# Axo View
|
||||
vaxo
|
||||
vdump $imagedir/${casename}_new_0_axo.png
|
||||
|
||||
axo
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_0_axo.png
|
||||
|
||||
vsetdispmode 1
|
||||
vmoveto 200 200
|
||||
|
||||
# Front View
|
||||
vfront
|
||||
vdump $imagedir/${casename}_new_1_front.png
|
||||
|
||||
front
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_1_front.png
|
||||
|
||||
# Back View
|
||||
vback
|
||||
vdump $imagedir/${casename}_new_2_back.png
|
||||
|
||||
back
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_2_back.png
|
||||
|
||||
# Right View
|
||||
vright
|
||||
vdump $imagedir/${casename}_new_3_right.png
|
||||
|
||||
right
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_3_right.png
|
||||
|
||||
# Left View
|
||||
vleft
|
||||
vdump $imagedir/${casename}_new_4_left.png
|
||||
|
||||
left
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_4_left.png
|
||||
|
||||
# Top View
|
||||
vtop
|
||||
vdump $imagedir/${casename}_new_5_top.png
|
||||
|
||||
top
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_5_top.png
|
||||
|
||||
# Bottom View
|
||||
vbottom
|
||||
vdump $imagedir/${casename}_new_6_bottom.png
|
||||
|
||||
bottom
|
||||
fit
|
||||
xwd $imagedir/${casename}_old_6_bottom.png
|
@ -15,7 +15,7 @@ set anImage2 $imagedir/${casename}_Closed.png
|
||||
vinit
|
||||
meshfromstl aMesh [locate_data_file sh1.stl]
|
||||
vsetdispmode aMesh 2
|
||||
vright
|
||||
vfront
|
||||
vfit
|
||||
|
||||
vclipplane create aClipPlane
|
||||
|
@ -67,7 +67,7 @@ vsettransparency B1 0.8
|
||||
vsettransparency B2 0.8
|
||||
vsettransparency B3 0.8
|
||||
|
||||
vright
|
||||
vfront
|
||||
vturnview 0 -0.3 0
|
||||
vfit
|
||||
vlight change 0 pos 1 1 1
|
||||
|
@ -67,7 +67,7 @@ vsetmaterial wall3 pewter
|
||||
vsetcolor wall1 red
|
||||
vsetcolor wall2 green
|
||||
|
||||
vright
|
||||
vfront
|
||||
vturnview 0 -0.3 0
|
||||
vfit
|
||||
vlight change 0 pos 1 1 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user