mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
0029967: Draw Harness - command bounding has annoying syntax
Bnd_OBB constructor from Bnd_Box is fixed for VOID input. DRAW command bounding command is adjusted: - Support of old syntax 'bounding shape'is restored. - Exception on VOID bounding box is avoided. - Arguments are handled in case-insensitive way. - Options -s, -perfmeter, and ability to set result as first argument are removed as redundant. - Help is moved to command definition. Separate command OCC29311 is added (in QADraw) to do the same as option -perfmeter did; tests are updated.
This commit is contained in:
@@ -11,7 +11,7 @@ set aSetDZ1 300
|
||||
|
||||
box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1}
|
||||
|
||||
bounding -s aBox1 -save X1_Box1 Y1_Box1 Z1_Box1 X2_Box1 Y2_Box1 Z2_Box1
|
||||
bounding aBox1 -save X1_Box1 Y1_Box1 Z1_Box1 X2_Box1 Y2_Box1 Z2_Box1
|
||||
|
||||
set aLabel 0:2
|
||||
SetShape D ${aLabel} aBox1
|
||||
@@ -33,7 +33,7 @@ set IsDone [catch {GetShape DD ${aLabel} aBox5} aResult]
|
||||
if { ${IsDone} != 0 } {
|
||||
puts "Error : Get a value of TDataStd_Shape attribute from restoring document"
|
||||
} else {
|
||||
bounding -s aBox5 -save X1_Box5 Y1_Box5 Z1_Box5 X2_Box5 Y2_Box5 Z2_Box5
|
||||
bounding aBox5 -save X1_Box5 Y1_Box5 Z1_Box5 X2_Box5 Y2_Box5 Z2_Box5
|
||||
|
||||
if { [dval X1_Box1] != [dval X1_Box5] ||
|
||||
[dval Y1_Box1] != [dval Y1_Box5] ||
|
||||
|
||||
@@ -11,7 +11,7 @@ set aSetDZ1 300
|
||||
|
||||
box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1}
|
||||
|
||||
bounding -s aBox1 -save X1_Box1 Y1_Box1 Z1_Box1 X2_Box1 Y2_Box1 Z2_Box1
|
||||
bounding aBox1 -save X1_Box1 Y1_Box1 Z1_Box1 X2_Box1 Y2_Box1 Z2_Box1
|
||||
|
||||
# Create a label
|
||||
set aLabel 0:2
|
||||
@@ -41,7 +41,7 @@ if { ${IsDone} != 0 } {
|
||||
puts ${aResult}
|
||||
puts "Error : Get a value of TNaming_NamedShape attribute from restoring document"
|
||||
} else {
|
||||
bounding -s aBox3 -save X1_Box3 Y1_Box3 Z1_Box3 X2_Box3 Y2_Box3 Z2_Box3
|
||||
bounding aBox3 -save X1_Box3 Y1_Box3 Z1_Box3 X2_Box3 Y2_Box3 Z2_Box3
|
||||
|
||||
if { [dval X1_Box1] != [dval X1_Box3] ||
|
||||
[dval Y1_Box1] != [dval Y1_Box3] ||
|
||||
|
||||
@@ -27,7 +27,7 @@ set aSetDZ1 300
|
||||
|
||||
box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1}
|
||||
|
||||
bounding -s aBox1 -save X1_Box1 Y1_Box1 Z1_Box1 X2_Box1 Y2_Box1 Z2_Box1
|
||||
bounding aBox1 -save X1_Box1 Y1_Box1 Z1_Box1 X2_Box1 Y2_Box1 Z2_Box1
|
||||
|
||||
SetShape Doc1 ${aLabel1} aBox1
|
||||
|
||||
@@ -59,7 +59,7 @@ set IsDone [catch {GetShape Doc2 ${aLabel2} aBox2} aResult]
|
||||
if { ${IsDone} != 0 } {
|
||||
puts "Error : Get a value of TNaming_NamedShape attribute from restoring document"
|
||||
} else {
|
||||
bounding -s aBox2 -save X1_Box2 Y1_Box2 Z1_Box2 X2_Box2 Y2_Box2 Z2_Box2
|
||||
bounding aBox2 -save X1_Box2 Y1_Box2 Z1_Box2 X2_Box2 Y2_Box2 Z2_Box2
|
||||
|
||||
if { [dval X1_Box1] != [dval X1_Box2] ||
|
||||
[dval Y1_Box1] != [dval Y1_Box2] ||
|
||||
|
||||
Reference in New Issue
Block a user