Old vright equals new vfront, old vfront equals new vright, old vleft equals new vback, old vback equals new vleft.
explode b FACE
vdisplay b_1 b_2 b_3 b_5 b_6
-vright
+vfront
vfit
vsetmaterial b_1 plastic
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
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
static int VLeft(Draw_Interpretor& di, Standard_Integer , const char** )
{
- return ViewProject(di, V3d_Ypos);
+ return ViewProject(di, V3d_Xneg);
}
//==============================================================================
static int VRight(Draw_Interpretor& di, Standard_Integer , const char** )
{
- return ViewProject(di, V3d_Yneg);
+ return ViewProject(di, V3d_Xpos);
}
//==============================================================================
static int VFront(Draw_Interpretor& di, Standard_Integer , const char** )
{
- return ViewProject(di, V3d_Xpos);
+ return ViewProject(di, V3d_Yneg);
}
//==============================================================================
static int VBack(Draw_Interpretor& di, Standard_Integer , const char** )
{
- return ViewProject(di, V3d_Xneg);
+ return ViewProject(di, V3d_Ypos);
}
//==============================================================================
"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 )",
puts ""
vtrihedron trihedr
-vright
+vfront
vsetdispmode 1
puts ""
vtrihedron trihedr
-vright
+vfront
vsetdispmode 1
vinit
vdisplay b
-vback
+vleft
vfit
vhlr on
vinit
vdisplay b
-vfront
+vright
vfit
vhlr on
vinit
vdisplay b
-vleft
+vback
vfit
vhlr on
vinit
vdisplay b
-vright
+vfront
vfit
vhlr on
restore [locate_data_file OCC25841_Curve_2.brep] a
vinit
vclear
-vfront
+vright
vdisplay a
vfit
set only_screen 1
checkcolor $x2 $y2 1 1 0.94
#####
-vleft
+vback
#####
set x1 120
checkcolor $x2 $y2 1 1 0.94
#####
-vright
+vfront
#####
set x1 120
checkcolor $x2 $y2 1 1 0.94
#####
-vfront
+vright
#####
set x1 120
checkcolor $x2 $y2 1 1 0.94
#####
-vback
+vleft
#####
set x1 120
vfont add [locate_data_file DejaVuSans.ttf] SansFont
vinit
-vright
+vfront
set hpos "left hcenter right"
set vpos "above vcenter below"
# ------------------------------------------------
vinit Viewer2/View2
-vright
+vfront
set idx 0
for {set r 0} {$r < 3} {incr r} {
vfont add [locate_data_file DejaVuSans.ttf] SansFont
vinit
-vright
+vfront
set hpos "left hcenter right"
set vpos "above vcenter below"
# ------------------------------------------------
vinit Viewer2/View2
-vright
+vfront
set idx 0
for {set r 0} {$r < 3} {incr r} {
vfont add [locate_data_file DejaVuSans.ttf] SansFont
vinit
-vright
+vfront
set hpos "left hcenter"
set vpos "above vcenter below"
# ------------------------------------------------
vinit Viewer2/View2
-vright
+vfront
set idx 0
for {set r 0} {$r < 3} {incr r} {
vfont add [locate_data_file DejaVuSans.ttf] SansFont
vinit
-vright
+vfront
set hpos "left hcenter right"
set vpos "above vcenter below"
# ------------------------------------------------
vinit Viewer2/View2
-vright
+vfront
set idx 0
for {set r 0} {$r < 3} {incr r} {
box b 10 10 10
vdisplay b
-vright
+vfront
vfit
vviewparams -size 22
vsetcolor wall1 red
vsetcolor wall2 green
-vright
+vfront
vturnview 0 -0.3 0
vfit
vinit
vdisplay a
-vback
+vleft
vfit
set only_screen 1
vtop
vcamera -persp
vfit
-vback
+vleft
vtop
#check rectagle selection
--- /dev/null
+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
vinit
meshfromstl aMesh [locate_data_file sh1.stl]
vsetdispmode aMesh 2
-vright
+vfront
vfit
vclipplane create aClipPlane
vsettransparency B2 0.8
vsettransparency B3 0.8
-vright
+vfront
vturnview 0 -0.3 0
vfit
vlight change 0 pos 1 1 1
vsetcolor wall1 red
vsetcolor wall2 green
-vright
+vfront
vturnview 0 -0.3 0
vfit
vlight change 0 pos 1 1 1