mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Adding test cases from grid chl
This commit is contained in:
parent
8a262fa13d
commit
a87752f31e
9
tests/bugs/caf/begin
Executable file
9
tests/bugs/caf/begin
Executable file
@ -0,0 +1,9 @@
|
||||
pload DCAF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
16
tests/bugs/caf/buc60756
Executable file
16
tests/bugs/caf/buc60756
Executable file
@ -0,0 +1,16 @@
|
||||
puts "==========="
|
||||
puts "BUC60756"
|
||||
puts "BUC60761"
|
||||
puts "BUC60762"
|
||||
puts "BUC60764"
|
||||
puts "==========="
|
||||
|
||||
Open [locate_data_file BUC60756_Doc.std] D
|
||||
|
||||
######################################################################
|
||||
catch {file delete ${imagedir}/Doc2.std}
|
||||
|
||||
SaveAs D ${imagedir}/Doc2.std
|
||||
Close D
|
||||
Open ${imagedir}/Doc2.std D
|
||||
|
15
tests/bugs/caf/buc60790
Executable file
15
tests/bugs/caf/buc60790
Executable file
@ -0,0 +1,15 @@
|
||||
puts "==========="
|
||||
puts "BUC60790"
|
||||
puts "BUC60836"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
set ResultError [BUC60836 D]
|
||||
if {${ResultError} != 0 } {
|
||||
puts "BUC60790: Error = $ResultError"
|
||||
}
|
||||
|
30
tests/bugs/caf/buc60813
Executable file
30
tests/bugs/caf/buc60813
Executable file
@ -0,0 +1,30 @@
|
||||
puts "==========="
|
||||
puts "BUC60813"
|
||||
puts "==========="
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
Label D 0:1
|
||||
|
||||
SetName D 0:1 SourceLabel
|
||||
SetReal D 0:1 3.1415
|
||||
|
||||
set Result [CopyLabel D 0:1 0:2]
|
||||
if { ${Result} == 0} {
|
||||
puts "BUC60813: Error 1"
|
||||
} else {
|
||||
set Name [GetName D 0:2]
|
||||
if { [string length ${Name}] == 0 } {
|
||||
puts "BUC60813: Error 2"
|
||||
} else {
|
||||
set Result [CopyLabel D 0:2 0:3]
|
||||
if { ${Result} == 0 } {
|
||||
puts "BUC60813: Error 3"
|
||||
} else {
|
||||
puts "BUC60813: OK"
|
||||
}
|
||||
}
|
||||
}
|
16
tests/bugs/caf/buc60817
Executable file
16
tests/bugs/caf/buc60817
Executable file
@ -0,0 +1,16 @@
|
||||
puts "==========="
|
||||
puts "BUC60817"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
set ResultError [BUC60817 D]
|
||||
if { ${ResultError} != 0 } {
|
||||
puts "BUC60817: Error = $ResultError"
|
||||
}
|
||||
|
50
tests/bugs/caf/buc60831
Executable file
50
tests/bugs/caf/buc60831
Executable file
@ -0,0 +1,50 @@
|
||||
puts "==========="
|
||||
puts "BUC60831"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
set L 0:3
|
||||
Label D $L
|
||||
|
||||
set Status 0
|
||||
|
||||
set Result [BUC60831_1 D]
|
||||
if { ${Result} != 0 } {
|
||||
puts "BUC60831: Error 1"
|
||||
set Status 1
|
||||
}
|
||||
|
||||
NewCommand D
|
||||
|
||||
set Result [BUC60831_2 D $L]
|
||||
if { ${Result} != 0 } {
|
||||
puts "BUC60831: Error 2"
|
||||
set Status 1
|
||||
}
|
||||
|
||||
set Result [BUC60831_1 D]
|
||||
if { ${Result} != 1 } {
|
||||
puts "BUC60831: Error 3"
|
||||
set Status 1
|
||||
}
|
||||
|
||||
NewCommand D
|
||||
|
||||
Undo D
|
||||
|
||||
set Result [BUC60831_1 D]
|
||||
if { ${Result} != 0 } {
|
||||
puts "BUC60831: Error 4"
|
||||
set Status 1
|
||||
}
|
||||
|
||||
if { ${Status} != 0} then {
|
||||
puts "BUC60831: Error"
|
||||
}
|
||||
|
39
tests/bugs/caf/buc60844
Executable file
39
tests/bugs/caf/buc60844
Executable file
@ -0,0 +1,39 @@
|
||||
puts "==========="
|
||||
puts "BUC60844"
|
||||
puts "BUC60845"
|
||||
puts "==========="
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
Label D 0:2
|
||||
Label D 0:2:1
|
||||
Label D 0:2:1:1
|
||||
Label D 0:2:1:2
|
||||
Label D 0:3
|
||||
|
||||
SetNode D 0:1
|
||||
SetNode D 0:2
|
||||
SetNode D 0:2:1
|
||||
SetNode D 0:2:1:1
|
||||
SetNode D 0:2:1:2
|
||||
SetNode D 0:3
|
||||
|
||||
InsertNodeAfter D 0:1 0:2
|
||||
InsertNodeAfter D 0:2 0:3
|
||||
|
||||
AppendNode D 0:2 0:2:1
|
||||
|
||||
AppendNode D 0:2:1 0:2:1:1
|
||||
InsertNodeAfter D 0:2:1:1 0:2:1:2
|
||||
|
||||
NewCommand D
|
||||
|
||||
ForgetAll D 0:2:1
|
||||
|
||||
NewCommand D
|
||||
|
||||
Undo D
|
||||
|
||||
|
37
tests/bugs/caf/buc60846
Executable file
37
tests/bugs/caf/buc60846
Executable file
@ -0,0 +1,37 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : Present script does not work currently !!! SKETCH application is missing"
|
||||
puts "TODO OCC12345 ALL: Tcl Exception"
|
||||
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "==========="
|
||||
puts "BUC60846"
|
||||
puts "==========="
|
||||
|
||||
puts "Faulty : Present script does not work currently !!! SKETCH application is missing"
|
||||
##############################################################
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
Label D 0:3
|
||||
NewSketch D 0:3 0 0 0 1 0 0
|
||||
Point D 0:3 10 20
|
||||
Point D 0:3 11 20
|
||||
Segment D 0:3 0:3:2:3 0:3:2:4
|
||||
|
||||
Point D 0:3 10 21
|
||||
Point D 0:3 11 21
|
||||
Segment D 0:3 0:3:2:9 0:3:2:10
|
||||
|
||||
Distance D 0:3 0:3:2:5 0:3:2:11
|
||||
|
||||
AISInitViewer D
|
||||
|
||||
AISSet D 0:3:2:15 C
|
||||
|
||||
AISDisplay D 0:3:2:15
|
||||
|
||||
NewCommand D
|
||||
|
||||
|
18
tests/bugs/caf/buc60847
Executable file
18
tests/bugs/caf/buc60847
Executable file
@ -0,0 +1,18 @@
|
||||
puts "==========="
|
||||
puts "BUC60847"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
box Shape 10 20 30
|
||||
|
||||
set ResultError [BUC60847 D Shape]
|
||||
if { ${ResultError} != 0 } {
|
||||
puts "BUC60847: Error = $ResultError"
|
||||
}
|
||||
|
21
tests/bugs/caf/buc60862
Executable file
21
tests/bugs/caf/buc60862
Executable file
@ -0,0 +1,21 @@
|
||||
puts "==========="
|
||||
puts "BUC60862"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
vertex V1 10 20 0
|
||||
vertex V2 20 10 0
|
||||
|
||||
catch {edge Shape ${V1} ${V2}}
|
||||
catch {set ResultError [BUC60862 D $Shape]}
|
||||
|
||||
if { ${ResultError} != 0 } {
|
||||
puts "BUC60862: Error = $ResultError"
|
||||
}
|
||||
|
12
tests/bugs/caf/buc60867
Executable file
12
tests/bugs/caf/buc60867
Executable file
@ -0,0 +1,12 @@
|
||||
puts "==========="
|
||||
puts "BUC60867"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
set ResultError [ BUC60867 [locate_data_file BUC60756_Doc.std] ]
|
||||
|
||||
if { [regexp "0" $ResultError] != 1 } {
|
||||
puts "Error : 1"
|
||||
}
|
||||
|
19
tests/bugs/caf/buc60910
Executable file
19
tests/bugs/caf/buc60910
Executable file
@ -0,0 +1,19 @@
|
||||
puts "==========="
|
||||
puts "BUC60910"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
set ResultError [BUC60910 D]
|
||||
if { ${ResultError} != 0 } {
|
||||
puts "Error : 1"
|
||||
}
|
||||
|
||||
NewCommand D
|
||||
|
||||
|
58
tests/bugs/caf/buc60917
Executable file
58
tests/bugs/caf/buc60917
Executable file
@ -0,0 +1,58 @@
|
||||
puts "==========="
|
||||
puts "BUC60917"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
box b 10 10 10
|
||||
SetShape D 0:1:1 b
|
||||
|
||||
AISInitViewer D
|
||||
|
||||
OpenCommand D
|
||||
|
||||
AISSet D 0:1:1 NS
|
||||
AISWidth D 0:1:1 1.0
|
||||
set W [AISWidth D 0:1:1]
|
||||
if { ${W} != 1 } {
|
||||
puts "Error : 1"
|
||||
} else {
|
||||
AISDisplay D 0:1:1
|
||||
vfit
|
||||
CommitCommand D
|
||||
|
||||
puts "Doing Undo... "
|
||||
|
||||
Undo D
|
||||
AISRepaint D
|
||||
AISRepaint D
|
||||
|
||||
puts "And now, look: Redo!"
|
||||
|
||||
Redo D
|
||||
AISRepaint D
|
||||
|
||||
set W [AISWidth D 0:1:1]
|
||||
if { ${W} != 1 } {
|
||||
puts "Error : 2"
|
||||
}
|
||||
}
|
||||
|
||||
set 3dviewer 2
|
||||
|
||||
|
||||
|
||||
|
||||
# This TCL script demonstrates bug in AIS/OCAF viewer
|
||||
#
|
||||
# It needs an additional DRAW command to be defined for
|
||||
# setting Width parameter of TPrsStd_AISPresentation attribute.
|
||||
# The code for this command (AISWidth) is provided separately.
|
||||
#
|
||||
# The problem is that when width is set to AISPresentation attribute
|
||||
# and Undo/redo are made, this causes error 'width is 0' in the viewer.
|
||||
# It seems that width is not kept during Undo/Redo operations.
|
||||
|
79
tests/bugs/caf/buc60921
Executable file
79
tests/bugs/caf/buc60921
Executable file
@ -0,0 +1,79 @@
|
||||
puts "==========="
|
||||
puts "BUC60921"
|
||||
puts "BUC60954"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
# see end of script!
|
||||
#set EXEID TCAF
|
||||
set EXEID DRAWEXE
|
||||
set BREP [locate_data_file BUC60921.brep]
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
set MemoryLeakage 0
|
||||
set i_max 10
|
||||
set IsFirstTime 1
|
||||
for {set i 1} {$i <= ${i_max}} {incr i} {
|
||||
CommitCommand D
|
||||
OpenCommand D
|
||||
BUC60921 D 0:1:1 $BREP
|
||||
|
||||
catch {exec ps -e -o vsz,comm | grep $EXEID } res
|
||||
puts "Iteration $i: virtual memory consumption = $res"
|
||||
set Mem1 [lindex ${res} 0]
|
||||
if { ${IsFirstTime} == 1} {
|
||||
set Mem0 ${Mem1}
|
||||
set IsFirstTime 0
|
||||
}
|
||||
CommitCommand D
|
||||
OpenCommand D
|
||||
Undo D
|
||||
catch {exec ps -e -o vsz,comm | grep $EXEID } res
|
||||
puts "Iteration $i: virtual memory consumption = $res"
|
||||
set Mem2 [lindex ${res} 0]
|
||||
set Delta [expr abs(${Mem2} - ${Mem1})]
|
||||
set MemoryLeakage [expr ${MemoryLeakage} + ${Delta}]
|
||||
puts " ${i} delta memory consumed: ${Delta} KB"
|
||||
}
|
||||
|
||||
set percent_max 5
|
||||
set percent [expr ${MemoryLeakage} / (double(${i_max}) * ${Mem0} ) * 100.]
|
||||
puts "percent = ${percent}"
|
||||
|
||||
if {${percent} > ${percent_max}} {
|
||||
puts "BUC60921: Error . There is memory leakage during Undo/Redo"
|
||||
} else {
|
||||
puts "BUC60921: OK"
|
||||
}
|
||||
|
||||
|
||||
# This TCL script demonstrates memory leak in OCAF Undo/Redo
|
||||
#
|
||||
# The DRAW command TestOCAF (provided separately) just reads
|
||||
# the specified brep file
|
||||
# and puts it into the document on a given label.
|
||||
# This operation is done and undone several times,
|
||||
# and the problem is that each time additional memory
|
||||
# (approximately equivalent to the size of shape)
|
||||
# is consumed.
|
||||
#
|
||||
# While obviously it should not be so: even if Undo keeps the
|
||||
# shape in memory as delta on Redo, this delta should be cleared
|
||||
# by the next operation!
|
||||
#
|
||||
# The bug persists with any setting of variables MMGT_OPT and MMGT_MMAP
|
||||
# (while with different initial size and step) and
|
||||
#
|
||||
# It seems that either delta is not completely freed, or some
|
||||
# other data structures keep the shape memory
|
||||
|
||||
#================================================
|
||||
# The two settings below are necessary to localize the script in order
|
||||
# to identify DRAW process among others, and to define path to BREP file
|
||||
# The BREP file should be big anough (>= 1Mb recommended)
|
||||
set EXEID QATCAF
|
||||
set BREP /users/det/files/GEAR.brep
|
||||
#================================================
|
19
tests/bugs/caf/buc60925
Executable file
19
tests/bugs/caf/buc60925
Executable file
@ -0,0 +1,19 @@
|
||||
puts "==========="
|
||||
puts "BUC60925"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
NewCommand D
|
||||
|
||||
set ResultError [BUC60925 D]
|
||||
if { ${ResultError} != 0 } {
|
||||
puts "Error : 1"
|
||||
}
|
||||
|
||||
NewCommand D
|
||||
|
||||
|
63
tests/bugs/caf/bug114
Executable file
63
tests/bugs/caf/bug114
Executable file
@ -0,0 +1,63 @@
|
||||
puts "==========="
|
||||
puts "OCC114"
|
||||
puts "==========="
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
####### Setting value of memory leakage in percents of memory allocated by shape
|
||||
set percent_max 10
|
||||
puts "Max memory leakage is $percent_max%"
|
||||
####### Setting amount of iterations for computing leackage
|
||||
set i_max 20
|
||||
puts "Amount of iterations is $i_max"
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
if ![string compare $tcl_platform(platform) "windows"] {
|
||||
proc VMem { memory } {
|
||||
upvar $memory mem
|
||||
regsub "^.*PeakVirtualSize: *\(\[0-9\]*\) KB.*$" \
|
||||
[exec tlist [pid]] "\\1" mem
|
||||
}
|
||||
} else {
|
||||
proc VMem { memory } {
|
||||
upvar $memory mem
|
||||
set mem [lindex [exec ps -o vsz -p [pid]] 1]
|
||||
}
|
||||
}
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
|
||||
VMem Mem0
|
||||
restore [locate_data_file OCC114.brep] s
|
||||
VMem Mem1
|
||||
#puts "... The peak memory consumed: [expr $Mem1 - $Mem0] KB"
|
||||
|
||||
set MemoryLeakage 0
|
||||
|
||||
for {set i 1} {${i} <= ${i_max}} {incr i} {
|
||||
|
||||
OpenCommand D
|
||||
SetShape D 0:1 s
|
||||
AbortCommand D
|
||||
|
||||
VMem Mem2
|
||||
set Delta [expr $Mem2 - $Mem1]
|
||||
set MemoryLeakage [expr $MemoryLeakage + $Delta]
|
||||
# puts " $i delta memory consumed: $Delta KB"
|
||||
}
|
||||
|
||||
|
||||
if { $MemoryLeakage != 0 } then {
|
||||
set percent [expr ${MemoryLeakage} / (double(${i_max}) * (${Mem1} - ${Mem0})) * 100.]
|
||||
} else {
|
||||
set percent 0
|
||||
}
|
||||
puts "Current memory leakage in percents = ${percent}"
|
||||
|
||||
if {${percent} > ${percent_max}} {
|
||||
puts "OCC114: Error"
|
||||
} else {
|
||||
puts "OCC114: OK"
|
||||
}
|
||||
|
||||
|
15
tests/bugs/caf/bug158
Executable file
15
tests/bugs/caf/bug158
Executable file
@ -0,0 +1,15 @@
|
||||
puts "=============="
|
||||
puts "OCC158"
|
||||
puts "=============="
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
##################################################################
|
||||
if { [catch {set res [SaveAs D ${imagedir}/OCC158.std]}] != 0 } {
|
||||
puts "OCC158: Error"
|
||||
} else {
|
||||
file delete ${imagedir}/OCC158.std
|
||||
}
|
||||
|
||||
|
||||
|
31
tests/bugs/caf/bug261
Executable file
31
tests/bugs/caf/bug261
Executable file
@ -0,0 +1,31 @@
|
||||
puts "==========="
|
||||
puts "OCC261"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
NewCommand D
|
||||
SetReal D 0:1 10
|
||||
|
||||
NewCommand D
|
||||
SetReal D 0:1 20
|
||||
|
||||
NewCommand D
|
||||
SetReal D 0:1 30
|
||||
|
||||
NewCommand D
|
||||
SetReal D 0:1 40
|
||||
|
||||
Undo D
|
||||
Undo D
|
||||
|
||||
OCC261 D
|
||||
|
||||
set Res [UndoLimit D]
|
||||
if { [regexp " 0" $Res] != 1 } {
|
||||
puts "OCC261: Error"
|
||||
}
|
||||
|
||||
|
21
tests/bugs/caf/bug282
Executable file
21
tests/bugs/caf/bug282
Executable file
@ -0,0 +1,21 @@
|
||||
puts "==========="
|
||||
puts "OCC282"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
circle acirc 0 0 0 20
|
||||
mkedge anEdge acirc
|
||||
wire aWire anEdge
|
||||
|
||||
plane pl 0 0 1
|
||||
mkface aface pl aWire
|
||||
|
||||
NameImportShape D 0:1 aface
|
||||
|
||||
if [catch { CheckNaming D 0:2 1 Label 0:1 1 1 1 } res] {
|
||||
puts "OCC282: Error"
|
||||
}
|
||||
|
74
tests/bugs/caf/bug2932_1
Executable file
74
tests/bugs/caf/bug2932_1
Executable file
@ -0,0 +1,74 @@
|
||||
puts "================"
|
||||
puts "OCC2932"
|
||||
puts "================"
|
||||
puts ""
|
||||
#######################################################################################
|
||||
# Create Attribute Delta depending on actual change of the attribute
|
||||
#######################################################################################
|
||||
# Case 8 (TDataStd_IntegerArray)
|
||||
#######################################################################################
|
||||
|
||||
# Create a new document and set UndoLimit
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
# Create a label and set attributes
|
||||
NewCommand D
|
||||
set Label 0:2
|
||||
|
||||
############################################
|
||||
set From 1
|
||||
set To 2
|
||||
set IntegerArray1 3
|
||||
set IntegerArray2 4
|
||||
############################################
|
||||
|
||||
set Real1 300.
|
||||
set Real2 400.
|
||||
set modified_attribute TDataStd_Real
|
||||
|
||||
############################################
|
||||
# Set TDataStd_IntegerArray
|
||||
SetIntArray D ${Label} ${From} ${To} ${IntegerArray1} ${IntegerArray2} 0
|
||||
############################################
|
||||
|
||||
SetReal D ${Label} ${Real1}
|
||||
set list [DumpCommand D]
|
||||
|
||||
# Open a transaction
|
||||
NewCommand D
|
||||
set list [DumpCommand D]
|
||||
|
||||
############################################
|
||||
# Set old value for TDataStd_IntegerArray
|
||||
SetIntArray D ${Label} ${From} ${To} ${IntegerArray1} ${IntegerArray2} 0
|
||||
############################################
|
||||
|
||||
# Set new value for TDataStd_Real
|
||||
SetReal D ${Label} ${Real2}
|
||||
set list [DumpCommand D]
|
||||
|
||||
# Open a transaction
|
||||
NewCommand D
|
||||
set list [DumpCommand D]
|
||||
|
||||
# Checking
|
||||
set length [llength ${list}]
|
||||
set good_length 17
|
||||
puts "length = ${length}"
|
||||
puts "good_length = ${good_length}"
|
||||
|
||||
if { ${length} != ${good_length} } {
|
||||
puts "OCC2932 Error (case 1)"
|
||||
} else {
|
||||
set name_attribute [lindex ${list} [expr ${good_length} - 1]]
|
||||
puts "name_attribute = ${name_attribute}"
|
||||
puts "modified_attribute = ${modified_attribute}"
|
||||
if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
|
||||
puts "OCC2932 OK"
|
||||
} else {
|
||||
puts "OCC2932 Error (case 2)"
|
||||
}
|
||||
}
|
||||
|
||||
|
72
tests/bugs/caf/bug2932_2
Executable file
72
tests/bugs/caf/bug2932_2
Executable file
@ -0,0 +1,72 @@
|
||||
puts "================"
|
||||
puts "OCC2932"
|
||||
puts "================"
|
||||
puts ""
|
||||
#######################################################################################
|
||||
# Create Attribute Delta depending on actual change of the attribute
|
||||
#######################################################################################
|
||||
# Case 14 (TDataStd_RealArray)
|
||||
#######################################################################################
|
||||
|
||||
# Create a new document and set UndoLimit
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 100
|
||||
|
||||
# Create a label and set attributes
|
||||
NewCommand D
|
||||
set Label 0:2
|
||||
|
||||
############################################
|
||||
set From 1
|
||||
set To 2
|
||||
set RealArray1 3.
|
||||
set RealArray2 4.
|
||||
############################################
|
||||
|
||||
set Real1 300.
|
||||
set Real2 400.
|
||||
set modified_attribute TDataStd_Real
|
||||
|
||||
############################################
|
||||
# Set TDataStd_RealArray
|
||||
SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
|
||||
############################################
|
||||
|
||||
SetReal D ${Label} ${Real1}
|
||||
set list [DumpCommand D]
|
||||
|
||||
# Open a transaction
|
||||
NewCommand D
|
||||
set list [DumpCommand D]
|
||||
|
||||
############################################
|
||||
# Set old value for TDataStd_RealArray
|
||||
SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
|
||||
############################################
|
||||
|
||||
# Set new value for TDataStd_Real
|
||||
SetReal D ${Label} ${Real2}
|
||||
set list [DumpCommand D]
|
||||
|
||||
# Open a transaction
|
||||
NewCommand D
|
||||
set list [DumpCommand D]
|
||||
|
||||
# Checking
|
||||
set length [llength ${list}]
|
||||
set good_length 17
|
||||
puts "length = ${length}"
|
||||
puts "good_length = ${good_length}"
|
||||
|
||||
if { ${length} != ${good_length} } {
|
||||
puts "OCC2932 Error (case 1)"
|
||||
} else {
|
||||
set name_attribute [lindex ${list} [expr ${good_length} - 1]]
|
||||
puts "name_attribute = ${name_attribute}"
|
||||
puts "modified_attribute = ${modified_attribute}"
|
||||
if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
|
||||
puts "OCC2932 OK"
|
||||
} else {
|
||||
puts "OCC2932 Error (case 2)"
|
||||
}
|
||||
}
|
31
tests/bugs/caf/bug350
Executable file
31
tests/bugs/caf/bug350
Executable file
@ -0,0 +1,31 @@
|
||||
puts "==========="
|
||||
puts "OCC350"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
vertex v1 0 0 -50
|
||||
vertex v2 0 100 -50
|
||||
vertex v3 100 0 -50
|
||||
line l1 0 0 -50 0 1 0
|
||||
line l2 0 100 -50 1 -1 0
|
||||
line l3 100 0 -50 -1 0 0
|
||||
mkedge e1 l1 v1 v2
|
||||
mkedge e2 l2 v2 v3
|
||||
mkedge e3 l3 v3 v1
|
||||
wire w e1 e2 e3
|
||||
plane pl 0 0 -50 0 0 1
|
||||
mkface f pl w
|
||||
NameImportShape D 0:1 f
|
||||
NamePrism D 0:2 0:1 250 0 0 1
|
||||
NameBox D 0:3 150 150 150
|
||||
GetShape D 0:2 aPrism
|
||||
GetShape D 0:3 aBox
|
||||
NameCut D 0:4 aPrism aBox
|
||||
|
||||
if [catch { CheckNaming D 0:9 1 Label 0:4 1 1 1 } res] {
|
||||
puts "OCC350: Error"
|
||||
}
|
||||
|
15
tests/bugs/caf/bug351
Executable file
15
tests/bugs/caf/bug351
Executable file
@ -0,0 +1,15 @@
|
||||
puts "==========="
|
||||
puts "OCC351"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
NameBox D 0:1 100 100 100
|
||||
NamePrism D 0:2 0:1:1 200 -1 0 0
|
||||
|
||||
if [catch { CheckNaming D 0:3 1 Label 0:2 1 1 1 } res] {
|
||||
puts "OCC351: Error"
|
||||
}
|
||||
|
18
tests/bugs/caf/bug352
Executable file
18
tests/bugs/caf/bug352
Executable file
@ -0,0 +1,18 @@
|
||||
puts "==========="
|
||||
puts "OCC352"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
NameBox D 0:1 100 100 100
|
||||
box abox 100 100 100
|
||||
ttranslate abox 100 0 50
|
||||
NameImportShape D 0:2 abox
|
||||
|
||||
NameGlue D 0:3 0:1 0:2
|
||||
|
||||
if [catch { CheckNaming D 0:4 1 Label 0:3 1 1 1 } res] {
|
||||
puts "OCC352: Error"
|
||||
}
|
15
tests/bugs/caf/bug355
Executable file
15
tests/bugs/caf/bug355
Executable file
@ -0,0 +1,15 @@
|
||||
puts "==========="
|
||||
puts "OCC355"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
NameCylinder D 0:1 20 100 0 Solid
|
||||
NamePrism D 0:2 0:1:2 50 0 0 1
|
||||
|
||||
if [catch { CheckNaming D 0:3 1 Label 0:2 1 1 1 } res] {
|
||||
puts "OCC355: Error"
|
||||
}
|
||||
|
13
tests/bugs/caf/bug361
Executable file
13
tests/bugs/caf/bug361
Executable file
@ -0,0 +1,13 @@
|
||||
puts "================="
|
||||
puts "OCC361"
|
||||
puts "BUC60995"
|
||||
puts "================="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
if { [catch { OCC361 D }] } {
|
||||
puts "OCC361: Error"
|
||||
}
|
||||
|
17
tests/bugs/caf/bug381_1
Executable file
17
tests/bugs/caf/bug381_1
Executable file
@ -0,0 +1,17 @@
|
||||
puts "================="
|
||||
puts "OCC381"
|
||||
puts "================="
|
||||
puts ""
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
######################################################
|
||||
catch { SaveAs D ${imagedir}/OCC381.std }
|
||||
|
||||
if { [catch { OCC381_Save D } ] } {
|
||||
puts "OCC381: Error"
|
||||
} else {
|
||||
file delete ${imagedir}/OCC381.std
|
||||
}
|
16
tests/bugs/caf/bug381_2
Executable file
16
tests/bugs/caf/bug381_2
Executable file
@ -0,0 +1,16 @@
|
||||
puts "================="
|
||||
puts "OCC381"
|
||||
puts "================="
|
||||
puts ""
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
|
||||
######################################################
|
||||
if { [catch { OCC381_SaveAs D ${imagedir}/OCC381.std}] } {
|
||||
puts "OCC381: Error"
|
||||
} else {
|
||||
file delete ${imagedir}/OCC381.std
|
||||
}
|
||||
|
23
tests/bugs/caf/bug387
Executable file
23
tests/bugs/caf/bug387
Executable file
@ -0,0 +1,23 @@
|
||||
puts "==========="
|
||||
puts "OCC387"
|
||||
puts "SAM1452"
|
||||
puts "==========="
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
NewCommand D
|
||||
SetVariable D 0:1 0 a
|
||||
SetRelation D 0:1 a=10 0:1
|
||||
SetReal D 0:1 10
|
||||
|
||||
NewCommand D
|
||||
SetRelation D 0:1 a=20 0:1
|
||||
SetReal D 0:1 20
|
||||
NewCommand D
|
||||
Undo D
|
||||
set Res [DumpRelation D 0:1]
|
||||
|
||||
if { [regexp "a=20" $Res] == 1 } {
|
||||
puts "OCC387: Error "
|
||||
}
|
||||
|
55
tests/bugs/caf/bug425
Executable file
55
tests/bugs/caf/bug425
Executable file
@ -0,0 +1,55 @@
|
||||
puts "==========="
|
||||
puts "OCC425"
|
||||
puts "OCC414"
|
||||
puts "==========="
|
||||
######################################################
|
||||
# Exception on attemp to save a document that contains empty TDataStd_Name
|
||||
######################################################
|
||||
# Crash on NT during document saving (SAM1344-#2153)
|
||||
######################################################
|
||||
|
||||
set IsGood 1
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
|
||||
# Add an attribute to a data framework
|
||||
set aSetAttr1 ""
|
||||
set aLabel 0:2
|
||||
Label D ${aLabel}
|
||||
SetName D ${aLabel} ${aSetAttr1}
|
||||
|
||||
# Close/Open the transaction
|
||||
NewCommand D
|
||||
|
||||
# Save the document
|
||||
set aFile ${imagedir}/OCC425.std
|
||||
catch {file delete ${aFile}}
|
||||
SaveAs D ${aFile}
|
||||
if { ![file exists ${aFile}] } {
|
||||
puts "There is not ${aFile} file; SaveAs command: Error"
|
||||
set IsGood 0
|
||||
}
|
||||
catch {exec chmod 777 ${aFile}}
|
||||
|
||||
# Restore the document
|
||||
Close D
|
||||
Open ${aFile} DD
|
||||
|
||||
# Get a value of the attribute
|
||||
set aGetAttr3 ""
|
||||
set IsDone [catch {set aGetAttr3 [GetName DD ${aLabel}]} aResult]
|
||||
if { ${IsDone} != 0 } {
|
||||
puts "OCC425: Error"
|
||||
set IsGood 0
|
||||
}
|
||||
if { ${aSetAttr1}!=${aGetAttr3} } {
|
||||
puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}"
|
||||
puts "Get a value of TDataStd_Name attribute from restoring document: Error"
|
||||
set IsGood 0
|
||||
}
|
||||
|
||||
if { ${IsGood} != 1 } {
|
||||
puts "OCC425: Error"
|
||||
}
|
||||
|
46
tests/bugs/caf/bug73_1
Executable file
46
tests/bugs/caf/bug73_1
Executable file
@ -0,0 +1,46 @@
|
||||
puts "==========="
|
||||
puts "OCC73"
|
||||
puts "BUC61050"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
# Set NamedShape attribute
|
||||
box aBox1 100 200 300
|
||||
set aLabel 0:2
|
||||
SetShape D ${aLabel} aBox1
|
||||
|
||||
# Initialize 3D viewer
|
||||
AISInitViewer D
|
||||
|
||||
# Add AISPresentation attribute with parameter NS
|
||||
AISSet D ${aLabel} NS
|
||||
|
||||
# Display presentation of NamedShape in the viewer
|
||||
AISDisplay D ${aLabel}
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
# Set a selection mode of the shape as 1
|
||||
set SelectionMode 1
|
||||
OCC73_SelectionMode D ${aLabel} ${SelectionMode}
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
puts "SelectionMode0 = ${SelectionMode0}"
|
||||
puts "SelectionMode1 = ${SelectionMode1}"
|
||||
puts "SelectionMode = ${SelectionMode}"
|
||||
|
||||
if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode}} then {
|
||||
puts "OCC73: Error"
|
||||
} else {
|
||||
puts "OCC73: OK"
|
||||
}
|
59
tests/bugs/caf/bug73_2
Executable file
59
tests/bugs/caf/bug73_2
Executable file
@ -0,0 +1,59 @@
|
||||
puts "==========="
|
||||
puts "OCC73"
|
||||
puts "BUC61050"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
# Set NamedShape attribute
|
||||
box aBox1 100 200 300
|
||||
set aLabel 0:2
|
||||
SetShape D ${aLabel} aBox1
|
||||
|
||||
# Initialize 3D viewer
|
||||
AISInitViewer D
|
||||
|
||||
# Add AISPresentation attribute with parameter NS
|
||||
AISSet D ${aLabel} NS
|
||||
|
||||
# Display presentation of NamedShape in the viewer
|
||||
AISDisplay D ${aLabel}
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
# Set a selection mode of the shape as 1
|
||||
set SelectionMode 1
|
||||
OCC73_SelectionMode D ${aLabel} ${SelectionMode}
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
# Undo
|
||||
Undo D
|
||||
|
||||
# Redo
|
||||
Redo D
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
puts "SelectionMode0 = ${SelectionMode0}"
|
||||
puts "SelectionMode1 = ${SelectionMode1}"
|
||||
puts "SelectionMode = ${SelectionMode}"
|
||||
puts "SelectionMode2 = ${SelectionMode2}"
|
||||
|
||||
if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then {
|
||||
puts "OCC73: Error"
|
||||
} else {
|
||||
puts "OCC73: OK"
|
||||
}
|
69
tests/bugs/caf/bug73_3
Executable file
69
tests/bugs/caf/bug73_3
Executable file
@ -0,0 +1,69 @@
|
||||
puts "==========="
|
||||
puts "OCC73"
|
||||
puts "BUC61050"
|
||||
puts "==========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D MDTV-Standard
|
||||
UndoLimit D 10
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
# Set NamedShape attribute
|
||||
box aBox1 100 200 300
|
||||
set aLabel 0:2
|
||||
SetShape D ${aLabel} aBox1
|
||||
|
||||
# Initialize 3D viewer
|
||||
AISInitViewer D
|
||||
|
||||
# Add AISPresentation attribute with parameter NS
|
||||
AISSet D ${aLabel} NS
|
||||
|
||||
# Display presentation of NamedShape in the viewer
|
||||
AISDisplay D ${aLabel}
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
# Set a selection mode of the shape as 1
|
||||
set SelectionMode 1
|
||||
OCC73_SelectionMode D ${aLabel} ${SelectionMode}
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
# Forget the attribute
|
||||
ForgetAll D ${aLabel}
|
||||
NewCommand D
|
||||
|
||||
# Undo-Redo-Undo
|
||||
Undo D
|
||||
Redo D
|
||||
Undo D
|
||||
|
||||
# Get a selection mode of the shape
|
||||
set IsDone [catch {set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]} aResult]
|
||||
|
||||
if { ${IsDone} != 0 } {
|
||||
puts "OCC73: Error"
|
||||
puts ${aResult}
|
||||
} else {
|
||||
|
||||
puts "SelectionMode0 = ${SelectionMode0}"
|
||||
puts "SelectionMode1 = ${SelectionMode1}"
|
||||
puts "SelectionMode = ${SelectionMode}"
|
||||
puts "SelectionMode2 = ${SelectionMode2}"
|
||||
|
||||
if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then {
|
||||
puts "OCC73: Error"
|
||||
} else {
|
||||
puts "OCC73: OK"
|
||||
}
|
||||
|
||||
}
|
11
tests/bugs/fclasses/buc60724
Executable file
11
tests/bugs/fclasses/buc60724
Executable file
@ -0,0 +1,11 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : the first string is not zero string :"
|
||||
puts "TODO OCC12345 ALL: Faulty : the second string is not zero string :"
|
||||
|
||||
puts "=========="
|
||||
puts "BUC60724"
|
||||
puts "=========="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
BUC60724
|
||||
|
14
tests/bugs/fclasses/buc60727
Executable file
14
tests/bugs/fclasses/buc60727
Executable file
@ -0,0 +1,14 @@
|
||||
puts "============="
|
||||
puts "BUC60727"
|
||||
puts "============="
|
||||
|
||||
pload QAcommands
|
||||
|
||||
set start [BUC60727]
|
||||
set n [llength $start]
|
||||
set end [lindex $start [expr $n-1]]
|
||||
|
||||
if { $end != 3} {
|
||||
puts "Faulty : Incorrect converting of the unit"
|
||||
}
|
||||
|
8
tests/bugs/fclasses/buc60944
Executable file
8
tests/bugs/fclasses/buc60944
Executable file
@ -0,0 +1,8 @@
|
||||
puts "========"
|
||||
puts "BUC60944"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload QAcommands
|
||||
|
||||
BUC60944 "../../.."
|
12
tests/bugs/fclasses/bug132_1
Executable file
12
tests/bugs/fclasses/bug132_1
Executable file
@ -0,0 +1,12 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1/word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
||||
|
11
tests/bugs/fclasses/bug132_2
Executable file
11
tests/bugs/fclasses/bug132_2
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1:word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_3
Executable file
11
tests/bugs/fclasses/bug132_3
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1*word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_4
Executable file
11
tests/bugs/fclasses/bug132_4
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1?word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_5
Executable file
11
tests/bugs/fclasses/bug132_5
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1\"word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_6
Executable file
11
tests/bugs/fclasses/bug132_6
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1<word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_7
Executable file
11
tests/bugs/fclasses/bug132_7
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1>word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_8
Executable file
11
tests/bugs/fclasses/bug132_8
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1|word2} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
11
tests/bugs/fclasses/bug132_9
Executable file
11
tests/bugs/fclasses/bug132_9
Executable file
@ -0,0 +1,11 @@
|
||||
puts "========"
|
||||
puts "OCC132"
|
||||
puts "BUC61029"
|
||||
puts "BUC61030"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if [catch {OCC132 word1.word2.word3} res] {
|
||||
puts "Error : OCC132"
|
||||
}
|
13
tests/bugs/fclasses/bug39
Executable file
13
tests/bugs/fclasses/bug39
Executable file
@ -0,0 +1,13 @@
|
||||
puts "========"
|
||||
puts "OCC39"
|
||||
puts "========"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
if ![string compare $tcl_platform(platform) "windows"] {
|
||||
OCC39 W:\pak.per 0 res
|
||||
puts [checkshape res]
|
||||
} else {
|
||||
puts "Thes case for WNT only!"
|
||||
}
|
||||
|
10
tests/bugs/fclasses/bug63
Executable file
10
tests/bugs/fclasses/bug63
Executable file
@ -0,0 +1,10 @@
|
||||
puts "================"
|
||||
puts "OCC63"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file OCC63_×Ú.brep] result
|
||||
puts [checkshape result]
|
||||
|
||||
set 2dviewer 0
|
||||
|
23
tests/bugs/modalg/buc60462_1
Executable file
23
tests/bugs/modalg/buc60462_1
Executable file
@ -0,0 +1,23 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : Section is incorrect"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
|
||||
puts "============="
|
||||
puts "BUC60462"
|
||||
puts "============="
|
||||
puts "Section"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file buc60462a.brep] a
|
||||
puts [checkshape a]
|
||||
restore [locate_data_file buc60462b.brep] b
|
||||
puts [checkshape b]
|
||||
bsection result a b
|
||||
|
||||
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full cs
|
||||
|
||||
if { $cs != 0 } {
|
||||
puts "Faulty : Section is incorrect"
|
||||
}
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
26
tests/bugs/modalg/buc60462_2
Executable file
26
tests/bugs/modalg/buc60462_2
Executable file
@ -0,0 +1,26 @@
|
||||
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_17"
|
||||
puts "TODO OCC12345 ALL: Faulty : mistakes are found in checked shape by checkshape command"
|
||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||
|
||||
|
||||
puts "=========="
|
||||
puts "BUC60462"
|
||||
puts "=========="
|
||||
|
||||
restore [locate_data_file buc60462c.brep] a
|
||||
puts [checkshape a]
|
||||
restore [locate_data_file buc60462d.brep] b
|
||||
puts [checkshape b]
|
||||
puts "Fuse begin"
|
||||
bfuse result a b
|
||||
puts "Fuse end"
|
||||
|
||||
set che [checkshape result r]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
} else {
|
||||
puts "Checking by checkshape - OK"
|
||||
}
|
||||
|
||||
set square 0
|
||||
set 2dviewer 0
|
22
tests/bugs/modalg/buc60463
Executable file
22
tests/bugs/modalg/buc60463
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
puts "TODO OCC12345 ALL: Faulty : Section is incorrect"
|
||||
|
||||
puts "============="
|
||||
puts "BUC60463"
|
||||
puts "============="
|
||||
puts "Section"
|
||||
puts ""
|
||||
cpulimit 1400
|
||||
restore [locate_data_file buc60463a.brep] a
|
||||
puts [checkshape a]
|
||||
restore [locate_data_file buc60463b.brep] b
|
||||
puts [checkshape b]
|
||||
bsection result a b
|
||||
|
||||
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full cs
|
||||
if { $cs != 0 } {
|
||||
puts "Faulty : Section is incorrect"
|
||||
}
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
54
tests/bugs/modalg/buc60555_2
Executable file
54
tests/bugs/modalg/buc60555_2
Executable file
@ -0,0 +1,54 @@
|
||||
puts "============="
|
||||
puts "BUC60555"
|
||||
puts "CUT Case2"
|
||||
puts "============="
|
||||
cpulimit 1400
|
||||
restore [locate_data_file buc60555a.brep] part
|
||||
puts [checkshape part]
|
||||
restore [locate_data_file buc60555b.brep] trTool1
|
||||
puts [checkshape trTool1]
|
||||
|
||||
halfspace hs1 trTool1 20000 10000 0
|
||||
bcut cut1 part hs1
|
||||
puts [checkshape cut1]
|
||||
|
||||
set che [checkshape cut1 r]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
} else {
|
||||
puts "Checking by checkshape - OK"
|
||||
}
|
||||
|
||||
puts [maxtolerance cut1]
|
||||
|
||||
restore [locate_data_file buc60555c.brep] trTool2
|
||||
halfspace hs2 trTool2 10000 10000 0
|
||||
bcut cut2 cut1 hs2
|
||||
|
||||
tcopy cut2 result
|
||||
|
||||
explode cut2 e
|
||||
mkcurve cu1 cut2_1
|
||||
mkcurve cu2 cut2_2
|
||||
mkcurve cu3 cut2_3
|
||||
mkcurve cu4 cut2_4
|
||||
|
||||
set che [checkshape cut2 r]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
} else {
|
||||
puts "Checking by checkshape - OK"
|
||||
}
|
||||
|
||||
puts [checkshape cut2]
|
||||
set tolerance [ maxtolerance cut2 ]
|
||||
regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance
|
||||
regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance
|
||||
regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance
|
||||
if { $MaxFaceTolerance > 1 || $MaxEdgeTolerance > 1 || $MaxVertexTolerance > 1 } {
|
||||
puts "Faulty : Tolerance of shape is more then 1.0"
|
||||
} else {
|
||||
puts "Tolerance of shape is less then 1.0"
|
||||
}
|
||||
set square 4.52817e+07
|
||||
set 2dviewer 0
|
70
tests/bugs/modalg/buc60555_3
Executable file
70
tests/bugs/modalg/buc60555_3
Executable file
@ -0,0 +1,70 @@
|
||||
puts "=============="
|
||||
puts "BUC60555"
|
||||
puts "CUT Case 3"
|
||||
puts "=============="
|
||||
cpulimit 5000
|
||||
restore [locate_data_file buc60555a.brep] part
|
||||
puts [checkshape part]
|
||||
restore [locate_data_file buc60555b.brep] trTool1
|
||||
puts [checkshape trTool1]
|
||||
|
||||
halfspace hs1 trTool1 20000 10000 0
|
||||
bcut cut1 part hs1
|
||||
puts [checkshape cut1]
|
||||
|
||||
set che [checkshape cut1 r]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
} else {
|
||||
puts "Checking by checkshape - OK"
|
||||
}
|
||||
|
||||
maxtolerance cut1
|
||||
|
||||
restore [locate_data_file buc60555c.brep] trTool2
|
||||
halfspace hs2 trTool2 10000 10000 0
|
||||
bcut cut2 cut1 hs2
|
||||
puts [checkshape cut2]
|
||||
|
||||
set che [checkshape cut2 r]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
} else {
|
||||
puts "Checking by checkshape - OK"
|
||||
}
|
||||
|
||||
maxtolerance cut2
|
||||
|
||||
restore [locate_data_file buc60555d.brep] trTool3
|
||||
halfspace hs3 trTool3 20000 1000 0
|
||||
bcut cut3 cut2 hs3
|
||||
|
||||
tcopy cut3 result
|
||||
|
||||
explode cut3 e
|
||||
mkcurve cu1 cut3_1
|
||||
mkcurve cu2 cut3_2
|
||||
mkcurve cu3 cut3_3
|
||||
mkcurve cu4 cut3_4
|
||||
|
||||
set che [checkshape cut3 r]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
} else {
|
||||
puts "Checking by checkshape - OK"
|
||||
}
|
||||
|
||||
puts [checkshape cut3 ]
|
||||
|
||||
set tolerance [ maxtolerance cut3 ]
|
||||
regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance
|
||||
regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance
|
||||
regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance
|
||||
|
||||
if { $MaxFaceTolerance > 1 || $MaxEdgeTolerance > 1 || $MaxVertexTolerance > 1 } {
|
||||
puts "Faulty : Tolerance of shape is more then 1.0"
|
||||
} else {
|
||||
puts "Tolerance of shape is less then 1.0"
|
||||
}
|
||||
set square 2.22138e+07
|
||||
set 2dviewer 0
|
18
tests/bugs/modalg/buc60585_1
Executable file
18
tests/bugs/modalg/buc60585_1
Executable file
@ -0,0 +1,18 @@
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60585"
|
||||
puts "========================"
|
||||
|
||||
restore [locate_data_file buc60585a.brep] s
|
||||
puts [checkshape s]
|
||||
plane ps 2036.25 -97.5 -1460.499755859375 0.0 -0.75103523489975432 -0.66026212668838646 1.0 0.0 0.0
|
||||
|
||||
psection result s ps
|
||||
|
||||
set length 117.81
|
||||
set 2dviewer 0
|
||||
|
||||
## set num [lindex [checksection res] 4]
|
||||
# if { $num != 0 } {
|
||||
# puts " Faulty : Result shape is Unclosed !!! "
|
||||
# }
|
20
tests/bugs/modalg/buc60649
Executable file
20
tests/bugs/modalg/buc60649
Executable file
@ -0,0 +1,20 @@
|
||||
puts "=========="
|
||||
puts "BUC60649"
|
||||
puts "BUC60657"
|
||||
puts "=========="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file buc60649a.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
set che [checkshape a rr]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "Body of the script was not executed"
|
||||
} else {
|
||||
puts "Checking of SOURCE shape by checkshape - OK"
|
||||
mkoffset result a 1 1
|
||||
renamevar result_1 result
|
||||
}
|
||||
set length 271.473
|
||||
set 2dviewer 0
|
33
tests/bugs/modalg/buc60663_2
Executable file
33
tests/bugs/modalg/buc60663_2
Executable file
@ -0,0 +1,33 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : the distanse is"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
|
||||
puts "====================================="
|
||||
puts "BUC60663"
|
||||
puts "====================================="
|
||||
puts ""
|
||||
puts "It takes visual check for this BUG."
|
||||
puts "====================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file buc60663a.brep] a
|
||||
puts [checkshape a]
|
||||
restore [locate_data_file buc60663b.brep] b
|
||||
puts [checkshape b]
|
||||
|
||||
bsection result a b
|
||||
|
||||
set expl [explode result v]
|
||||
set len [llength $expl]
|
||||
set ver [lindex $expl [expr $len - 1]]
|
||||
explode b e
|
||||
explode b_4 v
|
||||
distmini d $ver b_5
|
||||
|
||||
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} {
|
||||
puts "Faulty : the distanse is $dist. It is more $toler."
|
||||
}
|
||||
set length 0
|
||||
set 2dviewer 0
|
21
tests/bugs/modalg/buc60669
Executable file
21
tests/bugs/modalg/buc60669
Executable file
@ -0,0 +1,21 @@
|
||||
pload QAcommands
|
||||
|
||||
puts "=================="
|
||||
puts "BUC60669"
|
||||
puts "=================="
|
||||
puts ""
|
||||
#############################################################
|
||||
## An exception was caught OSD_SIGBUS: SIGBUS 'bus error' detected.**
|
||||
## Exception ** OSD_SIGBUS: SIGBUS 'bus error' detected.
|
||||
#############################################################
|
||||
|
||||
restore [locate_data_file buc60669a.brep] shell1
|
||||
puts [checkshape shell1]
|
||||
restore [locate_data_file buc60669b.brep] shell2
|
||||
puts [checkshape shell2]
|
||||
|
||||
ksection result shell1 shell2 1000 0.0001 0.00001 0
|
||||
|
||||
#checksection res
|
||||
set length 104.754
|
||||
set 2dviewer 0
|
32
tests/bugs/modalg/buc60682
Executable file
32
tests/bugs/modalg/buc60682
Executable file
@ -0,0 +1,32 @@
|
||||
puts "TODO OCC12345 ALL: Faulty BUC60682"
|
||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_5"
|
||||
|
||||
pload QAcommands
|
||||
|
||||
puts "=================="
|
||||
puts "BUC60682"
|
||||
puts "=================="
|
||||
|
||||
restore [locate_data_file buc60682a.brep] shell1
|
||||
restore [locate_data_file buc60682b.brep] shell2
|
||||
|
||||
set che [checkshape shell1]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60682 (shell 1): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar shell1 result
|
||||
} else {
|
||||
puts "BUC60682 OK (shell 1): Source shape is valid"
|
||||
set che [checkshape shell2]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60682 (shell 2): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar shell2 result
|
||||
} else {
|
||||
puts "BUC60682 OK (shell 2): Source shape is valid"
|
||||
ksection result shell1 shell2 1000 0.0001 0.00001 0
|
||||
}
|
||||
}
|
||||
set square 0
|
||||
set 2dviewer 0
|
48
tests/bugs/modalg/buc60690
Executable file
48
tests/bugs/modalg/buc60690
Executable file
@ -0,0 +1,48 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : The distance between"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60690"
|
||||
puts "========================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file buc60690a.brep] a
|
||||
restore [locate_data_file buc60690b.brep] b
|
||||
|
||||
set che [checkshape a]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60690 (shape 1): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar a result
|
||||
} else {
|
||||
puts "BUC60690 OK (shape 1): Source shape is valid"
|
||||
set che [checkshape b]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60690 (shape 2): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar b result
|
||||
} else {
|
||||
puts "BUC60690 OK (shape 2): Source shape is valid"
|
||||
|
||||
bsection result a b
|
||||
|
||||
set le [explode result v]
|
||||
distmini d1 result_1 b
|
||||
distmini d2 [lindex $le [expr [llength $le] - 1]] b
|
||||
|
||||
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
|
||||
if { [expr $du2 > 1e-7] } {
|
||||
puts "Faulty : The distance between last vertex and shellB is $du2. It is more then 1e-7."
|
||||
}
|
||||
}
|
||||
}
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
||||
|
38
tests/bugs/modalg/buc60703_1
Executable file
38
tests/bugs/modalg/buc60703_1
Executable file
@ -0,0 +1,38 @@
|
||||
puts "TODO OCC12345 ALL: An exception was caught"
|
||||
puts "TODO OCC12345 ALL: Exception"
|
||||
puts "TODO OCC12345 ALL: Faulty BUC60703: here is problem with FUSE operation"
|
||||
puts "TODO OCC12345 ALL: Error : The command can not be build."
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60703"
|
||||
puts "================================="
|
||||
puts "Action with models with VERY BIG tolerance"
|
||||
puts "================================="
|
||||
##########################################
|
||||
## Crash during a fuse whilst two plans are tangent.
|
||||
## ( Case has LIMITATION status currently )
|
||||
##########################################
|
||||
|
||||
#cpulimit 9000
|
||||
|
||||
restore [locate_data_file buc60703a.brep] a
|
||||
# maxtolerance a
|
||||
puts [checkshape a]
|
||||
restore [locate_data_file buc60703b.brep] b
|
||||
# maxtolerance b
|
||||
puts [checkshape b]
|
||||
|
||||
if [catch {bfuse result a b } catch_result] {
|
||||
puts "Faulty BUC60703: here is problem with FUSE operation"
|
||||
} else {
|
||||
puts "OK OCC348: function FUSE works ok"
|
||||
if [catch {checkshape result } catch_result] {
|
||||
puts "Faulty BUC60703 : here is checking problem."
|
||||
} else {
|
||||
puts "BUC60703 OK"
|
||||
}
|
||||
# maxtolerance res
|
||||
}
|
||||
|
||||
set square 0
|
||||
set 2dviewer 0
|
24
tests/bugs/modalg/buc60708
Executable file
24
tests/bugs/modalg/buc60708
Executable file
@ -0,0 +1,24 @@
|
||||
|
||||
puts "==========="
|
||||
puts "BUC60708"
|
||||
puts "==========="
|
||||
|
||||
restore [locate_data_file buc60708a.brep] a
|
||||
puts [checkshape a]
|
||||
restore [locate_data_file buc60708b.brep] b
|
||||
puts [checkshape b]
|
||||
|
||||
bcommon result a b
|
||||
|
||||
set faces [explode result f]
|
||||
set n [llength $faces]
|
||||
|
||||
set end [lindex $faces [expr $n-1]]
|
||||
|
||||
if { $end != "result_4" } {
|
||||
puts " Faulty :Common operation was made wrongly"
|
||||
} else {
|
||||
puts " Common operation was made successfully"
|
||||
}
|
||||
set square 13.4871
|
||||
set 2dviewer 0
|
50
tests/bugs/modalg/buc60712
Executable file
50
tests/bugs/modalg/buc60712
Executable file
@ -0,0 +1,50 @@
|
||||
puts "=========="
|
||||
puts "BUC60712"
|
||||
puts "=========="
|
||||
puts ""
|
||||
puts "=================================="
|
||||
puts "It takes visual check for this BUG"
|
||||
puts "=================================="
|
||||
|
||||
#
|
||||
# OCC22070: Grid Tests: CHL set, detected problems
|
||||
# Problems:
|
||||
# The shape buc60712a.brep is self-interferred.
|
||||
# thus it can not be used as the argument for Boolean Operation Algorithm.
|
||||
#
|
||||
# Proposals:
|
||||
# The Case chl/902/F3 should be removed or rewritten:
|
||||
|
||||
restore [locate_data_file buc60712a.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
restore [locate_data_file buc60712b.brep] b
|
||||
puts [checkshape b]
|
||||
|
||||
# Recompute "a" shape
|
||||
explode a f
|
||||
|
||||
bop a_1 a_2
|
||||
bopfuse r12
|
||||
|
||||
bop a_3 a_4
|
||||
bopfuse r34
|
||||
|
||||
bop r12 r34
|
||||
|
||||
bopfuse r
|
||||
|
||||
# Start boolean operation
|
||||
bop r b
|
||||
bopsection result
|
||||
|
||||
# Check result
|
||||
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
|
||||
# Resume
|
||||
if { $num != 0 } {
|
||||
puts " Faulty BUC60712: Result shape is INcorrect !!! "
|
||||
} else {
|
||||
puts "BUC60712 OK: Result shape is correct "
|
||||
}
|
||||
set length 1.88145
|
||||
set 2dviewer 0
|
47
tests/bugs/modalg/buc60744
Executable file
47
tests/bugs/modalg/buc60744
Executable file
@ -0,0 +1,47 @@
|
||||
pload QAcommands
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60744"
|
||||
puts "========================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file buc60744a.brep] a
|
||||
restore [locate_data_file buc60744b.brep] b
|
||||
|
||||
set che [checkshape a]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60744 (shape 1): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar a result
|
||||
} else {
|
||||
puts "BUC60744 OK (shape 1): Source shape is valid"
|
||||
|
||||
set che [checkshape b]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60744 (shape 2): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar b result
|
||||
} else {
|
||||
puts "BUC60744 OK (shape 2): Source shape is valid"
|
||||
|
||||
ksection result a b 1000 0.0001 0.00001 0
|
||||
|
||||
set ne [llength [explode result e]]
|
||||
set nv [llength [explode result v]]
|
||||
|
||||
if {$ne >= $nv} {
|
||||
puts [format "Faulty : the number of edges is %s, but the number of vertexes is %s." $ne $nv]
|
||||
}
|
||||
}
|
||||
}
|
||||
bsection result a b
|
||||
|
||||
set ne [llength [explode result e]]
|
||||
set nv [llength [explode result v]]
|
||||
|
||||
if {$ne >= $nv} {
|
||||
puts [format "Faulty : the number of edges is %s, but the number of vertexes is %s." $ne $nv]
|
||||
}
|
||||
|
||||
set length 228.386
|
||||
set 2dviewer 0
|
24
tests/bugs/modalg/buc60777
Executable file
24
tests/bugs/modalg/buc60777
Executable file
@ -0,0 +1,24 @@
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60777"
|
||||
puts "========================"
|
||||
|
||||
profile p x 30 y -10 x 10 y 10 x 10 y 30 t -30 -20 t -30 20
|
||||
mkoffset result p 1 -1
|
||||
explode p w
|
||||
|
||||
regexp {Mass +: +([-0-9.+eE]+)} [lprops result_1] full end
|
||||
regexp {Mass +: +([-0-9.+eE]+)} [lprops p_1] full end1
|
||||
|
||||
if { $end >= $end1} {
|
||||
puts " Faulty Mkoffset operation was made wrongly"
|
||||
} else {
|
||||
puts " Mkoffset operation was made successfully"
|
||||
}
|
||||
|
||||
# Lenth of "profile" : 203.733802110964
|
||||
|
||||
renamevar result_1 result
|
||||
|
||||
set length 191.044
|
||||
set 2dviewer 0
|
37
tests/bugs/modalg/buc60782_2
Executable file
37
tests/bugs/modalg/buc60782_2
Executable file
@ -0,0 +1,37 @@
|
||||
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_2"
|
||||
puts "TODO OCC12345 ALL: Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "TODO OCC12345 ALL: Faulty BUC60782"
|
||||
puts "TODO OCC12345 ALL: Error : The command can not be build."
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60782"
|
||||
puts "CASE 2"
|
||||
puts "========================"
|
||||
puts ""
|
||||
puts "Results of Geom2d_OffsetCurve are sometimes strange (not correct). "
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file buc60782b.brep] a
|
||||
set che [checkshape a]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60782 (case 2): Source shape is invalid"
|
||||
} else {
|
||||
puts "BUC60782 OK (case 2): Sourse shape is correct"
|
||||
}
|
||||
|
||||
set che [checkshape a rr]
|
||||
if { [regexp {OK} $che ] != 1} {
|
||||
puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "Body of the script was not executed"
|
||||
} else {
|
||||
puts "Checking of SOURCE shape by checkshape - OK"
|
||||
if [catch { mkoffset result a 1 10 } catch_result] {
|
||||
puts "Faulty BUC60782: mkoffset works wrongly"
|
||||
renamevar a result
|
||||
} else {
|
||||
puts "OK BUC60782: offset is created"
|
||||
tpcompound result
|
||||
}
|
||||
}
|
||||
set square 0
|
||||
set 2dviewer 0
|
32
tests/bugs/modalg/buc60787_1
Executable file
32
tests/bugs/modalg/buc60787_1
Executable file
@ -0,0 +1,32 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
|
||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||
|
||||
puts "========"
|
||||
puts "BUC60787"
|
||||
puts "BUC60783"
|
||||
puts "========"
|
||||
|
||||
#restore Common_Shell_Case2.brep S1
|
||||
#restore Common_Solid_Case2.brep S2
|
||||
|
||||
restore [locate_data_file buc60787a.brep] S1
|
||||
puts [checkshape S1]
|
||||
restore [locate_data_file buc60787b.brep] S2
|
||||
puts [checkshape S1]
|
||||
|
||||
bcommon result S1 S2
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
|
||||
|
||||
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
|
||||
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
|
||||
|
||||
if { $err != 0 || $err1 != 1} {
|
||||
puts "Faulty : result should be a shell, but not a compound of faces"
|
||||
} else {
|
||||
puts "BUC60787 - OK"
|
||||
}
|
||||
|
||||
set square 0
|
||||
set 2dviewer 0
|
29
tests/bugs/modalg/buc60787_2
Executable file
29
tests/bugs/modalg/buc60787_2
Executable file
@ -0,0 +1,29 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
|
||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||
|
||||
puts "========"
|
||||
puts "BUC60787"
|
||||
puts "BUC60783"
|
||||
puts "========"
|
||||
|
||||
#restore Cut_Shell_Case2.brep S1
|
||||
#restore Cut_Solid_Case2.brep S2
|
||||
|
||||
restore [locate_data_file buc60787c.brep] S1
|
||||
puts [checkshape S1]
|
||||
restore [locate_data_file buc60787d.brep] S2
|
||||
puts [checkshape S2]
|
||||
|
||||
bcut result S1 S2
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
|
||||
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
|
||||
|
||||
if { $err != 0 || $err1 != 1} {
|
||||
puts "Faulty : result should be a shell, but not a compound of faces"
|
||||
} else {
|
||||
puts "BUC60787 - OK"
|
||||
}
|
||||
set square 0
|
||||
set 2dviewer 0
|
29
tests/bugs/modalg/buc60788_2
Executable file
29
tests/bugs/modalg/buc60788_2
Executable file
@ -0,0 +1,29 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
|
||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||
|
||||
puts "========"
|
||||
puts "BUC60788"
|
||||
puts "case 3"
|
||||
puts "========"
|
||||
|
||||
#restore Cut_Shell_Case2.brep S1
|
||||
#restore Cut_Solid_Case2.brep S2
|
||||
|
||||
restore [locate_data_file buc60788e.brep] S1
|
||||
puts [checkshape S1]
|
||||
restore [locate_data_file buc60787d.brep] S2
|
||||
puts [checkshape S2]
|
||||
|
||||
bcut result S1 S2
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
|
||||
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
|
||||
|
||||
if { $err != 0 || $err1 != 1} {
|
||||
puts "Faulty : result should be a shell, but not a compound of faces"
|
||||
} else {
|
||||
puts "BUC60788 - OK"
|
||||
}
|
||||
set square 0
|
||||
set 2dviewer 0
|
29
tests/bugs/modalg/buc60788_3
Executable file
29
tests/bugs/modalg/buc60788_3
Executable file
@ -0,0 +1,29 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
|
||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||
|
||||
puts "========"
|
||||
puts "BUC60788"
|
||||
puts "case 2"
|
||||
puts "========"
|
||||
|
||||
#restore Common_Shell_Case2.brep S1
|
||||
#restore Common_Solid_Case2.brep S2
|
||||
|
||||
restore [locate_data_file buc60788c.brep] S1
|
||||
puts [checkshape S1]
|
||||
restore [locate_data_file buc60787b.brep] S2
|
||||
puts [checkshape S1]
|
||||
|
||||
bcommon result S1 S2
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
|
||||
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
|
||||
|
||||
if { $err != 0 || $err1 != 1} {
|
||||
puts "Faulty : result should be a shell, but not a compound of faces"
|
||||
} else {
|
||||
puts "BUC60788 - OK"
|
||||
}
|
||||
set square 0
|
||||
set 2dviewer 0
|
27
tests/bugs/modalg/buc60789_1
Executable file
27
tests/bugs/modalg/buc60789_1
Executable file
@ -0,0 +1,27 @@
|
||||
|
||||
puts "========"
|
||||
puts "BUC60789"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
#restore buc60789a.brep S1
|
||||
restore [locate_data_file buc60787b.brep] S1
|
||||
### (by apn during classification)
|
||||
puts [checkshape S1]
|
||||
restore [locate_data_file buc60789b.brep] S2
|
||||
puts [checkshape S2]
|
||||
|
||||
bcommon result S1 S2
|
||||
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
|
||||
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
|
||||
|
||||
if { $ve != 0 && $ed != 0 } {
|
||||
puts " BUC60789 OK: COMMON operation was made properly"
|
||||
} else {
|
||||
puts "Faulty BUC60789: COMMON operation was made wrongly"
|
||||
}
|
||||
set length 78.3594
|
||||
set 2dviewer 0
|
26
tests/bugs/modalg/buc60789_2
Executable file
26
tests/bugs/modalg/buc60789_2
Executable file
@ -0,0 +1,26 @@
|
||||
|
||||
puts "========"
|
||||
puts "BUC60789"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
#restore buc60789c.brep S1
|
||||
##by apn
|
||||
restore [locate_data_file buc60787b.brep] S1
|
||||
puts [checkshape S1]
|
||||
restore [locate_data_file buc60789d.brep] S2
|
||||
puts [checkshape S2]
|
||||
|
||||
bcut result S2 S1
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
|
||||
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
|
||||
|
||||
if { $ve != 0 && $ed != 0 } {
|
||||
puts " BUC60789 OK: CUT operation was made properly"
|
||||
} else {
|
||||
puts "Faulty BUC60789: CUT operation was made wrongly"
|
||||
}
|
||||
set length 288.856
|
||||
set 2dviewer 0
|
27
tests/bugs/modalg/buc60826
Executable file
27
tests/bugs/modalg/buc60826
Executable file
@ -0,0 +1,27 @@
|
||||
puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60826b.brep could not be found"
|
||||
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60826"
|
||||
puts "========================"
|
||||
|
||||
#restore Model2-a.brep a
|
||||
restore [locate_data_file BUC60826a.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
# restore Model2-b.brep b
|
||||
restore [locate_data_file BUC60826b.brep] b
|
||||
puts [checkshape b]
|
||||
|
||||
bsection result a b
|
||||
|
||||
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
|
||||
|
||||
if { $num != 0 } {
|
||||
puts " Faulty BUC60826 : Result shape is Unclosed !!! "
|
||||
} else {
|
||||
puts "BUC60826 OK: Result shape is CORRECT !!! "
|
||||
}
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
52
tests/bugs/modalg/buc60827
Executable file
52
tests/bugs/modalg/buc60827
Executable file
@ -0,0 +1,52 @@
|
||||
puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60827d.brep could not be found"
|
||||
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========================"
|
||||
puts "BUC60827"
|
||||
puts "========================"
|
||||
|
||||
#restore Model3-a.brep a
|
||||
restore [locate_data_file BUC60827c.brep] a
|
||||
|
||||
#restore Model3-b.brep b
|
||||
restore [locate_data_file BUC60827d.brep] b
|
||||
|
||||
set che [checkshape a]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60827 (shape 1): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar a result
|
||||
} else {
|
||||
puts "BUC60827 OK (shape 1): Source shape is valid"
|
||||
|
||||
set che [checkshape b]
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Faulty BUC60827 (shape 2): Source shape is invalid. It was detected by Checkshape command"
|
||||
puts "Body of the script was NOT executed"
|
||||
renamevar b result
|
||||
} else {
|
||||
puts "BUC60827 OK (shape 2): Source shape is valid"
|
||||
|
||||
bsection result a b
|
||||
set rlen 0
|
||||
set rlen [llength [explode res v]]
|
||||
if ([expr $rlen == 0]) {
|
||||
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
|
||||
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
|
||||
if ([expr $len2 > 1e-7]) {
|
||||
puts "Faulty :The section is incomplite."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
20
tests/bugs/modalg/buc60830_4
Executable file
20
tests/bugs/modalg/buc60830_4
Executable file
@ -0,0 +1,20 @@
|
||||
puts "============="
|
||||
puts "BUC60830"
|
||||
puts "BUC60829"
|
||||
puts "============="
|
||||
|
||||
restore [locate_data_file BUC60830-face2.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
set che [checkshape f rr]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "Body of the script was not executed"
|
||||
} else {
|
||||
puts "Checking of SOURCE shape by checkshape - OK"
|
||||
mkoffset result f 1 3
|
||||
renamevar result_1 result
|
||||
}
|
||||
|
||||
set length 81.5088
|
||||
set 2dviewer 0
|
49
tests/bugs/modalg/buc60853
Executable file
49
tests/bugs/modalg/buc60853
Executable file
@ -0,0 +1,49 @@
|
||||
puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60853_plane.brep could not be found"
|
||||
puts "TODO OCC12345 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "BUC60853"
|
||||
puts "========"
|
||||
puts ""
|
||||
###############################################################################
|
||||
##The exception Standard_NumericError is generated in the function TopOpeBRepTool_CurveTool::MakeCurves().
|
||||
## The error occurs only when approximate mode is switched on. The command in draw is :
|
||||
## > section res err_face.brep err_plane.brep -a
|
||||
###############################################################################
|
||||
|
||||
restore [locate_data_file BUC60853_face.brep] face
|
||||
restore [locate_data_file BUC60853_plane.brep] plane
|
||||
puts [checkshape face]
|
||||
puts [checkshape plane]
|
||||
|
||||
bsection result face plane -a
|
||||
|
||||
|
||||
# set text [nbshapes res]
|
||||
# set ver [lindex $text 7]
|
||||
# set edg [lindex $text 10]
|
||||
# set com [lindex $text 28]
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ver
|
||||
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edg
|
||||
|
||||
# if { $com != 0} {
|
||||
# puts " Faulty BUC60853: Result shape is COMPOUND, but it must be edge "
|
||||
# set make_photo 0
|
||||
# } else {
|
||||
if { $edg != 1} {
|
||||
puts " Faulty BUC60853: Result shape contains more than one edge "
|
||||
explode res v
|
||||
} else {
|
||||
if { $ver < 2} {
|
||||
puts " Faulty BUC60853: Result edge contains less than two vertexes."
|
||||
explode res v
|
||||
} else {
|
||||
puts " BUC60853 OK: Result of section operation is correct "
|
||||
explode res v
|
||||
}
|
||||
}
|
||||
#}
|
||||
set length 0
|
||||
set 2dviewer 0
|
25
tests/bugs/modalg/buc60878_1
Executable file
25
tests/bugs/modalg/buc60878_1
Executable file
@ -0,0 +1,25 @@
|
||||
puts "============="
|
||||
puts "BUC60878"
|
||||
puts "============="
|
||||
|
||||
#restore BUC60878-wire1.brep a
|
||||
#########dtext -10 -10 -60 "THE CASE IS INCORRECT"
|
||||
#mkoffset r a 1 0.5
|
||||
#tpcompound res
|
||||
#checkshape res
|
||||
|
||||
restore [locate_data_file BUC60878-wire1.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
set che [checkshape a rr]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "Body of the script was not executed"
|
||||
} else {
|
||||
puts "Checking of SOURCE shape by checkshape - OK"
|
||||
mkoffset result a 1 0.5
|
||||
renamevar result_1 result
|
||||
}
|
||||
|
||||
set length 370.796
|
||||
set 2dviewer 0
|
25
tests/bugs/modalg/buc60878_2
Executable file
25
tests/bugs/modalg/buc60878_2
Executable file
@ -0,0 +1,25 @@
|
||||
puts "============="
|
||||
puts "BUC60878"
|
||||
puts "============="
|
||||
|
||||
#restore BUC60878-wire3.brep a
|
||||
#########dtext -10 -10 -60 "THE CASE IS INCORRECT"
|
||||
#mkoffset r a 1 0.25
|
||||
#tpcompound res
|
||||
#checkshape res
|
||||
|
||||
restore [locate_data_file BUC60878-wire3.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
set che [checkshape a rr]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "Body of the script was not executed"
|
||||
} else {
|
||||
puts "Checking of SOURCE shape by checkshape - OK"
|
||||
mkoffset result a 1 0.25
|
||||
renamevar result_1 result
|
||||
}
|
||||
|
||||
set length 11.2406
|
||||
set 2dviewer 0
|
25
tests/bugs/modalg/buc60878_3
Executable file
25
tests/bugs/modalg/buc60878_3
Executable file
@ -0,0 +1,25 @@
|
||||
puts "============="
|
||||
puts "BUC60878"
|
||||
puts "============="
|
||||
|
||||
#restore BUC60878-wire5.brep a
|
||||
###############dtext 0 -10 0 "THE CASE IS INCORRECT"
|
||||
#mkoffset r a 1 4
|
||||
#tpcompound res
|
||||
#checkshape res
|
||||
|
||||
restore [locate_data_file BUC60878-wire5.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
set che [checkshape a rr]
|
||||
if { [regexp {OK} $che] != 1 } {
|
||||
puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
|
||||
puts "Body of the script was not executed"
|
||||
} else {
|
||||
puts "Checking of SOURCE shape by checkshape - OK"
|
||||
mkoffset result a 1 4
|
||||
renamevar result_1 result
|
||||
}
|
||||
|
||||
set length 107.351
|
||||
set 2dviewer 0
|
38
tests/bugs/modalg/buc60880
Executable file
38
tests/bugs/modalg/buc60880
Executable file
@ -0,0 +1,38 @@
|
||||
|
||||
puts "============"
|
||||
puts "BUC60880"
|
||||
puts "============"
|
||||
puts ""
|
||||
##########################################
|
||||
## We have overlapping edges when section a shell by plane.
|
||||
##########################################
|
||||
|
||||
restore [locate_data_file BUC60880_sec_error2.brep] sh
|
||||
puts [checkshape sh]
|
||||
|
||||
plane pl 65000 19000 2600 1 0 0
|
||||
mkface f pl
|
||||
|
||||
bsection result sh f
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
|
||||
|
||||
if { $ed == 1 } {
|
||||
puts "BUC60880 OK: SECTION operation was made properly"
|
||||
} else {
|
||||
explode result e
|
||||
set status [OCC333 result_1 result_2]
|
||||
if {[llength ${status}] < 1} {
|
||||
puts "BUC60880 ERROR"
|
||||
} else {
|
||||
regexp {([-0-9.+eE]+)} $status full code
|
||||
if { ${code} == 3 || ${code} == 2} {
|
||||
puts "BUC60880 : Section command works properly"
|
||||
} else {
|
||||
puts "Faulty BUC60880: Section was made WRONGLY"
|
||||
}
|
||||
}
|
||||
}
|
||||
set length 1424.94
|
||||
set 2dviewer 0
|
46
tests/bugs/modalg/buc60882
Executable file
46
tests/bugs/modalg/buc60882
Executable file
@ -0,0 +1,46 @@
|
||||
puts "============"
|
||||
puts "BUC60882"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
## The edge is corrupted after applying command "fsameparameter": tolerance is increased up to 1e+50
|
||||
#######################################################################
|
||||
|
||||
pload XDE
|
||||
catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands }
|
||||
|
||||
restore [locate_data_file BUC60882_samepar.brep] result
|
||||
|
||||
set che [checkshape result]
|
||||
|
||||
if { [regexp {Faulty} $che ] == 1 } {
|
||||
puts "Warning BUC60882: Source shape is NOT correct. It was detected by Checkshape command"
|
||||
} else {
|
||||
puts "BUC60882 OK: Source shape is valid"
|
||||
}
|
||||
|
||||
puts "*** Before : "
|
||||
|
||||
regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol
|
||||
|
||||
puts "MaxTolerance = $MaxTol"
|
||||
if { $MaxTol > 1 } {
|
||||
puts "Warning : Tolerance of Source edge is more then 1.0"
|
||||
} else {
|
||||
puts " Tolerance of source edge is less then 1.0"
|
||||
}
|
||||
|
||||
fsameparameter result 1e-5
|
||||
|
||||
puts "*** After : "
|
||||
regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol_1
|
||||
|
||||
puts "MaxTolerance = $MaxTol_1"
|
||||
if { $MaxTol_1 > $MaxTol } {
|
||||
puts [format "Faulty BUC60882 : Tolerance of Result edge increased and it is equal to %s" $MaxTol_1]
|
||||
} else {
|
||||
puts " BUC60882 OK: Tolerance of Result edge is less or equal to tolerance of Sourse edge."
|
||||
}
|
||||
|
||||
set length 1768.53
|
||||
set 2dviewer 0
|
18
tests/bugs/modalg/buc60896
Executable file
18
tests/bugs/modalg/buc60896
Executable file
@ -0,0 +1,18 @@
|
||||
|
||||
puts "============"
|
||||
puts "BUC60896"
|
||||
puts "============"
|
||||
puts ""
|
||||
###############################################################
|
||||
## If give command "sameparameter edge" on attached edge in the DRAW this command hang.
|
||||
###############################################################
|
||||
|
||||
restore [locate_data_file BUC60896_edge.rle] result
|
||||
# checkshape res
|
||||
|
||||
sameparameter result
|
||||
sameparameter result tol 1.e-2
|
||||
sameparameter result tol 1000
|
||||
|
||||
set length 48288.3
|
||||
set 2dviewer 0
|
36
tests/bugs/modalg/buc60898
Executable file
36
tests/bugs/modalg/buc60898
Executable file
@ -0,0 +1,36 @@
|
||||
puts "TODO OCC12345 ALL: Faulty BUC60898: here is reading problem"
|
||||
puts "TODO OCC12345 ALL: Error : The command can not be build."
|
||||
|
||||
puts "==========="
|
||||
puts " BUC60898"
|
||||
puts "==========="
|
||||
puts ""
|
||||
|
||||
pload XDE
|
||||
catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands }
|
||||
|
||||
if [catch { igesbrep [locate_data_file $filedir/buc60898.igs] a *} result] {
|
||||
## rename to BUC60898.igs
|
||||
puts "Faulty BUC60898: here is reading problem"
|
||||
} else {
|
||||
puts "BUC60898 OK"
|
||||
tpcompound a
|
||||
|
||||
if [catch {sewing result 1e-7 a } catch_result] {
|
||||
puts "Faulty BUC60898: function SEWING gives except"
|
||||
} else {
|
||||
puts " BUC60898 OK: function SEWING works without except"
|
||||
}
|
||||
}
|
||||
|
||||
#checkshape res
|
||||
#set che [checkshape res r]
|
||||
#set err [lindex $che [expr [llength $che] - 1]]
|
||||
#if { $err != "OK"} {
|
||||
# puts "Faulty : mistakes are found in checked shape by checkshape command"
|
||||
#} else {
|
||||
# puts "Checking by checkshape - OK"
|
||||
#}
|
||||
|
||||
set square 0
|
||||
set 2dviewer 0
|
27
tests/bugs/modalg/buc60922
Executable file
27
tests/bugs/modalg/buc60922
Executable file
@ -0,0 +1,27 @@
|
||||
|
||||
puts "============"
|
||||
puts "BUC60922"
|
||||
puts "============"
|
||||
puts ""
|
||||
#############################
|
||||
## Exception NumericError in Extrema
|
||||
#############################
|
||||
|
||||
restore [locate_data_file BUC60907_px1.rle] sh
|
||||
puts [checkshape sh]
|
||||
|
||||
line l 40 0 5 0 1 0
|
||||
mkedge e l
|
||||
subshape sh F 379
|
||||
mksurface result sh_379
|
||||
|
||||
puts "Info: compute extrema"
|
||||
extrema result l
|
||||
|
||||
puts "Info: compute distmini"
|
||||
distmini r sh e
|
||||
|
||||
mkface result result
|
||||
|
||||
set square 157.932
|
||||
set 2dviewer 0
|
20
tests/bugs/modalg/buc60926
Executable file
20
tests/bugs/modalg/buc60926
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
puts "============"
|
||||
puts "BUC60926"
|
||||
puts "============"
|
||||
puts ""
|
||||
######################################################################
|
||||
## Creating a sphere of radius 1 at 0,0,0 and a cone with r1=1 r2=2 height=2 angle=3*PI/2 at 1,1,0 and
|
||||
## then using BRepAlgoAPI_Fuse on the two solids will trigger a segmentation fault.
|
||||
######################################################################
|
||||
|
||||
restore [locate_data_file shading_132.brep] a
|
||||
puts [checkshape a]
|
||||
|
||||
restore [locate_data_file BUC60926-2.brep] b
|
||||
puts [checkshape b]
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 41.7175
|
||||
set 2dviewer 0
|
25
tests/bugs/modalg/buc60946
Executable file
25
tests/bugs/modalg/buc60946
Executable file
@ -0,0 +1,25 @@
|
||||
|
||||
puts "============"
|
||||
puts "BUC60946"
|
||||
puts "============"
|
||||
|
||||
restore [locate_data_file BUC60946_prism.brep] c
|
||||
explode c
|
||||
puts [checkshape c_1]
|
||||
puts [checkshape c_2]
|
||||
|
||||
renamevar c_1 sh
|
||||
renamevar c_2 pr
|
||||
bsection result sh pr
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_vertices
|
||||
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_edges
|
||||
|
||||
if { $nb_vertices != $nb_edges } {
|
||||
puts "Section is opened: Faulty shape"
|
||||
} else {
|
||||
puts "Section is closed: OK"
|
||||
}
|
||||
set length 52.5057
|
||||
set 2dviewer 0
|
41
tests/bugs/modalg/bug110_1
Executable file
41
tests/bugs/modalg/bug110_1
Executable file
@ -0,0 +1,41 @@
|
||||
|
||||
puts "========================"
|
||||
puts " BUC60706 "
|
||||
puts " OCC110 "
|
||||
puts "(cases 1-3)"
|
||||
puts "========================"
|
||||
|
||||
restore [locate_data_file buc60706a.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706b.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
restore [locate_data_file buc60706c.brep] s
|
||||
puts [checkshape s]
|
||||
|
||||
bcut res_1 s t
|
||||
puts [checkshape res_1]
|
||||
|
||||
restore [locate_data_file buc60706d.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706e.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
bcut res_2 res_1 t
|
||||
puts [checkshape res_2]
|
||||
|
||||
restore [locate_data_file buc60706g.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706h.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
bcut result res_2 t
|
||||
|
||||
set square 865172
|
||||
set 2dviewer 0
|
41
tests/bugs/modalg/bug110_2
Executable file
41
tests/bugs/modalg/bug110_2
Executable file
@ -0,0 +1,41 @@
|
||||
|
||||
puts "========================"
|
||||
puts " BUC60706 "
|
||||
puts " OCC110 "
|
||||
puts "(case 4-6)"
|
||||
puts "========================"
|
||||
|
||||
restore [locate_data_file buc60706j.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706b.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
restore [locate_data_file buc60706l.brep] s
|
||||
puts [checkshape s]
|
||||
|
||||
bcut res_1 s t
|
||||
puts [checkshape res_1]
|
||||
|
||||
restore [locate_data_file buc60706m.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706e.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
bcut res_2 res_1 t
|
||||
puts [checkshape res_2]
|
||||
|
||||
restore [locate_data_file buc60706p.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706h.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
bcut result res_2 t
|
||||
|
||||
set square 860752
|
||||
set 2dviewer 0
|
41
tests/bugs/modalg/bug110_3
Executable file
41
tests/bugs/modalg/bug110_3
Executable file
@ -0,0 +1,41 @@
|
||||
|
||||
puts "========================"
|
||||
puts " BUC60706 "
|
||||
puts " OCC110 "
|
||||
puts "(case 7-9)"
|
||||
puts "========================"
|
||||
|
||||
restore [locate_data_file buc60706s.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706b.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
restore [locate_data_file buc60706l.brep] s
|
||||
puts [checkshape s]
|
||||
|
||||
bcut res_1 s t
|
||||
puts [checkshape res_1]
|
||||
|
||||
restore [locate_data_file buc60706v.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706e.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
bcut res_2 res_1 t
|
||||
puts [checkshape res_2]
|
||||
|
||||
restore [locate_data_file buc60706x.brep] f
|
||||
puts [checkshape f]
|
||||
|
||||
restore [locate_data_file buc60706h.brep] w
|
||||
puts [checkshape w]
|
||||
pipe t w f
|
||||
|
||||
bcut result res_2 t
|
||||
|
||||
set square 861220
|
||||
set 2dviewer 0
|
29
tests/bugs/modalg/bug23
Executable file
29
tests/bugs/modalg/bug23
Executable file
@ -0,0 +1,29 @@
|
||||
puts "TODO OCC12345 ALL: Faulty OCC23 : Checkshape command works wrongly"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
puts "================"
|
||||
puts "OCC23"
|
||||
puts "================"
|
||||
puts ""
|
||||
#####################################################################
|
||||
## Checkshape gives result that there is a selfintersection on wire, but there are no intersection on it.
|
||||
#####################################################################
|
||||
|
||||
restore [locate_data_file OCC23.brep] sh
|
||||
|
||||
decho off
|
||||
set che [checkshape sh]
|
||||
decho on
|
||||
|
||||
if { [regexp {Faulty} $che] == 1 } {
|
||||
puts "Faulty OCC23 : Checkshape command works wrongly"
|
||||
} else {
|
||||
puts "OCC23 OK : Checkshape command works properly"
|
||||
}
|
||||
|
||||
explode sh f
|
||||
explode sh_2 w
|
||||
|
||||
renamevar sh_2_1 result
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
31
tests/bugs/modalg/bug238_1
Executable file
31
tests/bugs/modalg/bug238_1
Executable file
@ -0,0 +1,31 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : Result shape is WRONG !!!"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
puts "========================"
|
||||
puts " OCC238 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPCOMMON case_2_solid.brep and case_2_edge1.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
puts [restore [locate_data_file OCC238a.brep] a]
|
||||
puts [restore [locate_data_file case_2_edge1.brep] b]
|
||||
puts [bop a b]
|
||||
puts [bopcommon result b a]
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 14
|
||||
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
|
||||
if { [expr $dis > 1.e-5] } {
|
||||
puts "Faulty : Result shape is WRONG !!!"
|
||||
} else {
|
||||
puts " Result shape is COMPLITE"
|
||||
}
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
31
tests/bugs/modalg/bug238_2
Executable file
31
tests/bugs/modalg/bug238_2
Executable file
@ -0,0 +1,31 @@
|
||||
puts "TODO OCC12345 ALL: Faulty : Result shape is WRONG !!!"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
puts "========================"
|
||||
puts " OCC238 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPTUC case_2_solid.brep from case_2_edge1.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
puts [restore [locate_data_file OCC238a.brep] a]
|
||||
puts [restore [locate_data_file case_2_edge1.brep] b]
|
||||
puts [bop a b]
|
||||
puts [boptuc result b a]
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 14
|
||||
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
|
||||
if { [expr $dis > 1.e-5] } {
|
||||
puts "Faulty : Result shape is WRONG !!!"
|
||||
} else {
|
||||
puts " Result shape is COMPLITE"
|
||||
}
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
23
tests/bugs/modalg/bug239_1
Executable file
23
tests/bugs/modalg/bug239_1
Executable file
@ -0,0 +1,23 @@
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contain"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC239 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPCOMMON case_2_solid.brep and case_2_wire1.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC238a.brep] a
|
||||
restore [locate_data_file case_2_wire1.brep] b
|
||||
puts [bop a b]
|
||||
puts [bopcommon result]
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 18
|
||||
set nb_e_good 10
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
20
tests/bugs/modalg/bug239_2
Executable file
20
tests/bugs/modalg/bug239_2
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
puts "========================"
|
||||
puts " OCC239 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPTUC case_2_solid.brep and case_2_wire1.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC238a.brep] a
|
||||
restore [locate_data_file case_2_wire1.brep] b
|
||||
puts [bop a b]
|
||||
puts [boptuc result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 18
|
||||
set nb_e_good 11
|
||||
|
||||
set length 2481.26
|
||||
set 2dviewer 0
|
||||
|
22
tests/bugs/modalg/bug240_1
Executable file
22
tests/bugs/modalg/bug240_1
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : The command is not valid"
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC240 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPCOMMON case_2_shell.brep and case_2_edge2.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC240a.brep] a
|
||||
restore [locate_data_file case_2_edge2.brep] b
|
||||
puts [bop a b]
|
||||
puts [bopcommon result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 14
|
||||
set nb_e_good 6
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
22
tests/bugs/modalg/bug240_2
Executable file
22
tests/bugs/modalg/bug240_2
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC240 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPTUC case_2_shell.brep and case_2_edge2.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC240a.brep] a
|
||||
restore [locate_data_file case_2_edge2.brep] b
|
||||
puts [bop a b]
|
||||
puts [boptuc result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 14
|
||||
set nb_e_good 7
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
22
tests/bugs/modalg/bug241_1
Executable file
22
tests/bugs/modalg/bug241_1
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : The command is not valid"
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC241 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPCOMMON case_2_shell.brep and case_2_edge3.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC240a.brep] a
|
||||
restore [locate_data_file case_2_edge3.brep] b
|
||||
puts [bop a b]
|
||||
puts [bopcommon result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 6
|
||||
set nb_e_good 3
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
22
tests/bugs/modalg/bug241_2
Executable file
22
tests/bugs/modalg/bug241_2
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC241 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPTUC case_2_shell.brep and case_2_edge3.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC240a.brep] a
|
||||
restore [locate_data_file case_2_edge3.brep] b
|
||||
puts [bop a b]
|
||||
puts [boptuc result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 6
|
||||
set nb_e_good 3
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
22
tests/bugs/modalg/bug242_1
Executable file
22
tests/bugs/modalg/bug242_1
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : The command is not valid"
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC242 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPCOMMON case_2_shell.brep and case_2_wire1.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC240a.brep] a
|
||||
restore [locate_data_file case_2_wire1.brep] b
|
||||
puts [bop a b]
|
||||
puts [bopcommon result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 18
|
||||
set nb_e_good 9
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
22
tests/bugs/modalg/bug242_2
Executable file
22
tests/bugs/modalg/bug242_2
Executable file
@ -0,0 +1,22 @@
|
||||
puts "TODO OCC12345 ALL: Error : The length of result shape is"
|
||||
puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
|
||||
|
||||
puts "========================"
|
||||
puts " OCC242 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPTUC case_2_shell.brep and case_2_wire1.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file OCC240a.brep] a
|
||||
restore [locate_data_file case_2_wire1.brep] b
|
||||
puts [bop a b]
|
||||
puts [boptuc result]
|
||||
set nb_info [nbshapes result]
|
||||
set nb_v_good 18
|
||||
set nb_e_good 13
|
||||
|
||||
set length 0
|
||||
set 2dviewer 0
|
||||
|
20
tests/bugs/modalg/bug243_1
Executable file
20
tests/bugs/modalg/bug243_1
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
puts "========================"
|
||||
puts " OCC243 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPCOMMON case_4_shell.brep and case_4_wire3.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file case_4_shell.brep] a
|
||||
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
|
||||
|
20
tests/bugs/modalg/bug243_2
Executable file
20
tests/bugs/modalg/bug243_2
Executable file
@ -0,0 +1,20 @@
|
||||
|
||||
puts "========================"
|
||||
puts " OCC243 "
|
||||
puts "========================"
|
||||
|
||||
#################################################
|
||||
## puts " BOPTUC case_4_shell.brep and case_4_wire3.brep"
|
||||
#################################################
|
||||
puts " "
|
||||
restore [locate_data_file case_4_shell.brep] a
|
||||
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 1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user