1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00

Adding new testing cases for chl grid

Adding procedures checkcolor and checkpoint.
Modified test cases which are used QAGetPixelColor or QAAISGetPixelColor2d
Allow using command QAAISGetPixelColor2d on WNT
Rename test case tests/bugs/vis/bug19619 to pro19619
Added test cases to modalg and moddata
This commit is contained in:
apn 2012-12-14 16:56:11 +04:00
parent fa350ff051
commit f1aa2b6272
162 changed files with 3538 additions and 770 deletions

View File

@ -851,7 +851,7 @@ static int V2dSetHighlightMode (Draw_Interpretor& di, Standard_Integer argc, con
return 0;
}
#ifndef WNT
//#ifndef WNT
//==============================================================================
//function : QAAISGetPixelColor2d
//purpose : QAAISGetPixelColor2d coord_X coord_Y Red Green Blue
@ -935,7 +935,7 @@ static int QAAISGetPixelColor2d (Draw_Interpretor& di, Standard_Integer argc, co
}
return 0;
}
#endif // !WNT
//#endif // !WNT
//==============================================================================
//function : QAMoveTo2d
@ -2240,11 +2240,11 @@ void QADraw::CommonCommands(Draw_Interpretor& theCommands)
theCommands.Add("QAGetViewCharac", "QAGetViewCharac", __FILE__,QAAISGetViewCharac, group);
theCommands.Add("QASetViewCharac", "QASetViewCharac scale center_X center_Y proj_X proj_Y proj_Z up_X up_Y up_Z at_X at_Y at_Z", __FILE__,QAAISSetViewCharac, group);
theCommands.Add("QAGetColorCoord", "QAGetColorCoord [3d|2d]", __FILE__,QAAISGetColorCoord, group);
#ifndef WNT
//#ifndef WNT
theCommands.Add("QAAISGetPixelColor2d",
"QAAISGetPixelColor2d coord_X coord_Y [Red Green Blue] : Check a color of pixel",
__FILE__, QAAISGetPixelColor2d, group);
#endif
//#endif
theCommands.Add("v2dgetgrid",
"v2dgetgrid coord_X coord_Y [grid_X grid_Y] : Get/print coordinates of a grid point near to (coord_X, coord_Y)",

View File

@ -35,6 +35,143 @@ proc checkreal {name value expected tol_abs tol_rel} {
return
}
# Procedure to check color in the point near default coordinate
proc checkpoint {coord_x coord_y rd_ch gr_ch bl_ch} {
set x_start [expr ${coord_x} - 2]
set y_start [expr ${coord_y} - 2]
set mistake 0
set i 0
while { $mistake != 1 && $i <= 5 } {
set j 0
while { $mistake != 1 && $j <= 5 } {
set position_x [expr ${x_start} + $j]
set position_y [expr ${y_start} + $i]
puts $position_x
puts $position_y
global color2d
if { [info exists color2d] } {
set color [ QAAISGetPixelColor2d ${position_x} ${position_y} ]
} else {
set color [ QAGetPixelColor ${position_x} ${position_y} ]
}
regexp {RED +: +([-0-9.+eE]+)} $color full rd
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
set rd_int [expr int($rd * 1.e+05)]
set gr_int [expr int($gr * 1.e+05)]
set bl_int [expr int($bl * 1.e+05)]
if { $rd_ch != 0 } {
set tol_rd [expr abs($rd_ch - $rd_int)/$rd_ch]
} else {
set tol_rd $rd_int
}
if { $gr_ch != 0 } {
set tol_gr [expr abs($gr_ch - $gr_int)/$gr_ch]
} else {
set tol_gr $gr_int
}
if { $bl_ch != 0 } {
set tol_bl [expr abs($bl_ch - $bl_int)/$bl_ch]
} else {
set tol_bl $bl_int
}
if { $tol_rd > 0.2 || $tol_gr > 0.2 || $tol_bl > 0.2 } {
puts "Warning : Point with true color was not found near default coordinates"
set mistake 0
} else {
set mistake 1
}
incr j
}
incr i
}
return $mistake
}
# Procedure to check color using command QAgetPixelColor with tolerance
proc checkcolor { coord_x coord_y rd_get gr_get bl_get } {
puts "Coordinate x = $coord_x"
puts "Coordinate y = $coord_y"
puts "RED color of RGB is $rd_get"
puts "GREEN color of RGB is $gr_get"
puts "BLUE color of RGB is $bl_get"
if { $coord_x <= 1 || $coord_y <= 1 } {
puts "Error : minimal coordinate is x = 2, y = 2. But we have x = $coord_x y = $coord_y"
return -1
}
global color2d
if { [info exists color2d] } {
set color [ QAAISGetPixelColor2d ${coord_x} ${coord_y} ]
} else {
set color [ QAGetPixelColor ${coord_x} ${coord_y} ]
}
regexp {RED +: +([-0-9.+eE]+)} $color full rd
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
set rd_int [expr int($rd * 1.e+05)]
set gr_int [expr int($gr * 1.e+05)]
set bl_int [expr int($bl * 1.e+05)]
set rd_ch [expr int($rd_get * 1.e+05)]
set gr_ch [expr int($gr_get * 1.e+05)]
set bl_ch [expr int($bl_get * 1.e+05)]
if { $rd_ch != 0 } {
set tol_rd [expr abs($rd_ch - $rd_int)/$rd_ch]
} else {
set tol_rd $rd_int
}
if { $gr_ch != 0 } {
set tol_gr [expr abs($gr_ch - $gr_int)/$gr_ch]
} else {
set tol_gr $gr_int
}
if { $bl_ch != 0 } {
set tol_bl [expr abs($bl_ch - $bl_int)/$bl_ch]
} else {
set tol_bl $bl_int
}
set status 0
if { $tol_rd > 0.2 } {
puts "Warning : RED light of additive color model RGB is invalid"
set status 1
}
if { $tol_gr > 0.2 } {
puts "Warning : GREEN light of additive color model RGB is invalid"
set status 1
}
if { $tol_bl > 0.2 } {
puts "Warning : BLUE light of additive color model RGB is invalid"
set status 1
}
if { $status != 0 } {
puts "Warning : Colors of default coordinate are not equal"
}
global stat
if { $tol_rd > 0.2 || $tol_gr > 0.2 || $tol_bl > 0.2 } {
set info [checkpoint $coord_x $coord_y $rd_ch $gr_ch $bl_ch]
set stat [lindex $info end]
if { ${stat} != 1 } {
puts "Error : Colors are not equal in default coordinate and in the near coordinates too"
return $stat
} else {
puts "Point with valid color was found"
return $stat
}
} else {
set stat 1
}
}
# Procedure to check if sequence of values in listval follows linear trend
# adding the same delta on each step.
#

41
tests/bugs/demo/bug23410 Normal file → Executable file
View File

@ -7,52 +7,21 @@ puts ""
#######################################################################
pload QAcommands
set r_1 0.4
set r_2 0.5
set g_1 0.9
set g_2 1
set b_1 0
set b_2 0.1
set x1 128
set y1 235
set x_coord 128
set y_coord 235
box result 100 100 100
vdisplay result
vsetdispmode 1
vfit
vsetcolor result GREEN
set color [ QAGetPixelColor ${x1} ${y1} ]
regexp {RED +: +([-0-9.+eE]+)} $color full rd
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
set red_status 0
if { $rd < $r_1 || $rd > $r_2 } {
set red_status 1
} else {
set red_status 0
}
checkcolor $x_coord $y_coord 0.45 0.95 0.05
set green_status 0
if { $gr < $g_1 || $gr > $g_2 } {
set green_status 1
} else {
set green_status 0
}
set blue_status 0
if { $bl < $b_1 || $bl > $b_2 } {
set blue_status 1
} else {
set blue_status 0
}
if { $red_status != 0 || $green_status != 0 || $blue_status != 0 } {
puts "Error : color are not equal"
puts "Error : QA command QAGetPixelColor doesn't work properly"
}
set 3dviewer 1

View File

@ -23,7 +23,7 @@ explode b e
explode b_4 v
distmini d $ver b_5
regexp {([-0-9.+eE]+)} [dump d_val] full dist
regexp {([-0-9.+eE]+)$} [dump d_val] full dist
regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [maxtolerance $ver] full toler
if {$dist > $toler} {

View File

@ -30,13 +30,13 @@ if { [regexp {Faulty} $che ] == 1 } {
distmini d1 result_1 b
distmini d2 [lindex $le [expr [llength $le] - 1]] b
regexp {([-0-9.+eE]+)} [dump d1_val] full du1
regexp {([-0-9.+eE]+)$} [dump d1_val] full du1
if { [expr $du1 > 1e-7] } {
puts "Faulty : The distance between first vertex and shellB is $du1. It is more then 1e-7."
}
regexp {([-0-9.+eE]+)} [dump d2_val] full du2
regexp {([-0-9.+eE]+)$} [dump d2_val] full du2
if { [expr $du2 > 1e-7] } {
puts "Faulty : The distance between last vertex and shellB is $du2. It is more then 1e-7."
}

View File

@ -34,12 +34,12 @@ if { [regexp {Faulty} $che ] == 1 } {
puts "Faulty :The result of section is an empty compound."
} else {
distmini d1 res_1 a_1
regexp {([-0-9.+eE]+)} [dump d1_val] full len1
regexp {([-0-9.+eE]+)$} [dump d1_val] full len1
if ([expr $len1 > 1e-7]) {
puts "Faulty :The section is incomplite."
} else {
distmini d2 res_2 a_2
regexp {([-0-9.+eE]+)} [dump d2_val] full len2
regexp {([-0-9.+eE]+)$} [dump d2_val] full len2
if ([expr $len2 > 1e-7]) {
puts "Faulty :The section is incomplite."
}

13
tests/bugs/modalg/bug1013 Executable file
View File

@ -0,0 +1,13 @@
puts "================"
puts "OCC1013"
puts "OCC906"
puts "================"
puts ""
restore [locate_data_file DXF906.rle] wire
puts [checkshape wire]
mkplane result wire
set square 92131.6
set 2dviewer 0

View File

@ -22,7 +22,7 @@ explode b e
explode b_4 v
distmini d $ver b_5
regexp {([-0-9.+eE]+)} [dump d_val] full dist
regexp {([-0-9.+eE]+)$} [dump d_val] full dist
regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [ maxtolerance $ver ] full toler
if { [expr $dist > $toler] } {

View File

@ -20,7 +20,7 @@ set nb_e_good 7
explode result v
explode a e
distmini di result_1 a_3
regexp {([-0-9.+eE]+)} [dump $di_val] full dis
regexp {([-0-9.+eE]+)$} [dump $di_val] full dis
if { [expr $dis > 1.e-5] } {
puts "Faulty : Result shape is WRONG !!!"
} else {

View File

@ -20,7 +20,7 @@ set nb_e_good 7
explode result v
explode a e
distmini di result_2 a_3
regexp {([-0-9.+eE]+)} [dump $di_val] full dis
regexp {([-0-9.+eE]+)$} [dump $di_val] full dis
if { [expr $dis > 1.e-5] } {
puts "Faulty : Result shape is WRONG !!!"
} else {

View File

@ -14,18 +14,15 @@ vinit
vdisplay result
vfit
set Yellow_R 1
set Yellow_G 1
set Yellow_B 0
set x_coord 204
set y_coord 297
set x1 204
set y1 297
checkcolor $x_coord $y_coord 1 1 0
set x2 251
set y2 232
set x_coord 251
set y_coord 232
QAGetPixelColor $x1 $y1 $Yellow_R $Yellow_G $Yellow_B
QAGetPixelColor $x2 $y2 $Yellow_R $Yellow_G $Yellow_B
checkcolor $x_coord $y_coord 1 1 0
set square 20000
set only_screen 1

View File

@ -4,19 +4,6 @@ puts "========================"
pload QAcommands
if { [array get env os_type] != "" } {
set os $env(os_type)
}
if { [string compare $os "windows"] == 0 } {
set rd_ch 50196
set gr_ch 34901
set bl_ch 5098
} else {
set rd_ch 50588
set gr_ch 34901
set bl_ch 5098
}
restore [locate_data_file OCC397.brep] a
puts [checkshape a]
@ -29,17 +16,12 @@ vdisplay result
vfit
vsetdispmode result 1
set color [QAGetPixelColor 235 180]
regexp {RED +: +([-0-9.+eE]+)} $color full rd
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
set x_coord 235
set y_coord 180
set rd_int [expr int($rd * 1.e+05)]
set gr_int [expr int($gr * 1.e+05)]
set bl_int [expr int($bl * 1.e+05)]
checkcolor $x_coord $y_coord 0.5 0.35 0.05
if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
puts "Error : colors are not equal"
if { ${stat} != 1 } {
puts "Error : Shading is missing in 3D Viewer"
}

37
tests/bugs/modalg/bug398 Executable file
View File

@ -0,0 +1,37 @@
#INTERFACE IGES
puts "========"
puts "OCC398"
puts "========"
puts ""
#############################################################
## ShapeHealing modification 1:1 increases number of unique shapes in compound structure.
#############################################################
pload XDE
catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands }
restore [locate_data_file OCC398.brep] a
#statsh a
#nbshapes a
#Statshape should give 3 solids
#Nbshape should return 1 solid
scaleshape result a 10
#statsh res
set nb_info [nbshapes result]
set nb_sol_good 1
#if { $sol == 1 } {
# puts " OCC398 : scaleshape operation was made properly"
#} else {
# puts "Faulty OCC398: scaleshape operation was made wrongly"
#}
#Statshape should give 3 solids
#Nbshape should return 1 solid (3 solids is returned if bug not fixed)
set square 180000.
set 2dviewer 0

22
tests/bugs/modalg/bug418_1 Executable file
View File

@ -0,0 +1,22 @@
puts "========================"
puts " OCC418 "
puts "CTS20370"
puts "(case 1)"
puts "========================"
puts ""
restore [locate_data_file CTO904_cts20370-part.rle] part
puts [checkshape part]
restore [locate_data_file cts20370-tool.rle] tool
puts [checkshape tool]
bsection sec part tool
puts [checkshape -top sec]
bcut result part tool
puts [checkshape -top result]
set square 273365.
set 2dviewer 0

22
tests/bugs/modalg/bug418_2 Executable file
View File

@ -0,0 +1,22 @@
puts "========================"
puts " OCC418 "
puts "CTS20370"
puts "(case 2)"
puts "========================"
puts ""
restore [locate_data_file CTO904_cts20370-part.rle] a
puts [checkshape a]
restore [locate_data_file cts20370-tool.rle] b
puts [checkshape b]
bsection sec a b
bfuse result a b
puts [checkshape -top result]
set square 261265.
set 2dviewer 0

22
tests/bugs/modalg/bug419 Executable file
View File

@ -0,0 +1,22 @@
# Original bug :
puts "========================"
puts " OCC419 "
puts "FRA50047"
puts "========================"
puts ""
restore [locate_data_file CTO904_fra50047a.rle] a
puts [checkshape a]
restore [locate_data_file fra50047b.rle] b
puts [checkshape b]
bsection sec a b
puts [checkshape -top sec]
bfuse result a b
puts [checkshape -top result]
set square 508496.
set 2dviewer 0

25
tests/bugs/modalg/bug420 Executable file
View File

@ -0,0 +1,25 @@
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "========================"
puts " OCC420 "
puts "PRO12473"
puts "========================"
puts ""
restore [locate_data_file CTO909_objects.brep] a
puts [checkshape a]
restore [locate_data_file CTO909_tool_4.brep] b
puts [checkshape b]
bsection sec a b
puts [checksection sec]
puts [checkshape sec]
explode a so
renamevar a_1 a
bcut result a b
set square 0
set 2dviewer 0

18
tests/bugs/modalg/bug421 Executable file
View File

@ -0,0 +1,18 @@
puts "========================"
puts " OCC421 "
puts "========================"
puts ""
profile p c 5 180 l 5 t 0 5 d -1 0 c 5 180 l 5
polyline w 0 0 0 0 0 10
pipe p w p
nexplode p f
depouille result p 0 0 1 p_1 5 0 0 0 0 0 1 \
p_7 1 0 0 0 0 0 1 \
p_8 5 0 0 0 0 0 1 \
p_2 1 0 0 0 0 0 1
set square 659.647
set 2dviewer 0

19
tests/bugs/modalg/bug422_1 Executable file
View File

@ -0,0 +1,19 @@
puts "========================"
puts " OCC422 "
puts "(case 1)"
puts "========================"
puts ""
plane p 0 0 0 0 0 1 -1 0 0
psphere p p 20 0 90
#profile pf o -4 -4 1 l 8 d 0 1 l 8 d -1 0 l 8
profile pf o -4 -4 1 l 8 c 2 90 l 8 d -1 0 l 8
prism p2 pf 0 0 40
bfuse f p p2
nexplode f f
depouille result f 0 0 1 f_7 5 0 0 40 0 0 1
set square 4630.78
set 2dviewer 0

19
tests/bugs/modalg/bug422_2 Executable file
View File

@ -0,0 +1,19 @@
puts "========================"
puts " OCC422 "
puts "(case 2)"
puts "========================"
puts ""
plane ps 10 -3 0 1 0 0 0 .2 1
psphere ps ps 20
profile pf o 5 1 5 l 10 c 2 90 l 5 d -1 0 \
l 14 d 0 -1 l 5 c 2 90
prism pr pf 0 0 30
bfuse f ps pr
nexplode f f
depouille result f 0 0 1 f_4 4 0 0 30 0 0 1
set square 5719.09
set 2dviewer 0

27
tests/bugs/modalg/bug423_1 Executable file
View File

@ -0,0 +1,27 @@
puts "========================"
puts " OCC423 "
puts "(case 1)"
puts "========================"
puts ""
restore [locate_data_file cylindre.rle] cyl
puts [checkshape cyl]
restore [locate_data_file contour.rle] cont
puts [checkshape cont]
mkplane cont cont
nexplode cyl F
ttranslate cont 0 200 0
featdprism cyl cont cont 10 1 1
if [catch {featperformval dprism result 55 cyl_3 } catch_result] {
puts "Faulty OCC423 (case 1): function FEATPERFORMVAL works wrongly"
} else {
puts "OCC423 OK (case 1): function FEATPERFORMVAL works properly"
}
set square 94944.4
set 2dviewer 0

23
tests/bugs/modalg/bug423_2 Executable file
View File

@ -0,0 +1,23 @@
puts "========================"
puts " OCC423 "
puts "(case 2)"
puts "========================"
puts ""
restore [locate_data_file pro15515_base.rle] base
puts [checkshape base]
restore [locate_data_file pro15515_face.rle] cont
puts [checkshape cont]
explode base face
copy base_4 ffrom
copy base_3 funtil
### From Until
featrevol base cont cont 54.06494140625 70.2841796875 0 0 0 1 1 1
featperform revol result funtil ffrom
set square 560028.
set 2dviewer 0

21
tests/bugs/modalg/bug424_1 Executable file
View File

@ -0,0 +1,21 @@
puts "========================"
puts " OCC424 "
puts "(case 1)"
puts "========================"
puts ""
restore [locate_data_file CFE_e_lonfzx.rle] E
nexplode E f
profile cont S E_10 F 50 -100 X 50 Y -100 X -50
featdprism E cont E_10 10 1 1
if [catch {featperform dprism result E_5 E_6 } catch_result] {
puts "Faulty OCC424 (case 1): function FEATPERFORM works wrongly"
} else {
puts "OCC424 OK (case 1): function FEATPERFORM works properly"
}
set square 978236.
set 2dviewer 0

21
tests/bugs/modalg/bug424_2 Executable file
View File

@ -0,0 +1,21 @@
puts "========================"
puts " OCC424 "
puts "(case 2)"
puts "========================"
puts ""
restore [locate_data_file CFE_e_lonfzx.rle] E
nexplode E f
profile cont S E_10 F 50 -100 X 50 Y -100 X -50
featdprism E cont E_10 10 1 1
if [catch {featperform dprism result } catch_result] {
puts "Faulty OCC424 (case 2): function FEATPERFORM works wrongly"
} else {
puts "OCC424 OK (case 2): function FEATPERFORM works properly"
}
set square 978236.
set 2dviewer 0

26
tests/bugs/modalg/bug427_1 Executable file
View File

@ -0,0 +1,26 @@
puts "========="
puts " OCC427 "
puts "(case 1)"
puts "========="
puts ""
cpulimit 1200
proc OFFSETSHAPE {distance faces calcul type} {
uplevel #0 explode s f
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result
}
#Shell no rough and rounded mode
set calcul "c"
set type "i"
pcone s 9 4 15 90
trotate s 0 0 0 0 0 1 90
OFFSETSHAPE 1 {} $calcul $type
set square 671.382
set 2dviewer 0

26
tests/bugs/modalg/bug427_2 Executable file
View File

@ -0,0 +1,26 @@
puts "========================"
puts " OCC427 "
puts "(case 2)"
puts "========================"
puts ""
cpulimit 1200
proc OFFSETSHAPE {distance faces calcul type} {
uplevel #0 explode s f
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result
}
#Shell no rough and rounded mode
set calcul "c"
set type "i"
pcone s 9 4 15 90
trotate s 0 0 0 0 0 1 90
OFFSETSHAPE 1 {s_5} $calcul $type
set square 858.167
set 2dviewer 0

26
tests/bugs/modalg/bug427_3 Executable file
View File

@ -0,0 +1,26 @@
puts "========================"
puts " OCC427 "
puts "(case 3)"
puts "========================"
puts ""
cpulimit 1200
proc OFFSETSHAPE {distance faces calcul type} {
uplevel #0 explode s f
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result
}
#Shell no rough and rounded mode
set calcul "c"
set type "i"
pcone s 9 4 15 90
trotate s 0 0 0 0 0 1 90
OFFSETSHAPE 1 {s_2 s_3} $calcul $type
set square 885.688
set 2dviewer 0

30
tests/bugs/modalg/bug427_4 Executable file
View File

@ -0,0 +1,30 @@
puts "========================"
puts " OCC427 "
puts "(case 4)"
puts "========================"
puts ""
cpulimit 1200
proc OFFSETSHAPE {distance faces calcul type} {
uplevel #0 explode s f
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result
}
#Shell no rough and rounded mode
set calcul "c"
set type "i"
circle w -20 0 0 20
mkedge w w 0 pi*2/5
wire w w
polyline profile 0 0 0 10 0 0 5 0 5 0 0 0
mkplane profile profile
pipe s w profile
OFFSETSHAPE 1 {} $calcul $type
set square 1306.3
set 2dviewer 0

30
tests/bugs/modalg/bug427_5 Executable file
View File

@ -0,0 +1,30 @@
puts "========================"
puts " OCC427 "
puts "(case 5)"
puts "========================"
puts ""
cpulimit 1200
proc OFFSETSHAPE {distance faces calcul type} {
uplevel #0 explode s f
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result
}
#Shell no rough and rounded mode
set calcul "c"
set type "i"
circle w -20 0 0 20
mkedge w w 0 pi*2/5
wire w w
polyline profile 0 0 0 10 0 0 5 0 5 0 0 0
mkplane profile profile
pipe s w profile
OFFSETSHAPE 1 {s_2} $calcul $type
set square 1297.39
set 2dviewer 0

30
tests/bugs/modalg/bug427_6 Executable file
View File

@ -0,0 +1,30 @@
puts "========================"
puts " OCC427 "
puts "(case 6)"
puts "========================"
puts ""
cpulimit 1200
proc OFFSETSHAPE {distance faces calcul type} {
uplevel #0 explode s f
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result
}
#Shell no rough and rounded mode
set calcul "c"
set type "i"
circle w -20 0 0 20
mkedge w w 0 pi*2/5
wire w w
polyline profile 0 0 0 10 0 0 5 0 5 0 0 0
mkplane profile profile
pipe s w profile
OFFSETSHAPE 1 {s_4 s_5} $calcul $type
set square 808.448
set 2dviewer 0

23
tests/bugs/modalg/bug516 Executable file
View File

@ -0,0 +1,23 @@
puts "========"
puts "OCC516"
puts "========"
puts ""
#########################################
## Wrong classification of the 3D-point with the Solid .
#########################################
point p 14.99999878745701 5.52319672860377e-07 7.78393041
vertex v 14.99999878745701 5.52319672860377e-07 7.78393041
restore [locate_data_file OCC516.brep] result
set cls [bclassify result p]
if { [regexp {OUT} $cls] } {
puts "Faulty : Wrong classification of the 3D-point with the Solid"
} else {
puts "CORRECT classification of the 3D-point with the Solid"
}
set square 7752.98
set 2dviewer 0

21
tests/bugs/modalg/bug539_1 Executable file
View File

@ -0,0 +1,21 @@
puts "========================"
puts " OCC539 "
puts "(case 1)"
puts "========================"
puts ""
puts "==========================================="
puts " BOPCOMMON case_4_shell.brep and case_4_wire3.brep"
puts "==========================================="
puts " "
puts [restore [locate_data_file case_4_shell.brep] a]
puts [restore [locate_data_file case_4_wire3.brep] b]
puts [bop a b]
puts [bopcommon result]
set nb_info [nbshapes result]
set nb_v_good 15
set nb_e_good 10
set length 1150.78
set 2dviewer 0

23
tests/bugs/modalg/bug539_2 Executable file
View File

@ -0,0 +1,23 @@
puts "========================"
puts " OCC539 "
puts "(case 2)"
puts "========================"
puts ""
puts "============================================"
puts " BOPTUC case_4_shell.brep and case_4_wire3.brep"
puts "============================================"
puts " "
puts [restore [locate_data_file case_4_shell.brep] a]
puts [restore [locate_data_file case_4_wire3.brep] b]
puts [bop a b]
puts [boptuc result]
set nb_info [nbshapes result]
set nb_v_good 16
set nb_e_good 11
set length 929.278
set 2dviewer 0

22
tests/bugs/modalg/bug571_1 Executable file
View File

@ -0,0 +1,22 @@
puts "========"
puts "OCC571"
puts "========"
puts ""
##########################
## Fillet operation fails on given shape
##########################
## LIMITATION: Builds fillet with 0.03<=r<=1.2
##########################
restore [locate_data_file OCC571.brep] a
puts [checkshape a]
explode a
if [catch {fillet result a_1 1.2 a_2 } catch_result] {
puts "Faulty OCC571 exception (case 1): Fillet operation fails on given shape "
} else {
puts " OCC571 (case 1) OK: Fillet operation was made"
}
set square 21118.1
set 2dviewer 0

22
tests/bugs/modalg/bug571_2 Executable file
View File

@ -0,0 +1,22 @@
puts "========"
puts "OCC571"
puts "========"
puts ""
##########################
## Fillet operation fails on given shape
##########################
## LIMITATION: Builds fillet with 0.03<=r<=1.2
##########################
restore [locate_data_file OCC571.brep] a
puts [checkshape a]
explode a
if [catch {fillet result a_1 0.03 a_2 } catch_result] {
puts "Faulty OCC571 exception (case 2): Fillet operation fails on given shape "
} else {
puts " OCC571 (case 2) OK: Fillet operation was made"
}
set square 21209.9
set 2dviewer 0

26
tests/bugs/modalg/bug594 Executable file
View File

@ -0,0 +1,26 @@
puts "========================"
puts " SAL594 "
puts "========================"
puts ""
###################################
## It is impossible to put correct fillets on the shape
###################################
restore [locate_data_file SAL594.brep] a
explode a e
if [catch {blend result1 a 20 a_23 20 a_25 20 a_26 20 a_28} catch_result] {
puts "Faulty SAL594 (case 1): function BLEND works wrongly"
} else {
puts "SAL594 OK (case 1): function BLEND works OK"
}
if [catch {blend result result1 2.5 a_15 2.5 a_12 2.5 a_4} catch_result] {
puts "Faulty SAL594 (case 2): function BLEND works wrongly."
} else {
puts "SAL594 OK (case 2): function BLEND works OK"
}
set square 60513.1
set 2dviewer 0

19
tests/bugs/modalg/bug600 Executable file
View File

@ -0,0 +1,19 @@
puts "TODO ?OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
puts "========================"
puts " OCC600"
puts "========================"
## Result of BOPCOMMON operation is unclosed shape inspite of source solids are valid
############################################################
cpulimit 5000
restore [locate_data_file OCC600_1.brep] a
puts [checkshape a]
restore [locate_data_file OCC600_2.brep] b
puts [checkshape b]
bop b a
bopcommon result
set square 41970.8
set 2dviewer 0

24
tests/bugs/modalg/bug602 Executable file
View File

@ -0,0 +1,24 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "========================"
puts " OCC602 "
puts "========================"
puts ""
###########################################
## Exception during filet creation if it cross samedge of cylinder.
###########################################
restore [locate_data_file OCC602.brep] a
puts [checkshape a]
explode a e
if [catch {blend result a 20 a_9 } catch_result] {
puts "Faulty OCC602: function BLEND works wrongly"
} else {
puts "OCC602 OK: function BLEND works OK"
}
set square 0
set 2dviewer 0

37
tests/bugs/modalg/bug605 Executable file
View File

@ -0,0 +1,37 @@
puts "========================"
puts " OCC605"
puts "========================"
puts ""
##############################
## No any faces in result of pipe command.
##############################
restore [locate_data_file OCC605a.brep] w1
puts [checkshape w1]
restore [locate_data_file OCC605b.brep] w2
puts [checkshape w2]
if { [catch {pipe result w2 w1 } catch_result] } {
puts "Faulty OCC605: function PIPE works with exception."
} else {
explode result f
set nom 0
set j 1
repeat 20 {
if { [regexp {FACE} [whatis result_$j]] != 1 } {
break
} else {
set nom [expr $nom + 1]
}
incr j
}
if { $nom == 0 } {
puts " Faulty OCC605: Result of PIPE operation is incorrect !!! "
} else {
puts "OCC605 OK : Result of PIPE operation is NOT empty shell!!! "
}
}
set square 20.6253
set 2dviewer 0

22
tests/bugs/modalg/bug615 Executable file
View File

@ -0,0 +1,22 @@
puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
puts "========================"
puts " OCC615"
puts "========================"
puts ""
#############################
## Wrong resultat of BLEND operation
#############################
restore [locate_data_file OCC615.brep] a
puts [checkshape a]
explode a e
if [catch {blend result a 9 a_15 } catch_result] {
puts "Faulty OCC615: function BLEND works with exception"
} else {
puts "OCC615 OK: function CHAMF works OK"
}
set square 197055.
set 2dviewer 0

22
tests/bugs/modalg/bug616 Executable file
View File

@ -0,0 +1,22 @@
puts "========================"
puts " OCC616"
puts "========================"
puts ""
########################################
## Function MKOFFSET gives exception for attached face
########################################
restore [locate_data_file OCC616.brep] a
puts [checkshape a]
if { [catch {mkoffset result a 5 -2} catch_result] } {
puts "Faulty OCC616: function MKOFFSET works with exception"
} else {
renamevar result_1 result
puts [checkshape result]
puts "OCC616 OK: function MKOFFSET works OK"
}
set length 1062.78
set 2dviewer 0

24
tests/bugs/modalg/bug620_1 Executable file
View File

@ -0,0 +1,24 @@
puts "========================"
puts "OCC620"
puts "========================"
puts ""
############################
## No possibility to cut the shapes.
############################
restore [locate_data_file OCC620a.brep] a
puts [checkshape a]
restore [locate_data_file OCC620b.brep] b
puts [checkshape b]
bop a b
if [catch { bopcut result } catch_result] {
puts "Faulty OCC620 : BOPCUT operation was made wrongly"
} else {
puts "OCC620 OK: BOPCUT operation works OK"
}
set square 314742.
set 2dviewer 0

24
tests/bugs/modalg/bug620_2 Executable file
View File

@ -0,0 +1,24 @@
puts "========================"
puts "OCC620"
puts "========================"
puts ""
############################
## No possibility to cut the shapes.
############################
restore [locate_data_file OCC620a.brep] a
puts [checkshape a]
restore [locate_data_file OCC620b.brep] b
puts [checkshape b]
bop a b
if [catch { boptuc result } catch_result] {
puts "Faulty OCC620 : BOPTUC operation was made wrongly"
} else {
puts "OCC620 OK: BOPTUC operation works OK"
}
set square 1.15562e+06
set 2dviewer 0

35
tests/bugs/modalg/bug625 Executable file
View File

@ -0,0 +1,35 @@
puts "========================"
puts "OCC625"
puts "========================"
puts ""
###############################################################################
## Created filler looks strange (see attached picture) inspite of checkshapes told about correct source and result shapes.
###############################################################################
pload QAcommands
restore [locate_data_file OCC625.brep] a
puts [checkshape a]
vinit
tclean a
explode a e
blend res1 a 10 a_22 10 a_14
blend result res1 10 a_17 10 a_4
puts [checkshape result]
vinit
vdisplay result
vfit
vsetdispmode result 1
QAUpdateLights
set x_coord 116
set y_coord 252
checkcolor $x_coord $y_coord 0.82 0.58 0.09
set square 19977
set 3dviewer 1

25
tests/bugs/modalg/bug629 Executable file
View File

@ -0,0 +1,25 @@
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "================"
puts "OCC629"
puts "================"
puts ""
##########################################
## Exception during attempt to create solid by command PIPE
##########################################
restore [locate_data_file OCC629a.brep] a
puts [checkshape a]
restore [locate_data_file OCC629b.brep] b
puts [checkshape b]
if [catch {pipe result a b } catch_result] {
puts "Faulty OCC629: function PIPE works wrongly"
} else {
puts "OCC629 OK: function PIPE works properly"
}
set square 0
set 2dviewer 0

31
tests/bugs/modalg/bug636 Executable file
View File

@ -0,0 +1,31 @@
puts "================"
puts "OCC636"
puts "================"
puts ""
#####################################
## BRepOffsetAPI_MakePipeShell builds twisted pipe
#####################################
restore [locate_data_file OCC636a.brep] s
puts [checkshape s]
restore [locate_data_file OCC636b.brep] s1
puts [checkshape s1]
restore [locate_data_file OCC636c.brep] s2
puts [checkshape s2]
mksweep s
addsweep s1
addsweep s2
if [catch { buildsweep result } catch_result] {
puts "Faulty OCC636: function buildsweep works wrongly"
} else {
puts "OCC636 OK: function buildsweep works properly"
}
set square 3836.92
set 2dviewer 0

29
tests/bugs/modalg/bug637_1 Executable file
View File

@ -0,0 +1,29 @@
puts "================"
puts "OCC637"
puts "(case 1)"
puts "================"
puts ""
##########################################
## BRepOffsetAPI_MakePipeShell crashes with fatal exception
##########################################
restore [locate_data_file OCC637a.brep] s
puts [checkshape s]
restore [locate_data_file OCC636c.brep] s1
puts [checkshape s1]
restore [locate_data_file OCC637c.brep] s2
puts [checkshape s2]
mksweep s
addsweep s1
addsweep s2
if [catch { buildsweep result } catch_result] {
puts "Faulty OCC637 (case 1): function buildsweep works wrongly"
}
set square 1675.58
set 2dviewer 0

30
tests/bugs/modalg/bug637_2 Executable file
View File

@ -0,0 +1,30 @@
puts "================"
puts "OCC637"
puts "(case 2)"
puts "================"
puts ""
##########################################
## BRepOffsetAPI_MakePipeShell crashes with fatal exception
##########################################
restore [locate_data_file OCC637d.brep] s
puts [checkshape s]
restore [locate_data_file OCC637c.brep] s1
puts [checkshape s1]
restore [locate_data_file OCC637f.brep] s2
puts [checkshape s2]
mksweep s
addsweep s1
addsweep s2
if [catch {buildsweep result } catch_result] {
puts "Faulty OCC637 (case 2): function buildsweep works wrongly"
}
set square 1090.91
set 2dviewer 0

25
tests/bugs/modalg/bug673 Executable file
View File

@ -0,0 +1,25 @@
puts "TODO OCC12345 ALL: Error : The command can not be build"
puts "TODO OCC12345 ALL: Faulty OCC673: function SPLITSHAPE works wrongly"
puts "================"
puts "OCC673"
puts "================"
puts ""
#######################################################
## Exception is raised during splitting face by a wire laying on the face boundary.
#######################################################
restore [locate_data_file OCC673a.brep] a
puts [checkshape a]
restore [locate_data_file OCC673b.brep] b
puts [checkshape b]
if [catch {spliteshape result a a b} catch_result] {
puts "Faulty OCC673: function SPLITSHAPE works wrongly"
} else {
puts "OCC673 OK : function SPLITSHAPE works OK"
}
set square 0
set 2dviewer 0

79
tests/bugs/modalg/bug693 Executable file
View File

@ -0,0 +1,79 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is "
puts "================"
puts "OCC693"
puts "================"
puts ""
###################################################
## The boolean operations give incorrect result if one of shapes is compound
## consisting of several adjoint solids
####################################################
box h1 234 52 0 41 98 40
box v1 241 136 20 31 31 15
box h3 215 120 20 78 15 15
#mu4
#fit
compound h1 c1
compound v1 c2
tcopy c1 cc1
tcopy c2 cc2
bcommon int1 cc1 cc2
##########checkshape -top int1
puts [checkshape -top int1]
tcopy c1 cc1
tcopy c2 cc2
bcut cut1 cc1 cc2
puts [checkshape -top cut1]
tcopy c1 cc1
tcopy c2 cc2
bcut cut2 cc2 cc1
##########checkshape -top cut2
puts [checkshape -top cut2]
compound int1 cut1 cut2 comp3
##########checkshape -top comp3
puts [checkshape -top comp3]
#donly comp3
tcopy comp3 ccomp3
tcopy h3 ch3
bcommon int2 ccomp3 ch3
##########checkshape -top int2
puts [checkshape -top int2]
#donly int2
tcopy comp3 ccomp3
tcopy h3 ch3
bcut cut3 ccomp3 ch3
##########checkshape -top cut3
puts [checkshape -top cut3]
#donly cut3
tcopy comp3 ccomp3
tcopy h3 ch3
bcut cut4 ch3 ccomp3
##########checkshape -top cut4
puts [checkshape -top cut4]
compound int2 cut3 cut4 result
##########checkshape -top res
puts [checkshape -top result]
##########set che [checkshape -top res]
##########
##########set err [lindex $che [expr [llength $che] - 7]]
##########if { $err == "Faulty"} {
########## puts "Faulty OCC693"
##########} else {
########## puts "OCC693 OK "
##########}
set square 33196
set 2dviewer 0

25
tests/bugs/modalg/bug697_1 Executable file
View File

@ -0,0 +1,25 @@
puts "============"
puts "OCC697"
puts "============"
puts ""
######################################################
# Fuse operation does not work
######################################################
## (old topology)
## (fuse)
######################################################
restore [locate_data_file OCC697_1.brep] b1
restore [locate_data_file OCC697_2.brep] b2
puts [checkshape b1]
puts [checkshape b2]
##############################################
if { [catch {bfuse result b1 b2} catch_result] } {
##############################################
puts "Faulty : an exception was caught"
}
set square 8879.41
set 2dviewer 0

29
tests/bugs/modalg/bug697_2 Executable file
View File

@ -0,0 +1,29 @@
puts "============"
puts "OCC697"
puts "============"
puts ""
######################################################
# Fuse operation does not work
######################################################
## (old topology)
## (fuse)
######################################################
puts "#"
puts "Non stable test case on Linux. MKV. 28.04.2010"
puts "#"
restore [locate_data_file OCC697_2.brep] b2
restore [locate_data_file OCC697_3.brep] b3
puts [checkshape b2]
puts [checkshape b3]
##############################################
if { [catch {bfuse result b2 b3} catch_result] } {
##############################################
puts "Faulty : an exception was caught"
}
set square 25357.5
set 2dviewer 0

16
tests/bugs/modalg/bug698 Executable file
View File

@ -0,0 +1,16 @@
puts "======= OCC698 ======="
######################################
## Cut operation produces bad result on attached shapes
######################################
cpulimit 10000
restore [locate_data_file OCC698_1.brep] b4
puts [checkshape b4]
restore [locate_data_file OCC698_2.brep] b5
puts [checkshape b5]
bcut result b5 b4
set square 19048.2
set 2dviewer 0

25
tests/bugs/modalg/bug702 Executable file
View File

@ -0,0 +1,25 @@
puts "======="
puts "OCC702"
puts "SAM1541"
puts "======="
puts ""
########################
## No possibility to make a prism.
########################
restore [locate_data_file OCC702.brep] a
if [ catch { prism result a 100 100 100 } catch_result ] {
puts "Faulty OCC702 (case 1)"
} else {
regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full sq
if { $sq <= 0. } {
puts "Faulty OCC702 (case 2)"
} else {
puts "OCC702 OK"
}
}
set square 308957.
set 2dviewer 0

23
tests/bugs/modalg/bug712_1 Executable file
View File

@ -0,0 +1,23 @@
puts "========"
puts "OCC712"
puts "========"
puts ""
#########################################################
## Exeption is raised in DRAW during building draft with help command "depouille"
## on face in the attached shape.
#########################################################
restore [locate_data_file OCC712.brep] a
puts [checkshape a]
explode a f
if [catch {depouille result a 0 0 1 a_2 10 0 39.6875 0 0. 0. -1 } catch_result] {
puts "Faulty OCC712"
} else {
puts "OCC712 OK"
}
set square 41956.4
set 2dviewer 0

34
tests/bugs/modalg/bug714 Executable file
View File

@ -0,0 +1,34 @@
#INTERFACE IGES
puts "========"
puts "OCC714"
puts "========"
puts ""
####################################################
## After command sew in DRAW on attached shape free wires are disappeared.
####################################################
restore [locate_data_file OCC714.brep] a
puts [checkshape a]
set nb_info1 [nbshapes a]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info1 full ve1
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info1 full ed1
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info1 full we1
sewing result 0.1 a
set nb_info2 [nbshapes a]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info2 full ve2
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info2 full ed2
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info2 full we2
if { $ve1 != $ve2 || $ed1 != $ed2 || $we1 != $we2} {
puts [format "Faulty OCC714 : SEWING operation was made WRONGLY: vertexes before %s, edges before %s, wires before %s" $ve1 $ed1 $we1]
puts [format " vertexes after %s, edges after %s, wires after %s" $ve1 $ed1 $we1]
} else {
puts "OK OCC714: SEWING operation was made PROPERLY"
}
set square 12917.1
set 2dviewer 0

28
tests/bugs/modalg/bug715 Executable file
View File

@ -0,0 +1,28 @@
puts "========"
puts "OCC715"
puts "SAM1582"
puts "========"
puts ""
##########################################
## section of two faces produces wrong number of section edges
##########################################
restore [locate_data_file OCC715_2.brep] f2
restore [locate_data_file OCC715_3.brep] f3
bsection result f2 f3
set expl [explode result]
set length [llength $expl]
puts "Result is $length section edge"
if {$length != 3} {
puts "Faulty OCC715"
} else {
puts "OCC715 OK"
}
set length 100.
set 2dviewer 0

21
tests/bugs/modalg/bug726_1 Executable file
View File

@ -0,0 +1,21 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "========"
puts "OCC726"
puts "SAM1594"
puts "========"
puts ""
######################################
## Boolean operations are impossible on the attachment.
######################################
restore [locate_data_file OCC726.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcommon result a_1 a_2
set square 0
set 2dviewer 0

21
tests/bugs/modalg/bug726_2 Executable file
View File

@ -0,0 +1,21 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "========"
puts "OCC726"
puts "SAM1594"
puts "========"
puts ""
######################################
## Boolean operations are impossible on the attachment.
######################################
restore [locate_data_file OCC726.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcut result a_1 a_2
set square 0
set 2dviewer 0

42
tests/bugs/modalg/bug743 Executable file
View File

@ -0,0 +1,42 @@
puts "========"
puts "OCC743"
puts "========"
puts ""
#######################################
## The result of offset operation on a planar wire is wrong
#######################################
restore [locate_data_file OCC743_corr2.brep] a
puts [checkshape a]
if { [catch { mkoffset result a 1 -15 } status] } {
puts "Faulty OCC743"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 3533.52
set 2dviewer 0

44
tests/bugs/modalg/bug745_1 Executable file
View File

@ -0,0 +1,44 @@
puts "========"
puts "OCC745"
puts "========"
puts ""
#######################################################
## There are several cases where the offset algo works wrong for various reasons
## for wires containing only linear segments and arcs of circle.
#######################################################
restore [locate_data_file OCC745_1.brep] a
puts [checkshape a]
if { [catch { mkoffset result a 1 -10 } status] } {
puts "Faulty : an exception was caught"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 932.825
set 2dviewer 0

27
tests/bugs/modalg/bug745_10 Executable file
View File

@ -0,0 +1,27 @@
puts "TODO OCC12345 ALL: Faulty OCC745"
puts "TODO OCC12345 ALL: Error : The length of result shape is"
puts "========"
puts "OCC745"
puts "========"
puts ""
#############################################
# Negative offset parameter leads to positive offset and vise
# versa. Result of the offset represent an edge instead of wire.
#############################################
restore [locate_data_file OCC745_nb1.brep] w
mkoffset result w 1 -1
set list [whatis result_1]
if { [regexp {WIRE} $list] == 0 } {
puts "Faulty OCC745"
} else {
puts "OCC745 OK"
}
renamevar result_1 result
set length 0
set 2dviewer 0

52
tests/bugs/modalg/bug745_11 Executable file
View File

@ -0,0 +1,52 @@
puts "========"
puts "OCC745"
puts "========"
puts ""
#########################
# Not correct creation of bisector loci.
#########################
restore [locate_data_file OCC745_nb2.brep] w
mkplane f w
topoload f
drawcont
mat
result
##################################################
#Exception thrown: Standard_ConstructionError: Offset wire is not closed.
##################################################
if { [catch { mkoffset result w 10 -7 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 1930.99
set 2dviewer 0

47
tests/bugs/modalg/bug745_12 Executable file
View File

@ -0,0 +1,47 @@
puts "TODO OCC12345 ALL: An exception was caught"
puts "TODO OCC12345 ALL: Exception "
puts "TODO OCC12345 ALL: Faulty OCC745"
puts "TODO OCC12345 ALL: Error : The command can not be build."
puts "========"
puts "OCC745"
puts "========"
puts ""
##################################################
# Exception thrown: Standard_ConstructionError: Offset wire is not closed.
##################################################
restore [locate_data_file OCC745_nb3.brep] w
puts [checkshape w]
if { [catch { mkoffset result w 1 10 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 0
set 2dviewer 0

26
tests/bugs/modalg/bug745_2 Executable file
View File

@ -0,0 +1,26 @@
puts "========"
puts "OCC745"
puts "========"
puts ""
##################################################
## This test does not terminate due to infinite loop in bissector calculation
##################################################
restore [locate_data_file OCC745_2.brep] a
puts [checkshape a]
mkplane pl a
topoload pl
drawcont
smallview -2D-
2dfit
set min 30
cpulimit [expr 60 * $min]
mat
puts "OCC745 OK"
renamevar pl result
set square 5844.55
set 2dviewer 0

49
tests/bugs/modalg/bug745_4 Executable file
View File

@ -0,0 +1,49 @@
puts "TODO OCC12345 ALL: Faulty : Result shape is NULL shape"
puts "TODO OCC12345 ALL: Exception: result is not a topological shape!!!"
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
pload QAcommands
puts "========"
puts "OCC745"
puts "========"
puts ""
###########################################
# Exception Standard_NullValue while performing the offset:
###########################################
restore [locate_data_file OCC745_pocket1.brep] a
puts [checkshape a]
if { [catch { mkoffset result a 1 -10 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
set ve 0
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 0
set 2dviewer 0

46
tests/bugs/modalg/bug745_6 Executable file
View File

@ -0,0 +1,46 @@
puts "TODO OCC12345 ALL: Faulty : Result shape is NULL shape"
puts "TODO OCC12345 ALL: Error : The command is not valid. The length is"
puts "========"
puts "OCC745"
puts "BUC60878"
puts "========"
puts ""
################################
# There are discontinuities in offset contours:
################################
restore [locate_data_file BUC60878-wire3.brep] a
puts [checkshape a]
if { [catch { mkoffset result a 1 -10 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 0
set 2dviewer 0

45
tests/bugs/modalg/bug745_7 Executable file
View File

@ -0,0 +1,45 @@
puts "TODO OCC12345 ALL: Faulty : Result shape is NULL shape"
puts "TODO OCC12345 ALL: Error : The command is not valid. The length is"
puts "========"
puts "OCC745"
puts "========"
puts ""
######################################################
## Exception thrown: Standard_ConstructionError: Offset wire is not closed:
######################################################
source [locate_data_file OCC745_cont1.dat]
puts [checkshape pp]
if { [catch { mkoffset result pp 1 -10 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 0
set 2dviewer 0

43
tests/bugs/modalg/bug745_8 Executable file
View File

@ -0,0 +1,43 @@
puts "========"
puts "OCC745"
puts "========"
puts ""
###################################################
## Exception thrown: Standard_ConstructionError: Offset wire is not closed:
###################################################
restore [locate_data_file BUC60830-face2.brep] f
puts [checkshape f]
if { [catch { mkoffset result f 45 -0.042225 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 72.1851
set 2dviewer 0

45
tests/bugs/modalg/bug745_9 Executable file
View File

@ -0,0 +1,45 @@
puts "TODO OCC12345 ALL: Error : The command is not valid. The length is"
puts "TODO OCC12345 ALL: Faulty : Result shape is NULL shape"
puts "========"
puts "OCC745"
puts "========"
puts ""
#####################################################
# The latter command enters an endless loop: it was not completed in 30 min:
#####################################################
source [locate_data_file OCC745_cont2.dat]
puts [checkshape pq]
if { [catch { mkoffset result pq 1 -10 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
puts [checkshape $k]
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
set length 0
set 2dviewer 0

18
tests/bugs/modalg/bug748 Executable file
View File

@ -0,0 +1,18 @@
puts "========"
puts "OCC748"
puts "========"
puts ""
##################################
## Incorrect work of DRAW-command "common"
##################################
restore [locate_data_file OCC748_1.brep] s1
puts [checkshape s1]
restore [locate_data_file OCC748_2.brep] s2
puts [checkshape s2]
bcommon result s1 s2
set square 628.319
set 2dviewer 0

34
tests/bugs/modalg/bug755_1 Executable file
View File

@ -0,0 +1,34 @@
puts "========"
puts "OCC755"
puts "SAM1607"
puts "(case 1)"
puts "========"
puts ""
####################################################################
##Result of cut of capteur2 from capteur1 is a solid. It must be a compound, as it consists of 2 bodies.
####################################################################
restore [locate_data_file OCC755_1.brep] a1
puts [checkshape a1]
restore [locate_data_file OCC755_2.brep] a2
puts [checkshape a2]
bcut result a1 a2
set wt_is [whatis result]
set lth [llength $wt_is]
if {$lth < 5} {
puts "Faulty OCC755 (case 1)"
} else {
if {[regexp {COMPOUND} $wt_is] == 1} {
puts "OCC755 OK (case 2)"
} else {
puts "Faulty OCC755 (case 2)"
}
}
set square 1.57358e+06
set 2dviewer 0

26
tests/bugs/modalg/bug758 Executable file
View File

@ -0,0 +1,26 @@
puts "========"
puts "OCC758"
puts "SAM1613"
puts "========"
puts ""
###################################################
##It's impossible to cut two little shapes from the big one in the attached file.
###################################################
restore [locate_data_file OCC758.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
puts [checkshape a_3]
bcut res1 a_1 a_2
puts [checkshape res1]
bcut result res1 a_3
set square 49473.6
set 2dviewer 0

20
tests/bugs/modalg/bug763 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC763"
puts "========"
puts ""
####################################
## Bad result of fuse operation between two cylinders
####################################
restore [locate_data_file OCC763_c1.brep] c1
puts [checkshape c1]
restore [locate_data_file OCC763_c2.brep] c2
puts [checkshape c2]
bop c1 c2
bopfuse result
set square 23189.4
set 2dviewer 0

15
tests/bugs/modalg/bug767 Executable file
View File

@ -0,0 +1,15 @@
puts "======="
puts "OCC767"
puts "======="
puts ""
############################################
## Command sameparametr in DRAW hangs on attached edge.
############################################
restore [locate_data_file OCC767.brep] result
sameparameter result
set length 7.6901
set 2dviewer 0

26
tests/bugs/modalg/bug770 Executable file
View File

@ -0,0 +1,26 @@
puts "TODO ?OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
puts "========"
puts "OCC770"
puts "SAM1636"
puts "========"
puts ""
############################
## Impossible fusing 3 attached shapes
############################
restore [locate_data_file OCC770.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
puts [checkshape a_3]
bfuse res1 a_1 a_2
puts [checkshape res1]
bfuse result res1 a_3
set square 962546.
set 2dviewer 0

25
tests/bugs/modalg/bug771 Executable file
View File

@ -0,0 +1,25 @@
puts "========"
puts "OCC771"
puts "SAM1639"
puts "========"
puts ""
###########################
## Impossible fusung 3 shapes attached
###########################
restore [locate_data_file OCC771.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
puts [checkshape a_3]
bfuse res1 a_1 a_2
puts [checkshape res1]
bfuse result res1 a_3
set square 1306.68
set 2dviewer 0

21
tests/bugs/modalg/bug772 Executable file
View File

@ -0,0 +1,21 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "========"
puts "OCC772"
puts "SAM1643"
puts "========"
puts ""
######################################
## Impossible to make a common of the shapes attached.
######################################
restore [locate_data_file OCC772.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcommon result a_1 a_2
set square 0
set 2dviewer 0

22
tests/bugs/modalg/bug774_1 Executable file
View File

@ -0,0 +1,22 @@
puts "========"
puts "OCC774"
puts "SAM1647"
puts "(case 1)"
puts "========"
puts ""
#################################
## It's impossible to cut one shape from another.
#################################
restore [locate_data_file OCC774.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
if { [catch { bcut result a_1 a_2 } status] } {
puts "Faulty OCC774 (case 1)"
}
set square 50704.6
set 2dviewer 0

22
tests/bugs/modalg/bug774_2 Executable file
View File

@ -0,0 +1,22 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
puts "========"
puts "OCC774"
puts "SAM1647"
puts "(case 2)"
puts "========"
puts ""
#################################
##
restore [locate_data_file OCC774.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
if { [catch { bcut result a_2 a_1 } status] } {
puts "Faulty OCC774 (case 2)"
}
set square 0
set 2dviewer 0

19
tests/bugs/modalg/bug775 Executable file
View File

@ -0,0 +1,19 @@
puts "========"
puts "OCC775"
puts "SAM1650"
puts "========"
puts ""
#############################
## Impossible to fuse two attached shapes.
#############################
restore [locate_data_file OCC775.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bfuse result a_1 a_2
set square 61146.4
set 2dviewer 0

20
tests/bugs/modalg/bug776_1 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC776"
puts "SAM1654"
puts "(case 1)"
puts "========"
puts ""
##########################################
## Impossible to cut one shape from another in the attachment
##########################################
restore [locate_data_file OCC776.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcut result a_1 a_2
set square 112637.
set 2dviewer 0

20
tests/bugs/modalg/bug776_2 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC776"
puts "SAM1654"
puts "(case 2)"
puts "========"
puts ""
##########################################
## Impossible to cut one shape from another in the attachment
##########################################
restore [locate_data_file OCC776.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcut result a_2 a_1
set square 40403.2
set 2dviewer 0

20
tests/bugs/modalg/bug778_1 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC778"
puts "SAM1656"
puts "(case 1)"
puts "========"
puts ""
######################################
## Incorrect result of cut of the cylinder from the shape.
######################################
restore [locate_data_file OCC778.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcut result a_1 a_2
set square 13633.6
set 2dviewer 0

20
tests/bugs/modalg/bug778_2 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC778"
puts "SAM1656"
puts "(case 2)"
puts "========"
puts ""
#####################################
## Incorrect result of cut of the cylinder from the shape
#####################################
restore [locate_data_file OCC778.brep] a
explode a
puts [checkshape a_1]
puts [checkshape a_2]
bcut result a_2 a_1
set square 678.584
set 2dviewer 0

22
tests/bugs/modalg/bug779 Executable file
View File

@ -0,0 +1,22 @@
puts "========"
puts "OCC779"
puts "========"
puts ""
################################
## Common operation produces invalid shape
################################
restore [locate_data_file OCC779_s1.brep] s1
puts [checkshape s1]
restore [locate_data_file OCC779_s2.brep] s2
puts [checkshape s2]
ttranslate s1 0 0 -30
prism s1p s1 0 0 70
puts [checkshape s1p]
bcommon result s1p s2
set square 64191.2
set 2dviewer 0

20
tests/bugs/modalg/bug780_1 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC780"
puts "SAM1239"
puts "(case 1)"
puts "========"
puts ""
#########################################
## Fuse and common between two faces are wrong (SAM1239)
#########################################
restore [locate_data_file OCC780.brep] f
explode f f
puts [checkshape f_1]
puts [checkshape f_2]
bcommon result f_1 f_2
set square 6283.19
set 2dviewer 0

20
tests/bugs/modalg/bug780_2 Executable file
View File

@ -0,0 +1,20 @@
puts "========"
puts "OCC780"
puts "SAM1239"
puts "(case 2)"
puts "========"
puts ""
#########################################
## Fuse and common between two faces are wrong (SAM1239)
#########################################
restore [locate_data_file OCC780.brep] f
explode f f
puts [checkshape f_1]
puts [checkshape f_2]
bfuse result f_1 f_2
set square 12566.4
set 2dviewer 0

20
tests/bugs/modalg/bug788_1 Executable file
View File

@ -0,0 +1,20 @@
puts "========="
puts " OCC788 "
puts "========="
puts ""
#################################################
## ThruSection cannot determine correctly correspondence between wires
#################################################
restore [locate_data_file OCC788_s1w.brep] w1
explode w1
wire ww1 w1_1
restore [locate_data_file OCC788_s2w.brep] w2
explode w2
wire ww2 w2_1
thrusections result 0 0 ww1 ww2
set 2dviewer 0
set square 148608.

24
tests/bugs/modalg/bug788_2 Executable file
View File

@ -0,0 +1,24 @@
puts "========="
puts " OCC788 "
puts "========="
puts ""
##################################################
## ThruSection cannot determine correctly correspondence between wires
##################################################
restore [locate_data_file OCC788_s1w.brep] w1
explode w1
wire ww1 w1_1
restore [locate_data_file OCC788_s2w.brep] w2
explode w2
wire ww2 w2_1
thrusections result 0 0 ww1 ww2
puts "It necessary to analyse the photo"
set 2dviewer 0
set square 148608.

25
tests/bugs/modalg/bug789 Executable file
View File

@ -0,0 +1,25 @@
puts "========="
puts " OCC789 "
puts "========="
puts ""
########################################################
## When working on 2 closed wires (each of 1 edge), the thrusection algorithm creates
## a surface with isolines which oscillate in longitudinal direction somewhere in the
## middle between end sections.
########################################################
restore [locate_data_file OCC789_s3.brep] w1
explode w1
wire ww1 w1_1
restore [locate_data_file OCC789_s4.brep] w2
explode w2
wire ww2 w2_1
thrusections result 0 0 ww1 ww2
puts "It necessary to analyse the photo"
set square 142424.
set 2dviewer 0

28
tests/bugs/modalg/bug794 Executable file
View File

@ -0,0 +1,28 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "========="
puts " OCC794 "
puts "========="
puts ""
#####################################################
## The offset algorithm produced invalid result when offseting an attached face
#####################################################
pload QAcommands
restore [locate_data_file OCC794.brep] a
offsetshape result a 10
set x_coord 120
set y_coord 150
vinit
vdisplay result
vsetdispmode 1
vfit
QAUpdateLights
checkcolor $x_coord $y_coord 0.77 0.54 0.09
set square 206399
set 3dviewer 1

25
tests/bugs/modalg/bug822_1 Executable file
View File

@ -0,0 +1,25 @@
pload QAcommands
puts "========"
puts "OCC822"
puts "========"
puts ""
#####################################
## BRepMesh_IncrementalMesh fails on some faces
#####################################
if { [ catch { set info_result [OCC822_1 a1 a2 result] } ] } {
puts "Faulty : an exception was caught"
} else {
if { [lsearch ${info_result} FAILED] > -1 } {
puts "Faulty : command was FAILED"
}
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 133931
set 2dviewer 0

25
tests/bugs/modalg/bug822_2 Executable file
View File

@ -0,0 +1,25 @@
pload QAcommands
puts "======="
puts "OCC822"
puts "======="
puts ""
#####################################
## BRepMesh_IncrementalMesh fails on some faces
#####################################
if { [ catch { set info_result [OCC822_2 a1 a2 result] } ] } {
puts "Faulty : an exception was caught"
} else {
if { [lsearch ${info_result} FAILED] > -1} {
puts "Faulty : commands was FAILED"
}
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 61963.5
set 2dviewer 0

26
tests/bugs/modalg/bug823 Executable file
View File

@ -0,0 +1,26 @@
pload QAcommands
puts "======="
puts "OCC823"
puts "======="
puts ""
###############################
## BRepAlgoAPI_Fuse fails on two cylinders
###############################
if { [ catch { set info_result [OCC823 a1 a2 result] } ] } {
puts "Faulty : an exception was caught"
} else {
if { [lsearch ${info_result} FAILED] > -1} {
puts "Faulty : commands was FAILED"
}
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 23189.5
set 2dviewer 0

30
tests/bugs/modalg/bug823_1 Executable file
View File

@ -0,0 +1,30 @@
pload QAcommands
puts "============"
puts "OCC823"
puts "============"
puts ""
################################
## BRepAlgoAPI_Fuse fails on two cylinders
################################
##
## Note: test for old topology
##
################################
if { [ catch { set info_result [OCC823 a1 a2 a3] } ] } {
puts "Faulty : exception was caught"
} else {
puts [checkshape a1]
puts [checkshape a2]
bfuse result a1 a2
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 23189.5
set 2dviewer 0

25
tests/bugs/modalg/bug824 Executable file
View File

@ -0,0 +1,25 @@
pload QAcommands
puts "============"
puts "OCC824"
puts "============"
puts ""
####################################
## BRepAlgoAPI_Fuse fails on cylinder and sphere
####################################
if { [ catch { set info_result [OCC824 a1 a2 result] } ] } {
puts "Faulty : an exception was caught"
} else {
if { [lsearch ${result} FAILED] > -1} {
puts "Faulty : command was FAILED"
}
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 16336.3
set 2dviewer 0

30
tests/bugs/modalg/bug824_1 Executable file
View File

@ -0,0 +1,30 @@
pload QAcommands
puts "======="
puts "OCC824"
puts "======="
puts ""
####################################
## BRepAlgoAPI_Fuse fails on cylinder and sphere
####################################
##
## Note: test for old topology
##
################################
if { [ catch { set info_result [OCC824 a1 a2 a3] } ] } {
puts "Faulty : exception was catch"
} else {
puts [checkshape a1]
puts [checkshape a2]
bfuse result a1 a2
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 16336.3
set 2dviewer 0

37
tests/bugs/modalg/bug825 Executable file
View File

@ -0,0 +1,37 @@
puts "TODO OCC12345 ALL: Faulty : command was FAILED"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
pload QAcommands
puts "============"
puts "OCC825"
puts "============"
puts ""
######################################
## BRepAlgoAPI_Cut fails on sphere and b-spline face
######################################
if { [ catch { set info_result [OCC825 a1 a2 a3 result1 result2] } ] } {
puts "Faulty : an exception was caught"
} else {
if { [lsearch ${info_result} FAILED] > -1} {
puts "Faulty : command was FAILED"
}
puts [checkshape result1]
puts [checkshape result2]
set ExplodeList [explode result1]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
set ExplodeList [explode result2]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
renamevar result1 result
}
set square 0
set 2dviewer 0

31
tests/bugs/modalg/bug825_1 Executable file
View File

@ -0,0 +1,31 @@
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO OCC12345 ALL: Error : The square of result shape is"
pload QAcommands
puts "======="
puts "OCC825"
puts "======="
puts ""
######################################
## BRepAlgoAPI_Cut fails on sphere and b-spline face
######################################
##
## Note: test for old topology
##
################################
if { [ catch { set info_result [OCC825 a1 a2 a3 a4 a5] } ] } {
puts "Faulty : an exception was caught"
} else {
puts [checkshape a1]
puts [checkshape a2]
bcut result a2 a1
set ExplodeList [explode result]
if {[llength ${ExplodeList}] < 1} {
puts "Faulty : Resulting shape is empty COMPOUND"
}
}
set square 0
set 2dviewer 0

Some files were not shown because too many files have changed in this diff Show More