--- /dev/null
+puts "================"
+puts "OCC1054"
+puts "================"
+puts ""
+#######################################################################################
+# Mechanism of transactions' synchronization and mechanizm of nested transactions
+#######################################################################################
+# Case 1 (nested mode ON)
+#######################################################################################
+
+proc OCC1054_Check_dump {IsGood index good_index case} {
+ # Check dump
+ if { ${index} != ${good_index} } {
+ set IsGood 0
+ puts "OCC1054 Error (case ${case} : index = ${index} good_index = ${good_index})"
+ }
+ return ${IsGood}
+}
+
+proc OCC1054_Check_real_attribute {IsGood doc label good_real case} {
+ global ${doc}
+ # Check real attribute
+ set percent_max 0.1
+ if [catch { set real [GetReal ${doc} ${label}] } message] {
+ set IsGood 0
+ puts "OCC1054 Error (case ${case})"
+ } else {
+ set real_percent [expr abs(${real} - ${good_real}) / double(${good_real}) * 100.]
+ if {${real_percent} > ${percent_max}} {
+ puts "good_real = ${good_real}"
+ puts "real = ${real}"
+ puts "real_percent = ${real_percent}"
+ puts "OCC1054 Error (case ${case}-2)"
+ }
+ }
+ return ${IsGood}
+}
+
+
+set IsGood 1
+set Case 0
+
+NewDocument doc1
+NewDocument doc2
+NewDocument doc3
+mtmCreate 4
+
+mtmNestedMode 1
+
+mtmAdd doc1
+
+mtmOpen
+ SetReal doc1 0:1:1 1.1
+ OpenCommand doc1
+ SetReal doc1 0:1:1 11
+ AbortCommand doc1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 12.1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 121
+ AbortCommand doc1
+
+ SetReal doc1 0:1:4 12.2
+ CommitCommand doc1
+
+ SetReal doc1 0:1:1 1.2
+ SetReal doc1 0:1:4 1.3
+mtmCommit Transaction1
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There is one document ( "2690640" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2690640" ) < Last action
+#
+# *** End ***
+################################################################################
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 21 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 29 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1:1 1.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1:3 12.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1:4 1.3 [incr Case]]
+
+mtmAdd doc2
+mtmAdd doc3
+
+mtmOpen
+ SetReal doc2 0:2:1 2.1
+ SetReal doc1 0:2:2 2.1
+ OpenCommand doc1
+ OpenCommand doc2
+ SetReal doc2 0:2:1 21
+ SetReal doc1 0:2:2 21
+ AbortCommand doc2
+
+ OpenCommand doc3
+ OpenCommand doc2
+ SetReal doc3 0:2:3 22.1
+ SetReal doc2 0:2:3 22.1
+
+ OpenCommand doc2
+ SetReal doc2 0:2:3 221
+ AbortCommand doc2
+
+ SetReal doc3 0:2:4 22.2
+ CommitCommand doc2
+ CommitCommand doc3
+ AbortCommand doc1
+
+ SetReal doc1 0:2:1 2.2
+ SetReal doc1 0:2:4 2.3
+mtmCommit Transaction2
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 1.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 12.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 1.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmOpen
+ SetReal doc1 0:1:1 3.1
+ OpenCommand doc1
+ SetReal doc1 0:1:1 31
+ AbortCommand doc1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 32.1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 321
+ AbortCommand doc1
+
+ SetReal doc1 0:1:4 32.2
+ CommitCommand doc1
+
+ SetReal doc1 0:1:1 3.2
+ SetReal doc1 0:1:4 3.3
+mtmCommit Transaction3
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" )
+# Undo: Transaction3 - 1 documents ( "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 3.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 32.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmUndo
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) < Last action
+# Redo: Transaction3 - 1 documents ( "2809192" )
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set redo3 [lindex ${list} [expr ${index3} - 1]]
+set index4 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 44 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${redo3} "Redo:" [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 41 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 1.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 12.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 1.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmOpen
+ SetReal doc1 0:1:1 4.1
+ OpenCommand doc1
+ SetReal doc1 0:1:1 41
+ AbortCommand doc1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 42.1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 421
+mtmAbort
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" ) < Last action
+# Redo: Transaction3 - 1 documents ( "2809192" )
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set redo3 [lindex ${list} [expr ${index3} - 1]]
+set index4 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 44 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${redo3} "Redo:" [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 41 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 1.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 12.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 1.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmRedo
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" )
+# Undo: Transaction3 - 1 documents ( "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set undo3 [lindex ${list} [expr ${index3} - 1]]
+set index4 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${undo3} "Undo:" [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 3.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 32.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmOpen
+ SetReal doc1 0:1:1 5.1
+ OpenCommand doc1
+ SetReal doc1 0:1:1 51
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 52.1
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 521
+mtmCommit Transaction5
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "2697976" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "2697976" "2705536" "2809192" )
+# Undo: Transaction3 - 1 documents ( "2809192" )
+# Undo: Transaction5 - 1 documents ( "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "Transaction5"]
+set docnum4 [lindex ${list} [expr ${index4} + 2]]
+set index5 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 57 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 51 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 521 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmUndo
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "3095112" "2705536" "2809192" )
+# Undo: Transaction3 - 1 documents ( "2809192" ) < Last action
+# Redo: Transaction5 - 1 documents ( "2809192" )
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "Transaction5"]
+set docnum4 [lindex ${list} [expr ${index4} + 2]]
+set redo4 [lindex ${list} [expr ${index4} - 1]]
+set index5 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 52 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${redo4} "Redo:" [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 49 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 3.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 32.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+mtmOpen
+ SetReal doc1 0:1:1 6.1
+ OpenCommand doc1
+ SetReal doc1 0:1:1 61
+
+ OpenCommand doc1
+ SetReal doc1 0:1:3 62.1
+
+mtmCommit Transaction6
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager
+# Nested transaction mode is on
+#
+# Undo: Transaction1 - 1 documents ( "2809192" )
+# Undo: Transaction2 - 3 documents ( "3095112" "2705536" "2809192" )
+# Undo: Transaction3 - 1 documents ( "2809192" )
+# Undo: Transaction6 - 1 documents ( "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+
+set index1 [lsearch -exact ${list} "Transaction1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Transaction2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Transaction3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "Transaction6"]
+set docnum4 [lindex ${list} [expr ${index4} + 2]]
+set index5 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 41 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 57 [incr Case]]
+
+# Check real attributes
+# doc1
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:1 61 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:3 62.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:1:4 3.3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:1 2.2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:2 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc1 0:2:4 2.3 [incr Case]]
+# doc2
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:1 2.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc2 0:2:3 22.1 [incr Case]]
+# doc3
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:3 22.1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} doc3 0:2:4 22.2 [incr Case]]
+
+if { ${IsGood} == 1 } {
+ puts "OCC1054 OK"
+} else {
+ puts "OCC1054 Error"
+}
--- /dev/null
+puts "================"
+puts "OCC1054"
+puts "================"
+puts ""
+#######################################################################################
+# Mechanism of transactions' synchronization and mechanizm of nested transactions
+#######################################################################################
+# Case 2 (nested mode OFF)
+#######################################################################################
+
+proc OCC1054_Check_dump {IsGood index good_index case} {
+ # Check dump
+ if { ${index} != ${good_index} } {
+ set IsGood 0
+ puts "OCC1054 Error (case ${case} : index = ${index} good_index = ${good_index})"
+ }
+ return ${IsGood}
+}
+
+proc OCC1054_Check_real_attribute {IsGood doc label good_real case} {
+ global ${doc}
+ # Check real attribute
+ set percent_max 0.1
+ if [catch { set real [GetReal ${doc} ${label}] } message] {
+ set IsGood 0
+ puts "OCC1054 Error (case ${case})"
+ } else {
+ set real_percent [expr abs(${real} - ${good_real}) / double(${good_real}) * 100.]
+ if {${real_percent} > ${percent_max}} {
+ puts "good_real = ${good_real}"
+ puts "real = ${real}"
+ puts "real_percent = ${real_percent}"
+ puts "OCC1054 Error (case ${case}-2)"
+ }
+ }
+ return ${IsGood}
+}
+
+
+set IsGood 1
+set Case 0
+
+NewDocument doc1
+NewDocument doc2
+NewDocument doc3
+mtmCreate 4
+
+mtmAdd doc1
+
+mtmOpen
+SetReal doc1 0:1 1
+mtmCommit tr1
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There is one document ( "2809192" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr1 - 1 documents ( "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} "one" [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 21 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 29 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+
+
+mtmAdd doc2
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 2 documents ( "2809192" "2705536" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr1 - 1 documents ( "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 22 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 30 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+
+mtmOpen
+SetReal doc2 0:1 2
+mtmCommit tr2
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 2 documents ( "2809192" "2705536" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr1 - 1 documents ( "2809192" )
+# Undo: tr2 - 1 documents ( "2705536" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "tr2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 22 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 30 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 38 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]]
+
+SetReal doc3 0:1 1
+mtmAdd doc3
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr1 - 1 documents ( "2809192" )
+# Undo: tr2 - 1 documents ( "2705536" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "tr2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 39 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]]
+
+mtmOpen
+SetReal doc1 0:2 2
+SetReal doc3 0:2 2
+mtmCommit tr3
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr1 - 1 documents ( "2809192" )
+# Undo: tr2 - 1 documents ( "2705536" )
+# Undo: tr3 - 2 documents ( "3095112" "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "tr2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "tr3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 39 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 48 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:2 2 [incr Case]]
+
+mtmOpen
+SetReal doc2 0:2 2
+SetReal doc3 0:3 3
+mtmCommit tr4
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr1 - 1 documents ( "2809192" )
+# Undo: tr2 - 1 documents ( "2705536" )
+# Undo: tr3 - 2 documents ( "3095112" "2809192" )
+# Undo: tr4 - 2 documents ( "3095112" "2705536" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr1"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "tr2"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "tr3"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "tr4"]
+set docnum4 [lindex ${list} [expr ${index4} + 2]]
+set index5 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 39 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 48 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 57 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:3 3 [incr Case]]
+
+mtmOpen
+SetReal doc1 0:3 3
+SetReal doc2 0:3 3
+mtmCommit tr5
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There are 3 documents ( "2809192" "2705536" "3095112" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: tr2 - 1 documents ( "2705536" )
+# Undo: tr3 - 2 documents ( "3095112" "2809192" )
+# Undo: tr4 - 2 documents ( "3095112" "2705536" )
+# Undo: tr5 - 2 documents ( "2705536" "2809192" ) < Last action
+#
+# *** End ***
+################################################################################
+set docnum0 [lindex ${list} 7]
+set index1 [lsearch -exact ${list} "tr2"]
+set docnum1 [lindex ${list} [expr ${index1} + 2]]
+set index2 [lsearch -exact ${list} "tr3"]
+set docnum2 [lindex ${list} [expr ${index2} + 2]]
+set index3 [lsearch -exact ${list} "tr4"]
+set docnum3 [lindex ${list} [expr ${index3} + 2]]
+set index4 [lsearch -exact ${list} "tr5"]
+set docnum4 [lindex ${list} [expr ${index4} + 2]]
+set index5 [lsearch -exact ${list} "Last"]
+
+# Check dump
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum0} 3 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index1} 23 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum1} 1 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index2} 31 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum2} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index3} 40 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum3} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index4} 49 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${docnum4} 2 [incr Case]]
+set IsGood [OCC1054_Check_dump ${IsGood} ${index5} 58 [incr Case]]
+
+# Check real attributes
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:1 1 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc1} 0:3 3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:1 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc2} 0:3 3 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:2 2 [incr Case]]
+set IsGood [OCC1054_Check_real_attribute ${IsGood} ${doc3} 0:3 3 [incr Case]]
+
+if { ${IsGood} == 1 } {
+ puts "OCC1054 OK"
+} else {
+ puts "OCC1054 Error"
+}
NewDocument D MDTV-Standard
UndoLimit D 10
-restore [locate_data_file OCC114.brep] s
+restore [locate_data_file OCC294.brep] s
set listmem {}
for {set i 1} {${i} <= ${i_max}} {incr i} {
--- /dev/null
+puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2"
+puts "TODO OCC12345 ALL: OCC1395 Error"
+
+puts "================"
+puts "OCC1395"
+puts "================"
+puts ""
+#######################################################################################
+# Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document
+#######################################################################################
+# Case 1 (Undo)
+#######################################################################################
+
+set IsGood 1
+
+# Create a new document and set UndoLimit
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+# Create a label
+set aLabel 0:2
+Label D ${aLabel}
+
+# Open a transaction
+OpenTran D
+
+# Set integer attribute
+set anInteger 5
+SetInteger D ${aLabel} ${anInteger}
+
+# Commit transaction
+CommitTran D 1
+
+# Undo
+DFUndo D 1
+
+# Check integer attributes
+if [catch { set Integer [GetInteger D ${aLabel}] } message] {
+ set IsGood 0
+ puts "OCC1395 Error : There is not the integer attribute on the label ${aLabel}"
+} else {
+ puts "OCC1395 OK : There is the integer attribute on the label ${aLabel}"
+}
+
+# Set real attribute
+set aReal 8.8
+SetReal D ${aLabel} ${aReal}
+
+# Undo
+DFUndo D 1
+
+# Check real attributes
+if [catch { set Real [GetReal D ${aLabel}] } message] {
+ set IsGood 0
+ puts "OCC1395 Error : There is not the real attribute on the label ${aLabel}"
+} else {
+ puts "OCC1395 OK : There is the real attribute on the label ${aLabel}"
+}
+
+if { ${IsGood} == 1 } {
+ puts "OCC1395 OK"
+} else {
+ puts "OCC1395 Error"
+}
--- /dev/null
+puts "TODO OCC12345 ALL: OCC1395 Error : There is not the integer attribute on the label 0:2"
+puts "TODO OCC12345 ALL: OCC1395 Error"
+
+puts "================"
+puts "OCC1395"
+puts "================"
+puts ""
+#######################################################################################
+# Wrong behaviour of Undo Redo and SetUndoLimit methods in TDocStd_Document
+#######################################################################################
+# Case 3 (SetUndoLimit)
+#######################################################################################
+
+# Create a new document and set UndoLimit
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+# Create a label
+set aLabel 0:2
+Label D ${aLabel}
+
+# Open a transaction
+OpenTran D
+
+# Set integer attribute
+set anInteger 5
+SetInteger D ${aLabel} ${anInteger}
+
+# Commit transaction
+CommitTran D 1
+
+# Set UndoLimit
+UndoLimit D 10
+
+# Set real attribute
+set aReal 8.8
+SetReal D ${aLabel} ${aReal}
+
+# Undo
+DFUndo D 1
+
+# Check integer and real attributes
+set IsGood 1
+if [catch { set Integer [GetInteger D ${aLabel}] } message] {
+ set IsGood 0
+ puts "OCC1395 Error : There is not the integer attribute on the label ${aLabel}"
+} else {
+ puts "OCC1395 OK : There is the integer attribute on the label ${aLabel}"
+}
+if [catch { set Real [GetReal D ${aLabel}] } message] {
+ set IsGood 0
+ puts "OCC1395 Error : There is not the real attribute on the label ${aLabel}"
+} else {
+ puts "OCC1395 OK : There is the real attribute on the label ${aLabel}"
+}
+
+if { ${IsGood} == 1 } {
+ puts "OCC1395 OK"
+} else {
+ puts "OCC1395 Error"
+}
--- /dev/null
+puts "TODO ?OCC12345 ALL: Elapsed time is more then 20.0 seconds - Faulty"
+puts "TODO ?OCC12345 ALL: Faulty OCC1454"
+
+puts "===== OCC1454 ====="
+#######################################################################################
+# Improve performance of TDF_Label::FindChild
+#######################################################################################
+
+puts "Info: Open the document with 80000 sublabels of the label 0:2"
+chrono h reset; chrono h start
+Open [locate_data_file OCC1726.std] D
+chrono h stop; set TimeList [chrono h show]
+
+set ElapsedTime_min [lindex ${TimeList} 4]
+set ElapsedTime_sec [lindex ${TimeList} 6]
+set CPUusertime [lindex ${TimeList} 11]
+set CPUsystemtime [lindex ${TimeList} 16]
+puts "ElapsedTime = ${ElapsedTime_min} min ${ElapsedTime_sec} sec CPUusertime = ${CPUusertime} CPUsystemtime = ${CPUsystemtime}"
+
+if { ${ElapsedTime_sec} > 20.0 || ${ElapsedTime_min} != 0 } {
+ puts "Elapsed time is more then 20.0 seconds - Faulty"
+ puts "Faulty OCC1454"
+} elseif { ${CPUusertime} > 12 } {
+ puts "CPUusertime is more then 12 seconds - Faulty"
+ puts "Faulty OCC1454"
+} elseif { ${CPUsystemtime} > 0.6 } {
+ puts "CPUsystemtime is more then 0.6 seconds"
+ puts "Faulty OCC1454"
+} else {
+ puts "Elapsed time is less then 20 seconds - OK"
+ puts "CPU user time is less then 12 seconds - OK"
+ puts "CPU system time is less then 0.6 seconds - OK"
+ puts "OK for OCC1454"
+}
--- /dev/null
+puts "==========="
+puts "OCC159"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+set log [OCC159 D]
+
+set list [split ${log}]
+set ll [llength ${list}]
+
+if { ${ll} < 13} then {
+ puts "OCC159: Error"
+} else {
+ set DocRefCount1 [lindex ${list} 2]
+ set DocOwner1 [lindex ${list} 5]
+ set DocOwner2 [lindex ${list} 8]
+ set DocRefCount2 [lindex ${list} 11]
+ set deltaRefCount [expr ${DocRefCount1} - ${DocRefCount2}]
+ if { ${DocOwner2} == "NULL" && ${deltaRefCount} >= 1 } then {
+ puts "OCC159: OK"
+ } else {
+ puts "OCC159: Error"
+ }
+}
+
--- /dev/null
+puts "================"
+puts "OCC1722"
+puts "================"
+puts ""
+#######################################################################################
+# Wrong behaviour of the method CommitCommand of class TDocStd_MultiTransactionManager
+#######################################################################################
+
+proc OCC1722_Check_real_attribute {IsGood doc label good_real case} {
+ global ${doc}
+ # Check real attribute
+ set percent_max 0.1
+ if [catch { set real [GetReal ${doc} ${label}] } message] {
+ set IsGood 0
+ puts "OCC1722 Error (case ${case})"
+ } else {
+ set real_percent [expr abs(${real} - ${good_real}) / double(${good_real}) * 100.]
+ if {${real_percent} > ${percent_max}} {
+ puts "good_real = ${good_real}"
+ puts "real = ${real}"
+ puts "real_percent = ${real_percent}"
+ puts "OCC1722 Error (case ${case}-2)"
+ }
+ }
+ return ${IsGood}
+}
+
+
+set IsGood 1
+set Case 0
+set aLabel 0:1:1
+set aReal1 1.1
+set aReal2 2.1
+
+
+NewDocument doc1
+mtmCreate 4
+
+mtmAdd doc1
+
+SetReal doc1 ${aLabel} ${aReal1}
+set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal1} [incr Case]]
+
+OpenCommand doc1
+SetReal doc1 ${aLabel} ${aReal2}
+set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal2} [incr Case]]
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There is one document ( "3095112" ) in the manager
+# Nested transaction mode is off
+#
+#
+# *** End ***
+################################################################################
+set index1 [lsearch -exact ${list} "Undo:"]
+
+# Check dump
+set case [incr Case]
+if { ${index1} != -1 } {
+ set IsGood 0
+ puts "OCC1722 Error (case ${case})"
+}
+
+mtmCommit Transaction1
+
+set list [mtmDump]
+################################################################################
+# *** Dump of MTM ***
+# There is one document ( "3095112" ) in the manager
+# Nested transaction mode is off
+#
+# Undo: Transaction1 - 1 documents ( "3095112" ) < Last action
+#
+# *** End ***
+################################################################################
+set index2 [lsearch -exact ${list} "Undo:"]
+
+# Check dump
+set case [incr Case]
+if { ${index2} == -1 } {
+ set IsGood 0
+ puts "OCC1722 Error (case ${case})"
+}
+
+Undo doc1
+set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal1} [incr Case]]
+
+Redo doc1
+set IsGood [OCC1722_Check_real_attribute ${IsGood} ${doc1} ${aLabel} ${aReal2} [incr Case]]
+
+
+if { ${IsGood} == 1 } {
+ puts "OCC1722 OK"
+} else {
+ puts "OCC1722 Error"
+}
--- /dev/null
+puts "================"
+puts "OCC1724"
+puts "OCC2707"
+puts "================"
+puts ""
+#######################################################################################
+# BinOcaf: portability of binary file between platforms
+#######################################################################################
+# Various improvements of RINA LH3D-3H project
+#######################################################################################
+
+set QA_DUP 0
+
+set SetIntegerAttribute 100
+set SetRealAttribute 123.45
+set aFrom1 1
+set aTo1 2
+set SetReal1 3.21
+set SetReal2 4.56
+set aFrom2 11
+set aTo2 12
+set SetInteger1 3
+set SetInteger2 4
+set aLabel 0:2
+
+
+#### FOR PREPARING TEST ONLY ####
+#### # Create testing document
+#### NewDocument Doc BinOcaf
+#### UndoLimit Doc 100
+#### NewCommand Doc
+####
+#### # Set an integer attribute
+#### SetInteger Doc ${aLabel} ${SetIntegerAttribute}
+####
+#### # Set a real attribute
+#### SetReal Doc ${aLabel} ${SetRealAttribute}
+####
+#### # Set a real array attribute
+#### SetRealArray Doc ${aLabel} ${aFrom1} ${aTo1} ${SetReal1} ${SetReal2}
+####
+#### # Set an integer array attribute
+#### SetIntArray Doc ${aLabel} ${aFrom2} ${aTo2} ${SetInteger1} ${SetInteger2}
+####
+#### NewCommand Doc
+####
+#### # Save the document
+#### set OS $tcl_platform(os)
+#### if { ${OS} == "SunOS" } {
+#### puts "SunOS"
+#### set aFile ${WorkDirectory}/OCC1724-[file tail [info script]]-SunOS.cbf
+#### } else {
+#### puts "WNT"
+#### set aFile ${WorkDirectory}/OCC1724-[file tail [info script]]-WNT.cbf
+#### }
+#### puts "aFile=${aFile}"
+#### catch {exec rm -f ${aFile}}
+#### catch {SaveAs Doc ${aFile}}
+#### if { ![file exists ${aFile}] } {
+#### puts "There is not ${aFile} file; SaveAs command: Error"
+#### puts "OCC1724: ERROR (case 1)"
+#### }
+#### catch {exec chmod 777 ${aFile}}
+#### Close Doc
+#### FOR PREPARING TEST ONLY ####
+
+set IsGood 1
+
+Open [locate_data_file OCC1724-M3-WNT.cbf] DDoc
+
+# Get a value of integer attribute
+set GetIntegerAttribute ""
+set IsDone [catch {set GetIntegerAttribute [GetInteger DDoc ${aLabel}]} message]
+if { ${IsDone} != 0 ||
+ ${SetIntegerAttribute}!=${GetIntegerAttribute} } {
+ puts ${message}
+ puts "SetIntegerAttribute=${SetIntegerAttribute} GetIntegerAttribute=${GetIntegerAttribute}"
+ puts "Get a value of TDataStd_Integer attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 3)"
+ set IsGood 0
+} else {
+ puts "Get a value of TDataStd_Integer attribute from restoring document: OK"
+}
+
+# Get a value of real attribute
+set GetRealAttribute ""
+set IsDone [catch {set GetRealAttribute [GetReal DDoc ${aLabel}]} message]
+if { ${IsDone} != 0 ||
+ ${SetRealAttribute}!=${GetRealAttribute} } {
+ puts ${message}
+ puts "SetRealAttribute=${SetRealAttribute} GetRealAttribute=${GetRealAttribute}"
+ puts "Get a value of TDataStd_Real attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 4)"
+ set IsGood 0
+} else {
+ puts "Get a value of TDataStd_Real attribute from restoring document: OK"
+}
+
+# Get a value of real array attribute
+set GetRealArrayAttribute ""
+set IsDone [catch {set GetRealArrayAttribute [GetRealArray DDoc ${aLabel}]} message]
+if { ${IsDone} != 0 } {
+ puts ${message}
+ puts "Get a value of TDataStd_RealArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 5)"
+ set IsGood 0
+}
+set aRealArrayLength [llength ${GetRealArrayAttribute}]
+if { ${aRealArrayLength} != [expr ${aTo1} - ${aFrom1} + 1] } {
+ puts "aRealArrayLength=${aRealArrayLength}"
+ puts "Get a value of TDataStd_RealArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 6)"
+ set IsGood 0
+}
+set GetReal1 [lindex ${GetRealArrayAttribute} 0]
+if { ${SetReal1} != ${GetReal1} } {
+ puts "GetReal1=${GetReal1}"
+ puts "Get a value of TDataStd_RealArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 7)"
+ set IsGood 0
+}
+set GetReal2 [lindex ${GetRealArrayAttribute} 1]
+if { ${SetReal2} != ${GetReal2} } {
+ puts "GetReal2=${GetReal2}"
+ puts "Get a value of TDataStd_RealArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 8)"
+ set IsGood 0
+} else {
+ puts "Get a value of TDataStd_RealArray attribute from restoring document: OK"
+}
+
+# Get a value of Integer array attribute
+set GetIntegerArrayAttribute ""
+set IsDone [catch {set GetIntegerArrayAttribute [GetIntArray DDoc ${aLabel}]} message]
+if { ${IsDone} != 0 } {
+ puts ${message}
+ puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 9)"
+ set IsGood 0
+}
+set aIntegerArrayLength [llength ${GetIntegerArrayAttribute}]
+if { ${aIntegerArrayLength} != [expr ${aTo2} - ${aFrom2} + 1] } {
+ puts "aIntegerArrayLength=${aIntegerArrayLength}"
+ puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 10)"
+ set IsGood 0
+}
+set GetInteger1 [lindex ${GetIntegerArrayAttribute} 0]
+if { ${SetInteger1} != ${GetInteger1} } {
+ puts "GetInteger1=${GetInteger1}"
+ puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 11)"
+ set IsGood 0
+}
+set GetInteger2 [lindex ${GetIntegerArrayAttribute} 1]
+if { ${SetInteger2} != ${GetInteger2} } {
+ puts "GetInteger2=${GetInteger2}"
+ puts "Get a value of TDataStd_IntegerArray attribute from restoring document: Error"
+ puts "OCC1724: ERROR (case 12)"
+ set IsGood 0
+} else {
+ puts "Get a value of TDataStd_IntegerArray attribute from restoring document: OK"
+}
+
+if { ${IsGood} == 1 } {
+ puts "OCC1724 OK"
+} else {
+ puts "OCC1724 Error"
+}
--- /dev/null
+puts "================"
+puts "OCC1726"
+puts "================"
+puts ""
+#######################################################################################
+# TDF_LabelNode::~TDF_LabelNode causes stack overflow
+#######################################################################################
+
+puts "Info: Open the document with 80000 sublabels of the label 0:2"
+chrono h reset; chrono h start
+Open [locate_data_file OCC1726.std] D
+chrono h stop; chrono h show
+
+set IsGood 1
+puts "Info: Close the document"
+chrono h reset; chrono h start
+if [catch {Close D} result] {
+ set IsGood 0
+}
+chrono h stop; chrono h show
+
+if { ${IsGood} == 0} {
+ puts "Faulty OCC1726"
+} else {
+ puts "OK OCC1726"
+}
--- /dev/null
+puts "TODO OCC12345 ALL: OCC1919 Error : Italian locale not seted"
+puts "TODO OCC12345 ALL: OCC1919 Error"
+
+puts "================"
+puts "OCC1919"
+puts "================"
+puts ""
+#######################################################################################
+# Incorrect locale management in XmlDrivers_DocumentRetrievalDriver::Read()
+#######################################################################################
+
+pload QAcommands
+
+set USA_Label 0:10
+set Italian_Label 0:20
+set USA_Real 123.456
+set Italian_Real 123,456
+#set aFile ${filedir}/OCC1919-[file tail [info script]].xml
+set IsGood 1
+
+# Create document
+NewDocument D XmlOcaf
+UndoLimit D 100
+NewCommand D
+
+Label D ${USA_Label}
+Label D ${Italian_Label}
+
+# Set USA locale
+OCC1919_set en_US
+set en_US_local [lindex [OCC1919_get] 2]
+if { ${en_US_local} != "en_US" } {
+ puts "OCC1919 Error : USA - English (ISO-8859-1) locale not seted"
+ set IsGood 0
+}
+
+SetReal D ${USA_Label} ${USA_Real}
+
+# Get a value of the attribute
+set USA_IsDone [catch {set new_USA_Real [GetReal D ${USA_Label}]} message]
+if { ${USA_IsDone} != 0 || ${new_USA_Real}!=${USA_Real} } {
+ puts ${message}
+ puts "USA_Real=${USA_Real} new_USA_Real=${new_USA_Real} "
+ puts "OCC1919 Error : Get bad value of TDataStd_Real attribute"
+ set IsGood 0
+}
+
+# Set italian locale
+OCC1919_set it
+set it_local [lindex [OCC1919_get] 2]
+if { ${it_local} != "it" } {
+ puts "OCC1919 Error : Italian locale not seted"
+ set IsGood 0
+}
+
+OCC1919_real D ${Italian_Label} ${Italian_Real}
+
+# Get a value of the attribute
+set Italian_IsDone [catch {set new_Italian_Real [GetReal D ${Italian_Label}]} message]
+if { ${Italian_IsDone} != 0 || ${new_Italian_Real}!=${Italian_Real} } {
+ puts ${message}
+ puts "Italian_Real=${Italian_Real} new_Italian_Real=${new_Italian_Real}"
+ puts "OCC1919 Error : Get bad value of TDataStd_Real attribute"
+ set IsGood 0
+}
+
+# Get a value of the attribute
+set USA_IsDone [catch {set new_USA_Real [GetReal D ${USA_Label}]} message]
+if { ${USA_IsDone} != 0 || ${new_USA_Real}!=${Italian_Real} } {
+ puts ${message}
+ puts "Italian_Real=${Italian_Real} new_USA_Real=${new_USA_Real}"
+ puts "OCC1919 Error : Get bad value of TDataStd_Real attribute"
+ set IsGood 0
+}
+
+# Store the document
+file delete ${imagedir}/OCC1919-M6.xml
+SaveAs D ${imagedir}/OCC1919-M6.xml
+if { ![file exists ${imagedir}/OCC1919-M6.xml] } {
+ puts "OCC1919 Error : There is not file"
+ set IsGood 0
+}
+catch {exec chmod 777 ${imagedir}/OCC1919-M6.xml}
+Close D
+
+# Set en_US locale
+OCC1919_set en_US
+set en_US_local [lindex [OCC1919_get] 2]
+if { ${en_US_local} != "en_US" } {
+ puts "OCC1919 Error : USA - English (ISO-8859-1) locale not seted"
+ set IsGood 0
+}
+
+# Restore the document
+Open ${imagedir}/OCC1919-M6.xml DD
+
+# Get a value of the attribute
+set USA_IsDone [catch {set new_USA_Real [GetReal DD ${USA_Label}]} message]
+set Italian_IsDone [catch {set new_Italian_Real [GetReal DD ${Italian_Label}]} message]
+if { ${USA_IsDone} != 0 || ${Italian_IsDone} != 0 || ${new_USA_Real}!=${new_Italian_Real} || ${new_Italian_Real}!=${USA_Real} } {
+ puts ${message}
+ puts "USA_Real=${USA_Real} Italian_Real=${Italian_Real}"
+ puts "new_USA_Real=${new_USA_Real} new_Italian_Real=${new_Italian_Real}"
+ puts "OCC1919 Error : Get bad value of TDataStd_Real attribute from restoring document"
+ set IsGood 0
+}
+
+if { ${IsGood} == 1 } {
+ puts "OCC1919 OK"
+} else {
+ puts "OCC1919 Error"
+}
+
+set make_photo 0
--- /dev/null
+puts "================"
+puts "OCC2269"
+puts "================"
+puts ""
+#######################################################################################
+# XML persistance should be more robust
+#######################################################################################
+#
+# Tested file is contains 3 labels with TDataStd_RealArray attributes
+# 0:2 label has good TDataStd_RealArray attribute
+# 0:22 label has bad TDataStd_RealArray attribute
+# 0:222 label has good TDataStd_RealArray attribute
+#
+#######################################################################################
+
+#set ScriptDir $XmlDir
+#source ${ScriptDir}/begin
+#source ${ScriptDir}/002/begin
+
+#set aTestName "OCC2269"
+#set WorkDirectory ${filedir}
+#set aFile $WorkDirectory/${aTestName}.${FileSuffix}
+#catch {Close D}
+
+set IsGood 1
+Open [locate_data_file OCC2269.xml] DD
+
+if [catch {XDumpDF DD } result] {
+ puts "Error during dump ${aFile} file"
+ set IsGood 0
+}
+if [catch {CheckLabel DD 0:2} result] {
+ puts "Error during search 0:2 label in ${aFile} file"
+ set IsGood 0
+}
+if [catch {CheckLabel DD 0:22} result] {
+ puts "Error during search 0:22 label in ${aFile} file"
+ set IsGood 0
+}
+if [catch {CheckLabel DD 0:222} result] {
+ puts "Error during search 0:222 label in ${aFile} file"
+ set IsGood 0
+}
+
+Close DD
+
+if { ${IsGood} == 0} {
+ puts "Faulty OCC2269"
+} else {
+ puts "OK OCC2269"
+}
--- /dev/null
+puts "========"
+puts "OCC267"
+puts "========"
+
+NewDocument D MDTV-Standard
+
+######################################################################
+
+file delete ${imagedir}/OCC267.std
+SaveAs D ${imagedir}/OCC267.std
+
--- /dev/null
+puts "TODO OCC12345 ALL: OCC267: Error"
+
+puts "========"
+puts "OCC267"
+puts "========"
+
+######################################################################
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+file delete ${imagedir}/OCC267.std
+catch { OCC267 D ${imagedir}/OCC267.std } status
+
+set list [split ${status}]
+set index [lsearch -exact ${list} "CDF_StoreStatus"]
+
+if { ${index} == -1 } then {
+ puts "OCC267: Error"
+ puts ${status}
+} else {
+ set CDF_StoreStatus [lindex ${list} [expr ${index} + 2] ]
+ if { ${CDF_StoreStatus} == "CDF_SS_OK" } then {
+ puts "OCC267: OK"
+ } else {
+ puts "OCC267: ERROR"
+ puts ${status}
+ puts "CDF_StoreStatus = ${CDF_StoreStatus}"
+ }
+}
+
--- /dev/null
+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 isDelta 0
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_IntegerArray
+SetIntArray D ${Label} ${isDelta} ${From} ${To} ${IntegerArray1} ${IntegerArray2}
+############################################
+
+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} ${isDelta} ${From} ${To} ${IntegerArray1} ${IntegerArray2}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 9 (TDataStd_Name)
+#######################################################################################
+
+# 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 Name "New Name"
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Name
+Label D ${Label}
+SetName D ${Label} ${Name}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Name
+SetName D ${Label} ${Name}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 10 (TDataStd_PatternStd)
+#######################################################################################
+
+# 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
+
+############################################
+# Create a box
+set X 10
+set Y 20
+set Z 30
+set DX 100
+set DY 200
+set DZ 300
+box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
+
+# Set a shape to the label
+set BoxLabel 0:3
+SetShape D ${BoxLabel} Box
+
+# Set a real attribute
+set RealLabel 0:4
+set RealPattern 123.456789
+SetReal D ${RealLabel} ${RealPattern}
+
+# Set an integer attribute
+set IntegerLabel 0:5
+set IntegerPattern 123456789
+SetInteger D ${IntegerLabel} ${IntegerPattern}
+
+# Set a signature
+set signature 1
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_PatternStd
+Label D ${Label}
+SetPattern D ${Label} ${signature} ${BoxLabel} ${RealLabel} ${IntegerLabel}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_PatternStd
+SetPattern D ${Label} ${signature} ${BoxLabel} ${RealLabel} ${IntegerLabel}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 11 (TDataStd_Plane)
+#######################################################################################
+
+# 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
+
+############################################
+# Create a plane
+set X 10
+set Y 20
+set Z 30
+set DX -1
+set DY 0
+set DZ 0
+plane Plane ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Plane
+SetPlane D ${Label} Plane
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Plane
+SetPlane D ${Label} Plane
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 12 (TDataStd_Point)
+#######################################################################################
+
+# 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
+
+############################################
+# Create a point
+set X 10
+set Y 20
+set Z 30
+point Point ${X} ${Y} ${Z}
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Point
+SetPoint D ${Label} Point
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Point
+SetPoint D ${Label} Point
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 13 (TDataStd_Real)
+#######################################################################################
+
+# 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 Real 100.
+############################################
+
+set Integer1 300
+set Integer2 400
+set modified_attribute TDataStd_Integer
+
+############################################
+# Set TDataStd_Real
+SetReal D ${Label} ${Real}
+############################################
+
+SetInteger D ${Label} ${Integer1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Real
+SetReal D ${Label} ${Real}
+############################################
+
+# Set new value for TDataStd_Integer
+SetInteger D ${Label} ${Integer2}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+# Checking
+set ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+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 isDelta 0
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_RealArray
+SetRealArray D ${Label} ${isDelta} ${From} ${To} ${RealArray1} ${RealArray2}
+############################################
+
+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} ${isDelta} ${From} ${To} ${RealArray1} ${RealArray2}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 15 (TDataStd_Relation)
+#######################################################################################
+
+pload QAcommands
+
+# 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 Relation "New Relation"
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Relation
+OCC2932_SetRelation D ${Label} ${Relation}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Relation
+OCC2932_SetRelation D ${Label} ${Relation}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 16 (TDataStd_Shape)
+#######################################################################################
+
+# 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
+
+############################################
+# Create a box
+set X 10
+set Y 20
+set Z 30
+set DX 100
+set DY 200
+set DZ 300
+box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Shape
+SetShape D ${Label} Box
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Shape
+SetShape D ${Label} Box
+############################################
+
+# Set new value for TDataStd_Real
+SetReal D ${Label} ${Real2}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+# Checking
+if { 1 == 2 } {
+set ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
+}
+
+# NEW VERSION!!!!!
+set ll [llength ${list}]
+set good_length 20
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${good_length} } {
+ puts "OCC2932 Error (case 1)"
+} else {
+ set name_attribute1 [lindex ${list} [expr ${good_length} - 1]]
+ set name_attribute2 [lindex ${list} [expr ${good_length} - 4]]
+ set modified_attribute2 TNaming_NamedShape
+ puts "name_attribute1 = ${name_attribute1}"
+ puts "name_attribute2 = ${name_attribute2}"
+ puts "modified_attribute = ${modified_attribute}"
+ puts "modified_attribute2 = ${modified_attribute2}"
+
+ set Is_TDataStd_Real 0
+ set Is_TNaming_NamedShape 0
+ if {[string compare ${name_attribute1} ${modified_attribute}] == 0 ||
+ [string compare ${name_attribute2} ${modified_attribute}] == 0 } {
+ set Is_TDataStd_Real 1
+ }
+ if {[string compare ${name_attribute1} ${modified_attribute2}] == 0 ||
+ [string compare ${name_attribute2} ${modified_attribute2}] == 0 } {
+ set Is_TNaming_NamedShape 1
+ }
+
+
+ if { ${Is_TDataStd_Real} == 1 && ${Is_TNaming_NamedShape} == 1 } {
+ puts "OCC2932 OK"
+ } else {
+ puts "OCC2932 Error (case 2)"
+ }
+
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 18 (TDataStd_Variable)
+#######################################################################################
+
+# 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 isConstant
+set isConstant 1
+
+# Set a units
+set units "kg/m3"
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Variable
+SetVariable D ${Label} ${isConstant} ${units}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Variable
+SetVariable D ${Label} ${isConstant} ${units}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 19 (TDF_Reference)
+#######################################################################################
+
+# 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 Reference 0:3
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDF_Reference
+Label D ${Reference}
+SetReference D ${Label} ${Reference}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDF_Reference
+SetReference D ${Label} ${Reference}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 20 (TDF_TagSource)
+#######################################################################################
+
+pload QAcommands
+
+# 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 Tag 5
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDF_TagSource
+OCC2932_SetTag D ${Label} ${Tag}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDF_TagSource
+OCC2932_SetTag D ${Label} ${Tag}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 21 (TFunction_Function)
+#######################################################################################
+
+# 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 a driver guid
+set driverGuid "5b35ca00-5b78-11d1-8940-080009dc3333"
+
+# Set a failure
+set failureNb 13
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TFunction_Function
+SetFunction D ${Label} ${driverGuid} ${failureNb}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TFunction_Function
+SetFunction D ${Label} ${driverGuid} ${failureNb}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 22 (TPrsStd_AISPresentation)
+#######################################################################################
+
+# 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
+
+############################################
+Label D ${Label}
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TPrsStd_AISPresentation
+AISSet D ${Label} NS
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TPrsStd_AISPresentation
+AISSet D ${Label} NS
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 23 (TPrsStd_Position)
+#######################################################################################
+
+# 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 a coordinates
+set X 123.456
+set Y 789.012
+set Z 345.678
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TPrsStd_Position
+SetPosition D ${Label} ${X} ${Y} ${Z}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TPrsStd_Position
+SetPosition D ${Label} ${X} ${Y} ${Z}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 1 (TDataStd_Axis)
+#######################################################################################
+
+# 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 X 10
+set Y 20
+set Z 30
+set DX 100
+set DY 200
+set DZ 300
+line Line ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Axis
+SetAxis D ${Label} Line
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Axis
+SetAxis D ${Label} Line
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 2 (TDataStd_Comment)
+#######################################################################################
+
+# 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 Comment "New Comment"
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Comment
+SetComment D ${Label} ${Comment}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Comment
+SetComment D ${Label} ${Comment}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 3 (TDataStd_Constraint)
+#######################################################################################
+
+# 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
+
+############################################
+# Create a box
+set X 10
+set Y 20
+set Z 30
+set DX 100
+set DY 200
+set DZ 300
+box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
+
+# Set a shape to the label
+set BoxLabel 0:3
+SetShape D ${BoxLabel} Box
+
+# Set integer attribute
+set Integer 10
+set IntegerLabel 0:4
+SetInteger D ${IntegerLabel} ${Integer}
+
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Constraint
+Label D ${Label}
+SetConstraint D ${Label} "tan" ${BoxLabel}
+SetConstraint D ${Label} "plane" ${BoxLabel}
+SetConstraint D ${Label} "value" ${IntegerLabel}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Constraint
+SetConstraint D ${Label} "tan" ${BoxLabel}
+SetConstraint D ${Label} "plane" ${BoxLabel}
+SetConstraint D ${Label} "value" ${IntegerLabel}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 4 (TDataStd_Current)
+#######################################################################################
+
+pload QAcommands
+
+# 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 Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Current
+OCC2932_SetCurrent D ${Label}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Current
+OCC2932_SetCurrent D ${Label}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 5 (TDataStd_Expression)
+#######################################################################################
+
+pload QAcommands
+
+# 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 Expression "New Expression"
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+OCC2932_SetExpression D ${Label} ${Expression}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Expression
+OCC2932_SetExpression D ${Label} ${Expression}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 6 (TDataStd_Geometry)
+#######################################################################################
+
+# 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
+
+############################################
+# Create a box
+set X 10
+set Y 20
+set Z 30
+set DX 100
+set DY 200
+set DZ 300
+box Box ${X} ${Y} ${Z} ${DX} ${DY} ${DZ}
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Geometry
+Label D ${Label}
+SetGeometry D ${Label} "pnt" ${Box}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Geometry
+SetGeometry D ${Label} "pnt" ${Box}
+############################################
+
+# Set new value for TDataStd_Real
+SetReal D ${Label} ${Real2}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+# Checking
+if { 1 == 2 } {
+set ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
+}
+
+# NEW VERSION!!!!!
+set ll [llength ${list}]
+set good_length 20
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${good_length} } {
+ puts "OCC2932 Error (case 1)"
+} else {
+ set name_attribute1 [lindex ${list} [expr ${good_length} - 1]]
+ set name_attribute2 [lindex ${list} [expr ${good_length} - 4]]
+ set modified_attribute2 TNaming_NamedShape
+ puts "name_attribute1 = ${name_attribute1}"
+ puts "name_attribute2 = ${name_attribute2}"
+ puts "modified_attribute = ${modified_attribute}"
+ puts "modified_attribute2 = ${modified_attribute2}"
+
+ set Is_TDataStd_Real 0
+ set Is_TNaming_NamedShape 0
+ if {[string compare ${name_attribute1} ${modified_attribute}] == 0 ||
+ [string compare ${name_attribute2} ${modified_attribute}] == 0 } {
+ set Is_TDataStd_Real 1
+ }
+ if {[string compare ${name_attribute1} ${modified_attribute2}] == 0 ||
+ [string compare ${name_attribute2} ${modified_attribute2}] == 0 } {
+ set Is_TNaming_NamedShape 1
+ }
+
+
+ if { ${Is_TDataStd_Real} == 1 && ${Is_TNaming_NamedShape} == 1 } {
+ puts "OCC2932 OK"
+ } else {
+ puts "OCC2932 Error (case 2)"
+ }
+
+}
--- /dev/null
+puts "================"
+puts "OCC2932"
+puts "================"
+puts ""
+#######################################################################################
+# Create Attribute Delta depending on actual change of the attribute
+#######################################################################################
+# Case 7 (TDataStd_Integer)
+#######################################################################################
+
+# 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 Integer 100
+############################################
+
+set Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_Integer
+SetInteger D ${Label} ${Integer}
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_Integer
+SetInteger D ${Label} ${Integer}
+############################################
+
+# 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 ll [llength ${list}]
+set good_length 17
+puts "length = ${ll}"
+puts "good_length = ${good_length}"
+
+if { ${ll} != ${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)"
+ }
+}
--- /dev/null
+puts "================="
+puts "OCC644"
+puts "SAM1513"
+puts "================="
+puts ""
+
+NewDocument D
+UndoLimit D 10
+
+NewCommand D
+SetVariable D 0:1 0 mm
+SetRelation D 0:2 x=10 0:1
+
+NewCommand D
+SetRelation D 0:2 x=20 0:1
+
+NewCommand D
+Undo D
+Redo D
+Undo D
+
+set RelationList [DumpRelation D 0:2]
+
+if {[llength ${RelationList}] <= 10} {
+ puts "OCC644: OK"
+} else {
+ puts "OCC644: ERROR"
+}
+
+
--- /dev/null
+puts "============"
+puts "OCC11568"
+puts "============"
+puts ""
+#######################################################################
+# UnitsAPI package uses incorrect symbol for minutes: mn instead of min
+#######################################################################
+
+set BugNumber OCC11568
+
+set UnitString "min"
+set result "Token word : min\n"
+
+if { [unitparsing ${UnitString}] == ${result} } {
+ puts "${BugNumber}: OK"
+} else {
+ puts "${BugNumber}: Faulty"
+}
--- /dev/null
+puts "============"
+puts "OCC11568"
+puts "============"
+puts ""
+#######################################################################
+# UnitsAPI package uses incorrect symbol for minutes: mn instead of min
+#######################################################################
+
+set BugNumber OCC11568
+
+set UnitString "min"
+set result "result: 60\n"
+
+if { [unitconvtoSI 1 ${UnitString}] == ${result} } {
+ puts "${BugNumber}: OK"
+} else {
+ puts "${BugNumber}: Faulty"
+}
--- /dev/null
+puts "========"
+puts "OCC142"
+puts "CSR888 (call 68539)"
+puts "========"
+
+pload QAcommands
+
+OCC142
--- /dev/null
+puts "========"
+puts "OCC181"
+puts "OCC701"
+puts "========"
+######################################################
+# Resource_Manager class doen't return status of saving resources in a file.
+######################################################
+# Add method BuildPath to OSD_Directory
+######################################################
+
+# Clear tmp-data
+######################################################################
+set tmp ${imagedir}
+######################################################################
+
+pload QAcommands
+
+file delete ${tmp}/1/2/3/OCC181
+file delete ${tmp}/1/2/OCC181
+file delete ${tmp}/1/OCC181
+file delete ${tmp}/1/2/3
+file delete ${tmp}/1/2
+file delete ${tmp}/1
+
+set log [OCC181 OCC181 ${imagedir} ${tmp}/1 0]
+
+set list [split ${log}]
+set ll [llength ${list}]
+set status [lindex ${list} [expr ${ll} - 2] ]
+
+if { ${status} == "TRUE"} then {
+ puts "OCC181: OK"
+} else {
+ puts "OCC181: Error"
+}
+
--- /dev/null
+puts "TODO OCC12345 ALL: OCC181: Error"
+
+puts "========"
+puts "OCC181"
+puts "OCC701"
+puts "========"
+######################################################
+# Resource_Manager class doen't return status of saving resources in a file.
+######################################################
+# Add method BuildPath to OSD_Directory
+######################################################
+
+# Clear tmp-data
+######################################################################
+set tmp ${imagedir}
+######################################################################
+
+pload QAcommands
+
+file delete ${tmp}/1/2/3/OCC181
+file delete ${tmp}/1/2/OCC181
+file delete ${tmp}/1/OCC181
+file delete ${tmp}/1/2/3
+file delete ${tmp}/1/2
+file delete ${tmp}/1
+
+set log [OCC181 OCC181 ${imagedir} ${tmp}/1/2/3 0]
+
+set list [split ${log}]
+set ll [llength ${list}]
+set status [lindex ${list} [expr ${ll} - 2] ]
+
+if { ${status} == "TRUE"} then {
+ puts "OCC181: OK"
+} else {
+ puts "OCC181: Error"
+}
+
--- /dev/null
+puts "========"
+puts "OCC216"
+puts "========"
+
+pload QAcommands
+
+OCC216
--- /dev/null
+puts "================"
+puts "OCC309"
+puts "================"
+puts ""
+
+pload QAcommands
+
+set result [OCC309]
+
+set ll [llength ${result}]
+if { ${ll} != 2 } {
+ puts "result = ${result}"
+ puts "length = ${ll}"
+ puts "OCC309: ERROR 0"
+} else {
+ set result1 [lindex ${result} 0]
+ set result2 [lindex ${result} 1]
+ set CurrentDirectory [pwd]
+ set UpTrek [file dirname ${CurrentDirectory}]
+ if { [string compare $tcl_platform(platform) "windows"] != 0} {
+ set res1 [ string range $result1 1 [expr [string length $result1] -3 ] ]
+ set res2 [ string range $result2 1 [expr [string length $result2] -3 ] ]
+ } else {
+ set res1 [ string range $result1 1 [expr [string length $result1] -2 ] ]
+ set res2 [ string range $result1 1 [expr [string length $result2] -8 ] ]
+ }
+ if {[string compare ${res1} "${CurrentDirectory}"] == 0} {
+ puts "OCC309: OK 1"
+ } else {
+ puts "result1 = ${result1}"
+ puts "res1 = ${res1}"
+ puts "CurrentDirectory = ${CurrentDirectory}"
+ puts "OCC309: ERROR 1"
+ }
+ if {[string compare ${res2} "${UpTrek}"] == 0} {
+ puts "OCC309: OK 2"
+ } else {
+ puts "result2 = ${result2}"
+ puts "res2 = ${res2}"
+ puts "UpTrek = ${UpTrek}"
+ puts "OCC309: ERROR 2"
+ }
+}
+
--- /dev/null
+puts "================"
+puts "OCC310"
+puts "================"
+puts ""
+
+pload QAcommands
+
+set result [OCC310]
+
+set ll [llength ${result}]
+if { ${ll} != 2 } {
+ puts "result = ${result}"
+ puts "length = ${ll}"
+ puts "OCC310: ERROR 0"
+} else {
+ set result1 [lindex ${result} 0]
+ set result2 [lindex ${result} 1]
+ set Directory "|where|you|want|tmp|qwerty|tmp|"
+ set UpTrek "|where|you|want|tmp|qwerty|"
+ if {[string compare ${result1} "${Directory}"] == 0} {
+ puts "OCC310: OK 1"
+ } else {
+ puts "result1 = ${result1}"
+ puts "Directory = ${Directory}"
+ puts "OCC310: ERROR 1"
+ }
+ if {[string compare ${result2} "${UpTrek}"] == 0} {
+ puts "OCC310: OK 2"
+ } else {
+ puts "result2 = ${result2}"
+ puts "UpTrek = ${UpTrek}"
+ puts "OCC310: ERROR 2"
+ }
+}
+
--- /dev/null
+puts "================"
+puts "OCC1723"
+puts "OCC2707"
+puts "OCC6143"
+puts "OCC12131"
+puts "================"
+puts ""
+#######################################################################################
+# OSD::SetSignal : not all FLT exceptions are catched
+# Various improvements of RINA LH3D-3H project
+# Correct handling of exceptions on WNT
+#######################################################################################
+
+pload QAcommands
+
+set BugNumber OCC6143
+
+set OK_string "TestExcept: Successfull completion\n"
+set IsDone [catch {set aResult [OCC6143]} result]
+
+if { ${IsDone} != 0 } {
+ puts "result = ${result}"
+ puts "Faulty ${BugNumber}"
+} else {
+ if { [string first ${OK_string} ${aResult} ] != -1 } {
+ puts "OK ${BugNumber}"
+ } else {
+ puts "Faulty ${BugNumber}"
+ }
+}
+
--- /dev/null
+puts "================"
+puts "OCC983"
+puts "================"
+puts ""
+#######################################################################################
+# LDOM xml parser does not take into account "&" xml entity.
+#######################################################################################
+
+pload QAcommands
+
+set list [OCC983 [locate_data_file OCC983.xml]]
+
+if { [regexp "Document parsed" $list] == 1 } {
+ if {[lsearch -exact ${list} "&View"] != -1 } {
+ puts "OCC983: OK"
+ } elseif {[lsearch -exact ${list} "&View"] != 0 } {
+ puts "OCC983: Error"
+ } else {
+ puts "OCC983: Error ; bad input file."
+ }
+} else {
+ puts "OCC983: Error ; document not parsed"
+}
+
--- /dev/null
+puts "================"
+puts "OCC5079"
+puts "================"
+puts ""
+#######################################################################################
+# Exception in translating of IGES files
+#######################################################################################
+
+igesbrep [locate_data_file OCC5079.igs] a *
+tpcompound result
+
+checkshape result
+
+set 2dviewer 0
--- /dev/null
+puts "========"
+puts "OCC6508"
+puts "========"
+puts ""
+######################################################
+# Reading invalid General Symbol entity from an IGES file causes an exception
+######################################################
+
+igesbrep [locate_data_file OCC6508.igs] a *
+tpcompound result
+
+checkshape result
+
+set nb_f_good 192
+
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts "OCC663"
+puts "========================"
+#### Wrong translation of faces on SurfaceOfRevolution
+puts ""
+
+igesbrep [locate_data_file D44-11325-6.igs] a 2860
+
+set x 62.5015115293408
+set y -56.0926450759605
+set z -44.3
+vertex v $x $y $z
+
+distmini d a_1 v
+
+set MinDistList [dump d_val]
+set MinDist [lindex $MinDistList end]
+
+if {$MinDist > 1e-7} {
+ puts "Faulty OCC663"
+} else {
+ puts "OCC663 OK"
+}
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-2.brep] b2
+
+set NbTests 3
+
+dchrono h0 reset
+dchrono h0 start
+
+bop b1 b2
+dchrono h0 stop
+set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopcommon result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 1.30062e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 20
+set nb_e_good 28
+set nb_w_good 16
+set nb_f_good 15
+set nb_sh_good 3
+set nb_sol_good 3
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 86
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-2.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopfuse result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 3.20326e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 116
+set nb_e_good 173
+set nb_w_good 67
+set nb_f_good 63
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 422
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-2.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopcut result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 3.05154e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 96
+set nb_e_good 143
+set nb_w_good 51
+set nb_f_good 48
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 341
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-2.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ boptuc result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 6.38359e+06
+
+# Analysis of "nbshapes res"
+set nb_v_good 108
+set nb_e_good 161
+set nb_w_good 61
+set nb_f_good 60
+set nb_sh_good 3
+set nb_sol_good 3
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 397
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-2.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopfuse result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 4.75218e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 32
+set nb_e_good 60
+set nb_w_good 32
+set nb_f_good 29
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 156
+
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-2.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopcut result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 2.36194e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 24
+set nb_e_good 34
+set nb_w_good 20
+set nb_f_good 19
+set nb_sh_good 4
+set nb_sol_good 4
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 106
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-2.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ boptuc result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 3.56087e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 24
+set nb_e_good 34
+set nb_w_good 20
+set nb_f_good 17
+set nb_sh_good 3
+set nb_sol_good 3
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 102
+
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopcommon result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 782201
+
+# Analysis of "nbshapes res"
+set nb_v_good 53
+set nb_e_good 75
+set nb_w_good 38
+set nb_f_good 34
+set nb_sh_good 6
+set nb_sol_good 6
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 213
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopfuse result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 3.61484e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 121
+set nb_e_good 178
+set nb_w_good 65
+set nb_f_good 59
+set nb_sh_good 3
+set nb_sol_good 2
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 429
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopcut result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 3.00597e+07
+
+# Analysis of "nbshapes res"
+set nb_v_good 61
+set nb_e_good 87
+set nb_w_good 44
+set nb_f_good 36
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 231
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-1.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ boptuc result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 6.87093e+06
+
+# Analysis of "nbshapes res"
+set nb_v_good 113
+set nb_e_good 166
+set nb_w_good 59
+set nb_f_good 57
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 398
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10160"
+puts "============"
+puts ""
+#######################################################################
+# BOP perfomance improvemen
+#######################################################################
+
+set BugNumber OCC10160
+
+restore [locate_data_file OCC10160-2.brep] b1
+restore [locate_data_file OCC10160-3.brep] b2
+
+set NbTests 3
+
+puts "Prepare boolean operation ..."
+dchrono h0 reset; dchrono h0 start
+bop b1 b2
+dchrono h0 stop; set CPU_time0_List [dchrono h0 show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0
+puts "CPU_user_time0=${CPU_user_time0}"
+
+puts "Start boolean operation ..."
+dchrono h reset; dchrono h start
+#
+# BOOLEAN OPERATION ----- START
+#
+for {set i 1} {$i <= ${NbTests}} {incr i} {
+ bopcommon result
+}
+#
+# BOOLEAN OPERATION ----- FINISH
+#
+dchrono h stop; set CPU_time_List [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time
+puts "Finish boolean operation ..."
+puts "CPU_user_time=${CPU_user_time}"
+set CPU_user_time [expr ${CPU_user_time} / ${NbTests}]
+puts "CPU_user_time=${CPU_user_time}"
+
+set square 4.86635e+06
+
+# Analysis of "nbshapes res"
+set nb_v_good 88
+set nb_e_good 131
+set nb_w_good 45
+set nb_f_good 45
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 312
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10232"
+puts "============"
+puts ""
+#######################################################################
+# Exception "Segmentation violation" in Boolean Operations
+#######################################################################
+
+set BugNumber OCC10232
+
+puts "Load first shape ..."
+restore [locate_data_file OCC10232_ms1.brep] b1
+puts "Load second shape ..."
+restore [locate_data_file OCC10232_ms2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopsection result
+puts "Finish boolean operation ..."
+
+set length 3210.71
+
+set nb_v_good 1197
+set nb_e_good 1182
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 2380
+
+set 2dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC10435"
+puts "============"
+puts ""
+#######################################################################
+# error in fillet after Cut of torus from box
+#######################################################################
+
+set BugNumber OCC10435
+
+restore [locate_data_file OCC10435.brep] a
+
+checkshape a
+explode a e
+
+set radius 5.
+
+if { [catch {fillet result a ${radius} a_10 ${radius} a_15 ${radius} a_16 } catch_result] } {
+ puts "Faulty ${BugNumber} exception (case 1): Fillet operation fails on given shape "
+} else {
+ puts "${BugNumber} (case 1) OK: Fillet operation was made"
+
+ set square 36455.2
+
+ # Analysis of "nbshapes res"
+ set nb_v_good 12
+ set nb_e_good 19
+ set nb_w_good 11
+ set nb_f_good 10
+ set nb_sh_good 1
+ set nb_sol_good 1
+ set nb_compsol_good 0
+ set nb_compound_good 1
+ set nb_shape_good 55
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC10435"
+puts "============"
+puts ""
+#######################################################################
+# error in fillet after Cut of torus from box
+#######################################################################
+
+set BugNumber OCC10435
+
+puts "Load shape ..."
+restore [locate_data_file OCC10435.brep] b1
+
+explode b1 e
+
+puts "Start fillet ..."
+fillet result b1 5 b1_15 5 b1_16 5 b1_10
+puts "Finish fillet ..."
+
+set square 36455.2
+
+# Analysis of "nbshapes res"
+set nb_v_good 12
+set nb_e_good 19
+set nb_w_good 11
+set nb_f_good 10
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 55
+
+set 2dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC10605"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10605
+
+restore [locate_data_file OCC10605-1.brep] b1
+restore [locate_data_file OCC10605-3.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcommon result
+puts "Finish boolean operation ..."
+
+set square 233.798
+
+# Analysis of "nbshapes res"
+set nb_v_good 10
+set nb_e_good 15
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 42
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10605"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10605
+
+restore [locate_data_file OCC10605-1.brep] b1
+restore [locate_data_file OCC10605-3.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopfuse result
+puts "Finish boolean operation ..."
+
+set square 838.752
+
+# Analysis of "nbshapes res"
+set nb_v_good 15
+set nb_e_good 22
+set nb_w_good 10
+set nb_f_good 9
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 59
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10605"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10605
+
+restore [locate_data_file OCC10605-1.brep] b1
+restore [locate_data_file OCC10605-3.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcut result
+puts "Finish boolean operation ..."
+
+set square 779.887
+
+# Analysis of "nbshapes res"
+set nb_v_good 13
+set nb_e_good 19
+set nb_w_good 8
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 50
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10605"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10605
+
+restore [locate_data_file OCC10605-1.brep] b1
+restore [locate_data_file OCC10605-3.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+boptuc result
+puts "Finish boolean operation ..."
+
+set square 292.663
+
+# Analysis of "nbshapes res"
+set nb_v_good 12
+set nb_e_good 18
+set nb_w_good 9
+set nb_f_good 9
+set nb_sh_good 2
+set nb_sol_good 2
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 53
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10605"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10605
+
+restore [locate_data_file OCC10605-1.brep] b1
+restore [locate_data_file OCC10605-3.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopsection result b1 b2
+puts "Finish boolean operation ..."
+
+set length 59.8334
+# Analysis of "nbshapes res"
+set nb_v_good 9
+set nb_e_good 9
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 19
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10606"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10606
+
+restore [locate_data_file OCC10604-1.brep] b1
+restore [locate_data_file OCC10606-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcommon result
+puts "Finish boolean operation ..."
+
+set square 66.672
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 8
+set nb_w_good 2
+set nb_f_good 2
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 21
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10606"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10606
+
+restore [locate_data_file OCC10604-1.brep] b1
+restore [locate_data_file OCC10606-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopfuse result
+puts "Finish boolean operation ..."
+
+set square 1450.22
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 8
+set nb_w_good 4
+set nb_f_good 4
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 25
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10606"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10606
+
+restore [locate_data_file OCC10604-1.brep] b1
+restore [locate_data_file OCC10606-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcut result
+puts "Finish boolean operation ..."
+
+set square 761.355
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 8
+set nb_w_good 3
+set nb_f_good 3
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 23
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10606"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10606
+
+restore [locate_data_file OCC10604-1.brep] b1
+restore [locate_data_file OCC10606-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+boptuc result
+puts "Finish boolean operation ..."
+
+set square 755.54
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 8
+set nb_w_good 3
+set nb_f_good 3
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 23
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10606"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10606
+
+restore [locate_data_file OCC10604-1.brep] b1
+restore [locate_data_file OCC10606-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopsection result b1 b2
+puts "Finish boolean operation ..."
+
+set length 18.3861
+
+# Analysis of "nbshapes res"
+set nb_v_good 4
+set nb_e_good 4
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 9
+
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "============"
+puts "OCC1077"
+puts "============"
+puts ""
+######################################################
+# BUG in boolean operations in the development version
+######################################################
+
+if { [catch { OCC1077 result } catch_result] } {
+ puts "Faulty OCC1077"
+}
+
+set square 587.181
+set 3dviewer 1
--- /dev/null
+puts "TODO OCC111111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10842"
+puts "============"
+puts ""
+#######################################################################
+# Bug in Bop
+#######################################################################
+
+set BugNumber OCC10842
+
+restore [locate_data_file OCC10842-1.brep] b1
+restore [locate_data_file OCC10842-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcommon result
+puts "Finish boolean operation ..."
+
+set square 2312.93
+
+# Analysis of "nbshapes res"
+set nb_v_good 7
+set nb_e_good 9
+set nb_w_good 4
+set nb_f_good 4
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 27
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC111111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10842"
+puts "============"
+puts ""
+#######################################################################
+# Bug in Bop
+#######################################################################
+
+set BugNumber OCC10842
+
+restore [locate_data_file OCC10842-1.brep] b1
+restore [locate_data_file OCC10842-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopfuse result
+puts "Finish boolean operation ..."
+
+set square 27919.7
+
+# Analysis of "nbshapes res"
+set nb_v_good 15
+set nb_e_good 21
+set nb_w_good 7
+set nb_f_good 6
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 52
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC111111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10842"
+puts "============"
+puts ""
+#######################################################################
+# Bug in Bop
+#######################################################################
+
+set BugNumber OCC10842
+
+restore [locate_data_file OCC10842-1.brep] b1
+restore [locate_data_file OCC10842-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcut result
+puts "Finish boolean operation ..."
+
+set square 18757.7
+
+# Analysis of "nbshapes res"
+set nb_v_good 13
+set nb_e_good 18
+set nb_w_good 6
+set nb_f_good 6
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 46
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC111111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC10842"
+puts "============"
+puts ""
+#######################################################################
+# Bug in Bop
+#######################################################################
+
+set BugNumber OCC10842
+
+restore [locate_data_file OCC10842-1.brep] b1
+restore [locate_data_file OCC10842-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+boptuc result
+puts "Finish boolean operation ..."
+
+set square 11475
+
+# Analysis of "nbshapes res"
+set nb_v_good 9
+set nb_e_good 12
+set nb_w_good 5
+set nb_f_good 4
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 33
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10842"
+puts "============"
+puts ""
+#######################################################################
+# Bug in Bop
+#######################################################################
+
+set BugNumber OCC10842
+
+restore [locate_data_file OCC10842-1.brep] b1
+restore [locate_data_file OCC10842-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopsection result b1 b2
+puts "Finish boolean operation ..."
+
+set length 122.816
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 6
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 13
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10846"
+puts "============"
+puts ""
+#######################################################################
+# Cut operation produces invalid result
+#######################################################################
+
+set BugNumber OCC10846
+
+restore [locate_data_file bug10846_solid1.brep] b1
+restore [locate_data_file bug10846_solid2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcommon result
+puts "Finish boolean operation ..."
+
+set square 183.567
+
+# Analysis of "nbshapes res"
+set nb_v_good 18
+set nb_e_good 31
+set nb_w_good 19
+set nb_f_good 19
+set nb_sh_good 6
+set nb_sol_good 6
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 100
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10846"
+puts "============"
+puts ""
+#######################################################################
+# Cut operation produces invalid result
+#######################################################################
+
+set BugNumber OCC10846
+
+restore [locate_data_file bug10846_solid1.brep] b1
+restore [locate_data_file bug10846_solid2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopfuse result
+puts "Finish boolean operation ..."
+
+set square 2309.97
+
+# Analysis of "nbshapes res"
+set nb_v_good 25
+set nb_e_good 45
+set nb_w_good 15
+set nb_f_good 15
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 103
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10846"
+puts "============"
+puts ""
+#######################################################################
+# Cut operation produces invalid result
+#######################################################################
+
+set BugNumber OCC10846
+
+restore [locate_data_file bug10846_solid1.brep] b1
+restore [locate_data_file bug10846_solid2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcut result
+puts "Finish boolean operation ..."
+
+set square 510.907
+
+# Analysis of "nbshapes res"
+set nb_v_good 24
+set nb_e_good 43
+set nb_w_good 20
+set nb_f_good 20
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 110
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10846"
+puts "============"
+puts ""
+#######################################################################
+# Cut operation produces invalid result
+#######################################################################
+
+set BugNumber OCC10846
+
+restore [locate_data_file bug10846_solid1.brep] b1
+restore [locate_data_file bug10846_solid2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+boptuc result
+puts "Finish boolean operation ..."
+
+set square 1982.63
+
+# Analysis of "nbshapes res"
+set nb_v_good 19
+set nb_e_good 33
+set nb_w_good 14
+set nb_f_good 14
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 83
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10846"
+puts "============"
+puts ""
+#######################################################################
+# Cut operation produces invalid result
+#######################################################################
+
+set BugNumber OCC10846
+
+restore [locate_data_file bug10846_solid1.brep] b1
+restore [locate_data_file bug10846_solid2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopsection result b1 b2
+puts "Finish boolean operation ..."
+
+set length 94.4534
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC12213"
+puts "============"
+puts ""
+#######################################################################
+# Invalid sweep was created by command "buildsweep" in DRAW in case circular path
+#######################################################################
+
+set BugNumber OCC12213
+
+circle c1 0 0 0 100
+trim cc1 c1 0 3.14
+mkedge e2 cc1
+wire w2 e2
+
+box a 95 -10 -5 10 10 10
+explode a w
+explode a_4 e
+wire w21 a_4_1 a_4_2 a_4_3 a_4_4
+
+box b -110 -10 -5 20 10 10
+explode b w
+explode b_4 e
+wire w22 b_4_1 b_4_2 b_4_3 b_4_4
+
+explode w2 v
+
+mksweep w2
+addsweep w21 w2_1
+addsweep w22 w2_2
+buildsweep result
+
+set square 15708.8
+
+# Analysis of "nbshapes res"
+set nb_v_good 8
+set nb_e_good 12
+set nb_w_good 4
+set nb_f_good 4
+set nb_sh_good 1
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 29
+
+set 2dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC12257"
+puts "============"
+puts ""
+#######################################################################
+# Fuse operation fails
+#######################################################################
+
+set BugNumber OCC12257
+
+puts "Load shape ..."
+restore [locate_data_file OCC12257.brep] b1
+
+explode b1
+
+puts "Prepare boolean operation ..."
+bop b1_1 b1_2
+
+puts "Start boolean operation ..."
+bopfuse result
+puts "Finish boolean operation ..."
+
+set square 3394.17
+
+# Analysis of "nbshapes res"
+set nb_v_good 72
+set nb_e_good 109
+set nb_w_good 39
+set nb_f_good 39
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 262
+
+set 2dviewer 1
+
--- /dev/null
+puts "================"
+puts "OCC1226"
+puts "The revolution problem reproduced in OCC Samples"
+puts "================"
+puts ""
+
+vertex v1 0 0 0
+vertex v2 50 0 0
+vertex v3 50 50 0
+
+edge e1 v1 v2
+edge e2 v2 v3
+edge e3 v3 v1
+
+wire w e1 e2 e3
+
+mkplane f w
+
+revol result f 0 0 30 0 1 0 180
+
+set square 23211.3
+set 2dviewer 0
+
+
--- /dev/null
+puts "================"
+puts "OCC1243"
+puts "================"
+puts "Bad solid created from face with command 'revol'"
+puts ""
+
+restore [locate_data_file OCC1243-1.brep] f1
+checkshape f1
+
+revol result f1 -5000.0 0.0 0.0 10000.0 0.0 0.0 360.0
+
+set tolerance [maxtolerance result]
+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
+
+set max_tolerance 1.00000e-06
+
+if { ${MaxFaceTolerance} > ${max_tolerance} || ${MaxEdgeTolerance} > ${max_tolerance} || ${MaxVertexTolerance} > ${max_tolerance} } {
+ puts "OCC1243 - Error"
+} else {
+ puts "OCC1243 - OK"
+}
+
+set square 350733
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC1243"
+puts "================"
+puts "Bad solid created from face with command 'revol'"
+puts ""
+
+restore [locate_data_file OCC1243-2.brep] f1
+checkshape f1
+
+revol result f1 -5000.0 0.0 0.0 10000.0 0.0 0.0 360.0
+
+set tolerance [maxtolerance result]
+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
+
+set max_tolerance 1.00000e-06
+
+if { ${MaxFaceTolerance} > ${max_tolerance} || ${MaxEdgeTolerance} > ${max_tolerance} || ${MaxVertexTolerance} > ${max_tolerance} } {
+ puts "OCC1243 - Error"
+} else {
+ puts "OCC1243 - OK"
+}
+
+set square 3.06024e+06
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC1255"
+puts "================"
+puts ""
+# Exception in command 'section'
+
+restore [locate_data_file OCC1255.brep] a
+checkshape a
+
+plane p1 0 -36.8067 0 0 1 0
+mkface f1 p1
+
+bsection result a f1
+
+set length 5534.74
+set 2dviewer 0
--- /dev/null
+puts "========="
+puts " OCC1255 "
+puts "========="
+puts ""
+###############################################
+## Exception in command 'section'
+# (This script tests new topology)
+###############################################
+
+restore [locate_data_file OCC1255.brep] a
+checkshape a
+
+plane p1 0 -36.8067 0 0 1 0
+mkface f1 p1
+
+if { [catch {bop a f1 } ] } {
+ puts "Faulty OCC1255: BOP operation was made wrongly"
+} else {
+ bopsection result
+}
+
+set length 5383.42
+set 2dviewer 0
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC1360"
+puts "================"
+puts ""
+######################################################
+# Solid correctly displayed in shadding mode, but one tis faces itself has no prs
+######################################################
+
+pload XDE
+
+restore [locate_data_file OCC1360.brep] sh
+
+fixshape result sh 1e-7
+
+set square 407.599
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1456"
+puts "============"
+puts ""
+######################################################
+# Impossible to build mixed type fillets
+######################################################
+
+restore [locate_data_file OCC1456.brep] a
+
+checkshape a
+
+##############################################
+explode a w
+explode a_4 e
+mkevol result a
+updatevol a_4_1 0 5 0.5 20 1 5
+updatevol a_4_2 0 5
+updatevol a_4_3 0 5
+updatevol a_4_4 0 5 0.5 20 1 5
+updatevol a_4_5 0 5 0.5 20 1 5
+updatevol a_4_6 0 5
+updatevol a_4_7 0 5 0.5 20 1 5
+updatevol a_4_8 0 5
+
+if { [catch { buildevol } catch_result] } {
+ puts "Faulty OCC1456 (case 2)"
+}
+
+vinit
+vdisplay result
+vsetdispmode 0
+vfit
+
+set square 3.21455e+06
+set only_screen 1
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 1)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 913238
+set 3dviewer 1
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 10)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 -T 0 1 1 2 2 .5
+
+if { [catch {buildsweep result -C} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 0
+set 3dviewer 1
+
--- /dev/null
+puts "TODO ?OCC11111 ALL: An exception was caught"
+puts "TODO ?OCC11111 ALL: Exception"
+puts "TODO ?OCC11111 ALL: Faulty OCC1477"
+puts "TODO ?OCC11111 ALL: TEST INCOMPLETE"
+
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 11)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 0 1 1 2 2 .5
+
+if { [catch {buildsweep result -R} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.81647e+006
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 12)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 -T 0 1 1 2 2 .5
+
+if { [catch {buildsweep result -R} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set good_square 1.99019e+06
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 2)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 -T
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 913238
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 3)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2
+
+if { [catch {buildsweep result -C} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.02648e+06
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 4)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 -T
+
+if { [catch {buildsweep result -C} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.11707e+06
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 5)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2
+
+if { [catch {buildsweep result -R} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.02342e+06
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 6)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 -T
+
+if { [catch {buildsweep result -R} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.10891e+06
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 7)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 0 1 1 2 2 .5
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.49907e+06
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 8)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 -T 0 1 1 2 2 .5
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 1.56786e+06
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC1477"
+puts "============"
+puts ""
+######################################################
+# Problems in MakePipeShell
+# (case 9)
+######################################################
+
+restore [locate_data_file OCC1477-1.brep] s1
+restore [locate_data_file OCC1477-2.brep] s2
+
+checkshape s1
+checkshape s2
+
+mksweep s1
+
+addsweep s2 0 1 1 2 2 .5
+
+if { [catch {buildsweep result -C} catch_result] } {
+ puts "Faulty OCC1477"
+}
+
+set square 0
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: An exception was caught"
+puts "TODO OCC11111 ALL: Exception"
+puts "TODO OCC11111 ALL: Faulty OCC165"
+puts "TODO OCC11111 ALL: Error : The length of result shape is"
+
+cpulimit 600
+
+puts "========"
+puts "OCC165"
+puts "========"
+puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
+
+
+dchrono h reset
+dchrono h start
+
+restore [locate_data_file offset_wire_019.brep] a
+checkshape a
+
+mkplane f a
+checkshape f
+
+set start_stepoffset -5.7
+set incr_stepoffset 0.1
+set finish_stepoffset -2.8
+
+set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]
+
+set IsMade 0
+set IsBeginMade 0
+set IsGood 1
+set i 0
+set resume_string ""
+for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} {
+ incr i
+ puts "i = $i"
+ if { [catch {mkoffset result f 1 $stepoffset } catch_result] } {
+ puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly"
+ set IsGood 0
+ set IsMade 0
+ } else {
+ puts "OK OCC165 (stepoffset = $stepoffset)"
+ set IsMade 1
+ }
+ if {$IsBeginMade == 0 && $IsMade == 1} {
+ set IsBeginMade 1
+ set BeginStepOffset $stepoffset
+ }
+ if {$IsMade == 1} {
+ set FinishStepOffset $stepoffset
+ }
+
+ dchrono h show
+
+ if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } {
+ set IsBeginMade 0
+ set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n"
+ set resume_string "${resume_string}${resume_tmp}"
+ }
+}
+
+puts ""
+if {[string length $resume_string] == 0} {
+ puts "Offset is created wrongly on initial shape in following borders"
+ puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]"
+} else {
+ puts "Offset is created correctly on initial shape in following borders"
+ puts "$resume_string"
+}
+
+if {$IsGood == 1} {
+ puts "OCC165 OK"
+} else {
+ puts "Faulty OCC165"
+}
+
+dchrono h stop
+dchrono h show
+
+renamevar result_1 result
+
+set length 0
+set 2dviewer 0
--- /dev/null
+cpulimit 600
+
+puts "========"
+puts "OCC165"
+puts "========"
+puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
+
+dchrono h reset
+dchrono h start
+
+restore [locate_data_file offset_wire_019.brep] a
+checkshape a
+
+mkplane f a
+checkshape f
+
+set start_stepoffset -2.6
+set incr_stepoffset 0.1
+set finish_stepoffset 0.0
+
+set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]
+
+set IsMade 0
+set IsBeginMade 0
+set IsGood 1
+set i 0
+set resume_string ""
+for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} {
+ incr i
+ puts "i = $i"
+ if { [catch {mkoffset result f 1 $stepoffset } catch_result] } {
+ puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly"
+ set IsGood 0
+ set IsMade 0
+ } else {
+ puts "OK OCC165 (stepoffset = $stepoffset)"
+ set IsMade 1
+ }
+ if {$IsBeginMade == 0 && $IsMade == 1} {
+ set IsBeginMade 1
+ set BeginStepOffset $stepoffset
+ }
+ if {$IsMade == 1} {
+ set FinishStepOffset $stepoffset
+ }
+
+ dchrono h show
+
+ if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } {
+ set IsBeginMade 0
+ set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n"
+ set resume_string "${resume_string}${resume_tmp}"
+ }
+}
+
+puts ""
+if {[string length $resume_string] == 0} {
+ puts "Offset is created wrongly on initial shape in following borders"
+ puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]"
+} else {
+ puts "Offset is created correctly on initial shape in following borders"
+ puts "$resume_string"
+}
+
+if {$IsGood == 1} {
+ puts "OCC165 OK"
+} else {
+ puts "Faulty OCC165"
+}
+
+dchrono h stop
+dchrono h show
+
+renamevar result_1 result
+
+set length 1081.52
+set 2dviewer 0
--- /dev/null
+puts "TODO ?OCC11111 ALL: An exception was caught"
+puts "TODO ?OCC11111 ALL: Exception"
+puts "TODO ?OCC11111 ALL: Faulty OCC165"
+puts "TODO ?OCC11111 ALL: Error : The length of result shape is"
+
+cpulimit 600
+
+puts "========"
+puts "OCC165"
+puts "========"
+puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
+
+
+dchrono h reset
+dchrono h start
+
+restore [locate_data_file offset_wire_019.brep] a
+checkshape a
+
+mkplane f a
+checkshape f
+
+set start_stepoffset 0.2
+set incr_stepoffset 0.1
+set finish_stepoffset 4.9
+
+set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]
+
+set IsMade 0
+set IsBeginMade 0
+set IsGood 1
+set i 0
+set resume_string ""
+for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} {
+ incr i
+ puts "i = $i"
+ if { [catch {mkoffset result f 1 $stepoffset } catch_result] } {
+ puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly"
+ set IsGood 0
+ set IsMade 0
+ } else {
+ puts "OK OCC165 (stepoffset = $stepoffset)"
+ set IsMade 1
+ }
+ if {$IsBeginMade == 0 && $IsMade == 1} {
+ set IsBeginMade 1
+ set BeginStepOffset $stepoffset
+ }
+ if {$IsMade == 1} {
+ set FinishStepOffset $stepoffset
+ }
+
+ dchrono h show
+
+ if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } {
+ set IsBeginMade 0
+ set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n"
+ set resume_string "${resume_string}${resume_tmp}"
+ }
+}
+
+puts ""
+if {[string length $resume_string] == 0} {
+ puts "Offset is created wrongly on initial shape in following borders"
+ puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]"
+} else {
+ puts "Offset is created correctly on initial shape in following borders"
+ puts "$resume_string"
+}
+
+if {$IsGood == 1} {
+ puts "OCC165 OK"
+} else {
+ puts "Faulty OCC165"
+}
+
+renamevar result_1 result
+
+set length 1112.83
+set 2dviewer 0
+
+dchrono h stop
+dchrono h show
--- /dev/null
+cpulimit 600
+
+puts "========"
+puts "OCC165"
+puts "========"
+puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
+
+dchrono h reset
+dchrono h start
+
+restore [locate_data_file offset_wire_019.brep] a
+checkshape a
+
+mkplane f a
+checkshape f
+
+set start_stepoffset 5.1
+set incr_stepoffset 0.1
+set finish_stepoffset 6.3
+
+set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]
+
+set IsMade 0
+set IsBeginMade 0
+set IsGood 1
+set i 0
+set resume_string ""
+for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} {
+ incr i
+ puts "i = $i"
+ if { [catch {mkoffset result f 1 $stepoffset } catch_result] } {
+ puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly"
+ set IsGood 0
+ set IsMade 0
+ } else {
+ puts "OK OCC165 (stepoffset = $stepoffset)"
+ set IsMade 1
+ }
+ if {$IsBeginMade == 0 && $IsMade == 1} {
+ set IsBeginMade 1
+ set BeginStepOffset $stepoffset
+ }
+ if {$IsMade == 1} {
+ set FinishStepOffset $stepoffset
+ }
+
+ dchrono h show
+
+ if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } {
+ set IsBeginMade 0
+ set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n"
+ set resume_string "${resume_string}${resume_tmp}"
+ }
+}
+
+puts ""
+if {[string length $resume_string] == 0} {
+ puts "Offset is created wrongly on initial shape in following borders"
+ puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]"
+} else {
+ puts "Offset is created correctly on initial shape in following borders"
+ puts "$resume_string"
+}
+
+if {$IsGood == 1} {
+ puts "OCC165 OK"
+} else {
+ puts "Faulty OCC165"
+}
+
+renamevar result_1 result
+
+set length 1113.06
+set 2dviewer 0
+
+dchrono h stop
+dchrono h show
--- /dev/null
+puts "============"
+puts "OCC2083"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakePipeShell throws an exception
+######################################################
+
+restore [locate_data_file OCC2083-f1.brep] f1
+restore [locate_data_file OCC2083-f2.brep] f2
+restore [locate_data_file OCC2083-w.brep] s
+
+checkshape f1
+checkshape f2
+checkshape s
+
+explode f1 w
+explode f2 w
+mksweep s
+addsweep f1_1
+addsweep f2_1
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC2083"
+}
+
+set square 36302.3
+set 3dviewer 1
--- /dev/null
+puts "============"
+puts "OCC2083"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakePipeShell throws an exception
+######################################################
+
+restore [locate_data_file OCC2083-f1.brep] f1
+restore [locate_data_file OCC2083-f2.brep] f2
+restore [locate_data_file OCC2083-w.brep] s
+
+checkshape f1
+checkshape f2
+checkshape s
+
+explode f1 w
+explode f2 w
+mksweep s
+addsweep f1_1 -T
+addsweep f2_1 -T
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC2083"
+}
+
+set square 36583.8
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2083"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakePipeShell throws an exception
+######################################################
+
+restore [locate_data_file OCC2083-f1.brep] f1
+restore [locate_data_file OCC2083-f2.brep] f2
+restore [locate_data_file OCC2083-w.brep] s
+
+checkshape f1
+checkshape f2
+checkshape s
+
+explode f1 w
+explode f2 w
+mksweep s
+addsweep f1_1 -T
+addsweep f2_1
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC2083"
+}
+
+set square 36546.8
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2083"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakePipeShell throws an exception
+######################################################
+
+restore [locate_data_file OCC2083-f1.brep] f1
+restore [locate_data_file OCC2083-f2.brep] f2
+restore [locate_data_file OCC2083-w.brep] s
+
+checkshape f1
+checkshape f2
+checkshape s
+
+explode f1 w
+explode f2 w
+mksweep s
+addsweep f1_1
+addsweep f2_1 -T
+
+if { [catch {buildsweep result} catch_result] } {
+ puts "Faulty OCC2083"
+}
+
+set square 36339.5
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2172"
+puts "============"
+puts ""
+######################################################
+# Fuse operation produces invalid shape
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC2172-torus.brep] torus
+restore [locate_data_file OCC2172-cylinder.brep] cylinder
+
+checkshape torus
+checkshape cylinder
+
+bfuse result torus cylinder
+
+set square 28603.8
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2172"
+puts "============"
+puts ""
+######################################################
+# Fuse operation produces invalid shape
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC2172-torus.brep] torus
+restore [locate_data_file OCC2172-cylinder.brep] cylinder
+
+checkshape torus
+checkshape cylinder
+
+bfuse result cylinder torus
+
+set square 28603.8
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2172"
+puts "============"
+puts ""
+######################################################
+# Fuse operation produces invalid shape
+######################################################
+## (old topology)
+## (fuse)
+######################################################
+
+restore [locate_data_file OCC2172-torus.brep] torus
+restore [locate_data_file OCC2172-cylinder.brep] cylinder
+
+checkshape torus
+checkshape cylinder
+
+if { [catch {bfuse result torus cylinder} catch_result] } {
+ puts "Faulty OCC2172"
+}
+
+set square 28603.8
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2172"
+puts "============"
+puts ""
+######################################################
+# Fuse operation produces invalid shape
+######################################################
+## (old topology)
+## (fuse)
+######################################################
+
+restore [locate_data_file OCC2172-torus.brep] torus
+restore [locate_data_file OCC2172-cylinder.brep] cylinder
+
+checkshape torus
+checkshape cylinder
+
+if { [catch {bfuse result cylinder torus} catch_result] } {
+ puts "Faulty OCC2172"
+}
+
+set square 28603.8
+set 3dviewer 1
+
--- /dev/null
+#INTERFACE IGES
+puts "========"
+puts "OCC260"
+puts "========"
+
+pload XDE
+
+if { [catch { igesbrep [locate_data_file OCC260.igs] a * } catch_result] } {
+ puts "OCC260: Error: there is reading problem"
+} else {
+ regexp {([-0-9.+eE]+) Shape\(s\) listed} [tpcompound result] full ShapeNumber
+ if {${ShapeNumber} > 0} {
+ puts "OCC260: OK"
+ } else {
+ puts "OCC260: Error"
+ }
+}
+
+set length 4.41928
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty OCC263: here is shading problem"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC263"
+puts "========"
+
+restore [locate_data_file OCC263.brep] result
+
+isos result 0
+tclean result
+
+#Creating mesh
+incmesh result 0.01
+
+#View the result of mesh
+triangles result
+
+set tri_info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
+regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
+
+if { $tri != 989 && $nod != 535 } {
+ puts "Faulty OCC263: here is shading problem"
+} else {
+ puts "Shading of OCC263 is OK"
+}
+
+set square 0
+set 3dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty OCC264_12: here is shading problem"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 12)"
+puts "========"
+
+restore [locate_data_file OCC264_12.brep] result
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos res 0
+triangles result
+
+#smallview
+#fit
+
+set tri_info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
+regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
+
+if { $tri != 19 && $nod != 21 } {
+ puts "Faulty OCC264_12: here is shading problem"
+} else {
+ puts "Shading of OCC264_12 is OK"
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC2785"
+puts "============"
+puts ""
+######################################################
+# Cut and fuse operations for two faces that share same domain give invalid result
+######################################################
+# Cut and fuse operations for two faces that share same domain gives invalid
+# result, if one face has a hole and other face touches a boundary of this hole.
+######################################################
+## (new topology)
+## (bcut)
+## (bop)
+## (boptuc)
+## (bfuse)
+######################################################
+
+############# data #############
+pcylinder c1 2 10
+pcylinder c2 2 2
+explode c1 f
+explode c2 f
+mksurface gs c2_1
+trim trgs gs 1 2 2 4
+mkface ff trgs
+trim trgs gs 0 1 2 4
+mkface ff2 trgs
+
+bcut rcut1 c1_1 ff
+checkshape rcut1
+
+bop ff2 rcut1
+boptuc rcut2
+checkshape rcut2
+
+bfuse fuse1 rcut2 ff2
+checkshape fuse1
+
+bfuse result fuse1 ff
+
+set square 125.664
+set 3dviewer 1
--- /dev/null
+puts "============"
+puts "OCC2785"
+puts "============"
+puts ""
+######################################################
+# Cut and fuse operations for two faces that share same domain give invalid result
+######################################################
+# Cut and fuse operations for two faces that share same domain gives invalid
+# result, if one face has a hole and other face touches a boundary of this hole.
+######################################################
+## (old topology)
+## (cut)
+## (fuse)
+######################################################
+
+############# data #############
+pcylinder c1 2 10
+pcylinder c2 2 2
+explode c1 f
+explode c2 f
+mksurface gs c2_1
+trim trgs gs 1 2 2 4
+mkface ff trgs
+trim trgs gs 0 1 2 4
+mkface ff2 trgs
+
+bcut rcut1 c1_1 ff
+checkshape rcut1
+
+bcut rcut2 rcut1 ff2
+checkshape rcut2
+
+bfuse fuse1 rcut2 ff2
+checkshape fuse1
+
+bfuse result fuse1 ff
+
+set square 125.664
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2986"
+puts "============"
+puts ""
+######################################################
+# Cut&fuse oprs. for 2 toroidal faces, sharing the same domain give invalid result
+######################################################
+## (new topology)
+## (bop)
+## (bopcut)
+## (bfuse)
+######################################################
+
+############# data #############
+ptorus p1 10 4
+explode p1 f
+mksurface gs p1_1
+trim trgs gs 1 2 1 2
+mkface ff trgs
+############# testing faces are: p1_1 ff #############
+
+bop p1_1 ff
+bopcut rcut1
+checkshape rcut1
+
+bfuse result rcut1 ff
+
+set square 1579.81
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2986"
+puts "============"
+puts ""
+######################################################
+# Cut&fuse oprs. for 2 toroidal faces, sharing the same domain give invalid result
+######################################################
+## (old topology)
+## (cut)
+## (fuse)
+######################################################
+
+############# data #############
+ptorus p1 10 4
+explode p1 f
+mksurface gs p1_1
+trim trgs gs 1 2 1 2
+mkface ff trgs
+
+bcut rcut1 p1_1 ff
+checkshape rcut1
+
+bfuse result rcut1 ff
+
+set square 1579.81
+set 3dviewer 1
--- /dev/null
+pload QAcommands
+
+puts "========"
+puts "OCC369"
+puts "BUC61031"
+puts "========"
+puts ""
+#################################################################
+## BndLib_Add3dCurve raised an exception on edges which range is out of the domain of the curve.
+#################################################################
+
+restore [locate_data_file OCC369.brep] result
+OCC369 result
+
+set square 0.077223
+set 2dviewer 0
+
+
+
+
--- /dev/null
+puts "TODO OCC11111 ALL: OCC358 : Faulty"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "========================"
+puts " OCC400 "
+puts "========================"
+
+restore [locate_data_file OCC400.brep] result
+
+tclean result
+isos result 0
+
+vinit
+vdisplay result
+vfit
+vsetdispmode result 1
+
+set tri_info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
+regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
+
+if { $tri == 66 && $nod ==70} {
+ puts " Warning: OCC358 looks like OK, but visual checking is required !!!!"
+} else {
+ puts "OCC358 : Faulty , but visual checking is required !!!!"
+}
+
+set square 0
+set 3dviewer 1
+
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC405"
+puts "OCC435"
+puts "SAM1296"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC395-1.brep] e1
+restore [locate_data_file OCC405-2.brep] e2
+
+checkshape e1
+checkshape e2
+
+OCC405 result e1 e2
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
+
+if { $num == 2 } {
+ puts "OCC405 OK : Result shape is CORRECT !!! "
+} else {
+ puts " Faulty OCC405: Result shape is INcorrect !!! "
+}
+
+set length 17.5348
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+pload QAcommands
+
+puts "========"
+puts "OCC426"
+puts "OCC50"
+puts "========"
+#############################################################################
+## The result of fuse operation is invalid
+#############################################################################
+## BRepFilletAPI_MakeFillet presents a bug on fillet computation (build())
+#############################################################################
+
+OCC426 result rs1 rs2 rs3 fuse32 fuse321
+
+checkshape rs1
+checkshape rs2
+checkshape rs3
+checkshape fuse32
+checkshape fuse321
+
+set square 7507.61
+set 3dviewer 1
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC434"
+puts "SAM1296"
+puts "================"
+puts ""
+
+########################################################
+## Exception is raised on NT, SUN in the GeomConvert_CompCurveToBSplineCurve
+########################################################
+
+restore [locate_data_file OCC434.brep] e
+checkshape e
+explode e e
+
+OCC405 result e_1 e_2
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
+
+if { $num == 2 } {
+ puts "OCC434 OK : Result shape is CORRECT !!! "
+} else {
+ puts " Faulty OCC434: Result shape is INcorrect !!! "
+}
+
+set length 8.74616
+set 2dviewer 0
+
--- /dev/null
+pload QAcommands
+
+#INTERFACE IGES
+puts "========================"
+puts " OCC435 "
+puts " OCC405 "
+puts "========================"
+puts ""
+###############################################################
+## Exception Standard_ConstructuionError is rased in DRAW in the
+## GeomConvert_CompCurveToBSplineCurve on the attached shapes during command merge
+###############################################################
+
+restore [locate_data_file OCC435a.brep] a
+explode a
+set j 1
+repeat 8 {
+ explode a_$j
+ if { [catch {OCC405 result a_${j}_1 a_${j}_2} catch_result] } {
+ puts "Faulty OCC435 : merge operation was made incorrect"
+ } else {
+ puts " OCC435 OK: merge operation was made properly"
+ }
+ incr j
+}
+
+set length 17.2848
+set 3dviewer 1
--- /dev/null
+puts "============"
+puts "OCC5157"
+puts "============"
+puts ""
+######################################################
+# DRAW commands vprops and sprops with tolerance 1.e-6 hange on attached shape.
+######################################################
+
+cpulimit 3500
+#dchrono h reset; dchrono h start
+
+catch { pload XDE }
+
+set BugNumber OCC5157
+
+set status 0
+if {[catch { stepread [locate_data_file OCC5157.stp] a * } catch_result] } {
+ puts "Faulty ${BugNumber} : here is reading problem"
+} else {
+ tpcompound result
+}
+
+set tol_square 1.e-6
+set square 35273.9
+set 2dviewer 0
+
+
--- /dev/null
+puts "============"
+puts "OCC5157"
+puts "============"
+puts ""
+######################################################
+# DRAW commands vprops and sprops with tolerance 1.e-6 hange on attached shape.
+######################################################
+
+cpulimit 3500
+#dchrono h reset; dchrono h start
+
+catch { pload XDE }
+
+set BugNumber OCC5157
+
+if { [catch { stepread [locate_data_file OCC5157.stp] a * } catch_result] } {
+ puts "Faulty ${BugNumber} : here is reading problem"
+} else {
+ tpcompound result
+}
+set tol_square 1.e-6
+set square 35362.3
+set 2dviewer 0
+
--- /dev/null
+pload QAcommands
+
+puts "========"
+puts "OCC570"
+puts "========"
+puts ""
+
+OCC570 result
+
+set square 58500
+set 3dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5729"
+puts "============"
+puts ""
+######################################################
+# Regression on case cfe 900 K5
+######################################################
+
+set BugNumber OCC5729
+
+restore [locate_data_file OCC5729-f1.brep] f1
+restore [locate_data_file OCC5729-f2.brep] f2
+
+decho off
+set che_1 [checkshape f1]
+decho on
+if { [regexp {Faulty} $che_1] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for f1"
+}
+
+decho off
+set che_2 [checkshape f2]
+decho on
+if { [regexp {Faulty} $che_2] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for f2"
+}
+
+bfuse result f1 f2
+
+set square 28559.8
+
+set nb_v_good 13
+set nb_e_good 22
+set nb_w_good 15
+set nb_f_good 13
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 66
+
--- /dev/null
+puts "================"
+puts "OCC578"
+puts "OCC584"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC578_w1.brep] w1
+checkshape w1
+
+restore [locate_data_file OCC578_w2.brep] w2
+checkshape w2
+
+set x 1
+set y 1
+set z 0.5
+box b ${x} ${y} ${z}
+checkshape b
+
+bfuse res1 w1 w2
+checkshape res1
+
+bcut result b res1
+
+set square 4.84596
+set 3dviewer 0
--- /dev/null
+puts "================"
+puts "OCC578"
+puts "OCC582"
+puts "OCC583"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC578_w1.brep] w1
+checkshape w1
+
+restore [locate_data_file OCC578_w2.brep] w2
+checkshape w2
+
+set x 1
+set y 1
+set z 0.5
+box b ${x} ${y} ${z}
+checkshape b
+
+bfuse res1 w1 w2
+checkshape res1
+
+bop b res1
+bopcut result
+
+set square 4.84596
+set 3dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5805"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
+######################################################
+
+set BugNumber OCC5805
+
+puts "demonstration of pipes and hollowing for GTISoft"
+puts ""
+puts "Scenario 2A: Hollowed elliptical cylinder - ThroughSection and MakeThickSolid (work-around: ellipse is split into 2)"
+
+
+ellipse e 10 60 0 1 0 0 5 3
+trim e1 e 0 pi
+trim e2 e pi 2*pi
+mkedge ee1 e1
+mkedge ee2 e2
+wire w1 ee1 ee2
+copy w1 w2
+ttranslate w2 -20 0 0
+
+if { [catch { thrusections rthru2 1 1 w1 w2 } catch_result] } {
+ puts "Faulty ${BugNumber} : thrusections is wrong"
+}
+
+explode rthru2 f
+
+if { [catch { offsetshape result rthru2 -0.5 rthru2_3 rthru2_4 } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result] } {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
+}
+
+set square 981.941
+
+set nb_v_good 6
+set nb_e_good 10
+set nb_w_good 8
+set nb_f_good 6
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 32
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5805"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
+######################################################
+
+set BugNumber OCC5805
+
+puts "demonstration of pipes and hollowing for GTISoft"
+puts ""
+puts "Scenario 2A: Hollowed elliptical cylinder - ThroughSection and MakeThickSolid"
+
+ellipse e 10 60 0 1 0 0 5 3
+mkedge ee e
+wire w1 ee
+copy w1 w2
+ttranslate w2 -20 0 0
+
+if { [catch { thrusections rthru2 1 1 w1 w2 } catch_result] } {
+ puts "Faulty ${BugNumber} : thrusections is wrong"
+}
+
+explode rthru2 f
+
+if { [catch { offsetshape result rthru2 -0.5 rthru2_2 rthru2_3 } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result] } {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } catch_result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
+}
+
+set square 982.254
+
+set nb_v_good 3
+set nb_e_good 5
+set nb_w_good 6
+set nb_f_good 4
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 20
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5805"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
+######################################################
+
+set BugNumber OCC5805
+
+restore [locate_data_file OCC5805.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+explode a f
+
+if { [catch { offsetshape result a -1 a_6 } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result] } {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } catch_result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
+}
+
+set square 1185.03
+
+set nb_v_good 10
+set nb_e_good 15
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 41
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5805"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
+######################################################
+
+set BugNumber OCC5805
+
+restore [locate_data_file OCC5805.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+explode a f
+
+offsetparameter 1e-7 c a
+offsetload a -1 a_6
+
+if { [catch { offsetperform result } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result] } {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } catch_result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
+}
+
+set square 1185.03
+
+set nb_v_good 10
+set nb_e_good 15
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 41
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5805"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
+######################################################
+
+set BugNumber OCC5805
+
+restore [locate_data_file OCC5805.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+explode a f
+
+offsetparameter 1e-7 c a
+offsetload a -1
+
+if { [catch { offsetperform result } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result]} {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } catch_result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
+}
+
+set square 876.584
+
+set nb_v_good 10
+set nb_e_good 15
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 41
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5805"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid behaves unstably and produces very different results.
+######################################################
+
+set BugNumber OCC5805
+
+restore [locate_data_file OCC5805.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+if { [catch { offsetshape result a -1 } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result] } {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } catch_result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)"
+}
+
+set square 876.584
+
+set nb_v_good 10
+set nb_e_good 15
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 41
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5806"
+puts "============"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeThickSolid fails to build a result
+######################################################
+
+set BugNumber OCC5806
+
+puts "demonstration of pipes and hollowing for GTISoft"
+puts ""
+puts "Scenario 3A: Hollowed general pipe - ThroughSection with following shell reconstruction"
+
+circle c 0 100 0 1 0 0 5
+mkedge ec c
+wire wc ec
+polyline pl 10 90 -10 10 90 10 10 110 10 10 110 -10 10 90 -10
+
+if { [catch { thrusections resthru 1 1 wc pl } catch_result] } {
+ puts "Faulty ${BugNumber} : thrusections is wrong"
+}
+
+# straighforward hollowing will fail due to problems in the algorithm
+explode resthru f
+
+if { [catch { offsetshape result resthru -0.5 resthru_6 resthru_7 } catch_result] } {
+ puts "Faulty ${BugNumber} : offsetshape is wrong"
+}
+
+if { [catch { set tolmaxres [tolmax result] } catch_result] } {
+ puts "Faulty ${BugNumber} : tolmax is wrong"
+}
+regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full maxtolerance
+if { [catch { expr $maxtolerance } catch_result] } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (1)."
+}
+if { $maxtolerance > 1. } {
+ puts "Faulty ${BugNumber} : maxtolerance is wrong (2)."
+}
+
+set square 1116.06
+
+set nb_v_good 10
+set nb_e_good 15
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 41
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6063"
+puts "============"
+puts ""
+######################################################
+# Exception is raised during command "sprops" in DRAW on attached shape.
+######################################################
+
+set BugNumber OCC6063
+cpulimit 2000
+
+restore [locate_data_file OCC6063-2.brep] result
+
+decho off
+set che_res [checkshape result]
+decho on
+if { [regexp {Faulty} $che_res] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for res"
+}
+
+set tol_square 1.e-6
+set square 2465.96
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6063"
+puts "============"
+puts ""
+######################################################
+# Exception is raised during command "sprops" in DRAW on attached shape.
+######################################################
+
+set BugNumber OCC6063
+
+restore [locate_data_file OCC6063.brep] result
+
+checkshape result
+
+set tol_square 1.e-6
+set square 413318
+set 3dviewer 1
+
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC606"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC606_2.brep] w2
+checkshape w2
+
+OCC606 result w2 -t
+
+set square 508.243
+set 3dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC606"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC606_10.brep] w10
+checkshape w10
+
+OCC606 result w10 -t
+
+set square 522.56
+set 3dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6181"
+puts "============"
+puts ""
+######################################################
+# Incorrect result of boolean cut
+######################################################
+
+set BugNumber OCC6181
+
+restore [locate_data_file OCC6181_A.brep] s1
+restore [locate_data_file OCC6181_B.brep] s2
+
+decho off
+set che_s1 [checkshape s1]
+set che_s2 [checkshape s2]
+decho on
+if { [regexp {Faulty} $che_s1] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s1"
+}
+
+if { [regexp {Faulty} $che_s2] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s2"
+}
+
+bcut result s1 s2
+
+set square 151691
+
+set nb_v_good 14
+set nb_e_good 21
+set nb_w_good 9
+set nb_f_good 9
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 56
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6182"
+puts "============"
+puts ""
+######################################################
+# Incorrect result of boolean cut
+######################################################
+
+set BugNumber OCC6182
+
+restore [locate_data_file OCC6182_A.brep] s1
+restore [locate_data_file OCC6182_B.brep] s2
+
+decho off
+set che_s1 [checkshape s1]
+set che_s2 [checkshape s2]
+decho on
+if { [regexp {Faulty} $che_s1] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s1"
+}
+if { [regexp {Faulty} $che_s2] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s2"
+}
+
+bcut result s1 s2
+
+set square 318709
+
+set nb_v_good 316
+set nb_e_good 502
+set nb_w_good 185
+set nb_f_good 181
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 1187
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC111111 ALL: Error : The square of result shape is"
+pload QAcommands
+
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+restore [locate_data_file OCC6272_revolution.brep] a2
+
+OCC307 result a1 a2 0
+
+set square 0
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC111111 ALL: Error : The square of result shape is"
+
+pload QAcommands
+
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+restore [locate_data_file OCC6272_revolution.brep] a2
+
+OCC307 result a1 a2 1
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC111111 ALL: Error : The square of result shape is"
+
+pload QAcommands
+
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+explode a1
+OCC307 result a1_1 a1_2 0
+
+set square 0
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC111111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC111111 ALL: Error : The square of result shape is"
+
+pload QAcommands
+
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+explode a1
+OCC307 result a1_1 a1_2 1
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+explode a1
+
+bop a1_1 a1_2
+bopfuse result
+
+set square 6552.67
+
+# Analysis of "nbshapes res"
+set nb_v_good 116
+set nb_e_good 176
+set nb_w_good 72
+set nb_f_good 70
+set nb_sh_good 5
+set nb_sol_good 5
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 445
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+restore [locate_data_file OCC6272_revolution.brep] a2
+
+bop a1 a2
+bopfuse result
+
+# puts "See result in the viewer!!!"
+
+set square 8979.70
+
+# Analysis of "nbshapes res"
+set nb_v_good 60
+set nb_e_good 90
+set nb_w_good 42
+set nb_f_good 40
+set nb_sh_good 5
+set nb_sol_good 5
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 243
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_3 a1_5
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 730.993
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_6 a1_4
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 3387.54
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_5 a1_3
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 730.993
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_5 a1_1
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 2037.7
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_1 a1_5
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 2037.7
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_1 a1_2
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 2314.14
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_2 a1_1
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 2314.14
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_2 a1_4
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 922.7
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_4 a1_2
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 922.7
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_4 a1_6
+if { [catch { bopfuse result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set square 3387.54
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_3 a1_5
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 36
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_6 a1_4
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 57.3941
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_5 a1_3
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 36
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_5 a1_1
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 32
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_1 a1_5
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 32
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_1 a1_2
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 32
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_2 a1_1
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 32
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_2 a1_4
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 32.1528
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_4 a1_2
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 32.1528
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6272"
+puts "============"
+puts ""
+######################################################
+# Incorrect results of gluing operation
+######################################################
+
+set BugNumber OCC6272
+
+restore [locate_data_file OCC6272_bridge2.brep] a1
+
+#
+# a1 is compound. It containes a_3, a_5, a_1, a_2, a_4, a_6 solids
+#
+
+explode a1 so
+
+bop a1_4 a1_6
+if { [catch { bopsection result } ] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 57.3941
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC6277"
+puts "============"
+puts ""
+######################################################
+# Cut operation does not produce any result
+######################################################
+
+set BugNumber OCC6277
+
+restore [locate_data_file OCC6277_A.brep] s1
+restore [locate_data_file OCC6277_B.brep] s2
+
+decho off
+set che_s1 [checkshape s1]
+set che_s2 [checkshape s2]
+decho on
+if { [regexp {Faulty} $che_s1] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s1"
+}
+
+if { [regexp {Faulty} $che_s2] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s2"
+}
+
+bcut result s1 s2
+
+set square 40084.9
+
+set nb_v_good 23
+set nb_e_good 34
+set nb_w_good 19
+set nb_f_good 14
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 93
+
+set 2dviewer 0
+
--- /dev/null
+#INTERFACE STEP
+puts "============"
+puts "OCC6289"
+puts "============"
+puts ""
+######################################################
+# Internal error (code 101) in Section computation
+######################################################
+
+catch { pload XDE }
+
+set BugNumber OCC6289
+
+if { [catch { stepread [locate_data_file OCC6289.stp] a * } catch_result] } {
+ puts "Faulty ${BugNumber} : here is reading problem"
+} else {
+ tpcompound comp
+
+ plane pl 0 0 28 0 0 1
+ mkface f pl
+
+ if { [catch { bsection result comp f } catch_result] } {
+ puts "Faulty ${BugNumber}"
+ }
+}
+
+set length 453.679
+set 3dviewer 0
+
--- /dev/null
+puts "TODO OCC11111 ALL: Error : Result shape is WRONG"
+
+puts "============"
+puts "OCC6334"
+puts "============"
+puts ""
+######################################################
+# Invalid result of MakeCylindricalHole when input solid is REVERSED
+######################################################
+
+set BugNumber OCC6334
+
+# 1. Make box
+box b 100 100 100
+
+subshape b f 1
+offsetshape t b 10 b_1
+
+decho off
+set che_t [checkshape t]
+decho on
+
+if {[regexp {Faulty} $che_t]} {
+ puts "Faulty ${BugNumber} : checkshape is wrong for t"
+}
+
+set bnd_t [bounding t]
+set ori [lindex [dtyp t] 2]
+puts "Orientation of thick solid is $ori"
+
+# 3. Make hole
+hole h t 110 50 50 1 0 0 10
+
+set che [checkshape h]
+if { [regexp {Faulty} $che] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for h"
+}
+
+set bnd_h [bounding h]
+
+renamevar h result
+
+set square 117509
+
+set nb_v_good 32
+set nb_e_good 53
+set nb_w_good 27
+set nb_f_good 24
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 139
+
+
+# 4. Check thickness of box and hole
+set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]]
+set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]]
+
+if { [expr abs($dx_h - $dx_t)] > 1e-5 } {
+ puts "Thickness of solid = $dx_t"
+ puts "Thickness of solid with hole = $dx_h"
+ puts "Invalid result of making a hole"
+ puts "Faulty ${BugNumber}"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC6502"
+puts "================"
+puts ""
+#######################################################################################
+# Failure calculation of ShrunkRange resulting to failure of boolean operation
+#######################################################################################
+
+set BugNumber OCC6502
+
+
+restore [locate_data_file OCC6502.brep] a
+plane pl 100 0 0 1 0 0
+mkface f pl
+
+if { [catch { bsection result a f -a } catch_result] } {
+ puts "Faulty ${BugNumber}"
+}
+
+set length 37.7831
+set 3dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6538"
+puts "============"
+puts ""
+######################################################
+# Empty result obtained by operation "common" for couple of faces
+######################################################
+
+set BugNumber OCC6538
+
+restore [locate_data_file OCC6538-f1.brep] s1
+restore [locate_data_file OCC6538-f2.brep] s2
+
+decho off
+set che_s1 [checkshape s1]
+set che_s2 [checkshape s2]
+decho on
+if { [regexp {Faulty} $che_s1] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s1"
+}
+
+if { [regexp {Faulty} $che_s2] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s2"
+}
+
+
+bop s1 s2
+bopcommon result
+
+set square 18.695
+
+set nb_v_good 16
+set nb_e_good 16
+set nb_w_good 1
+set nb_f_good 1
+set nb_sh_good 1
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 36
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6554"
+puts "============"
+puts ""
+######################################################
+# Intersection shell-plane gives a disconnected set of edges
+######################################################
+
+set BugNumber OCC6554
+
+restore [locate_data_file OCC6554-shell.brep] sh
+restore [locate_data_file OCC6554-face.brep] f
+
+decho off
+set che_sh [checkshape sh]
+set che_f [checkshape f]
+decho on
+if { [regexp {Faulty} $che_sh] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for sh"
+}
+
+if { [regexp {Faulty} $che_f] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for f"
+}
+
+bsection result sh f -a
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full Vertices
+
+set good_Vertices 2
+
+if { ${Vertices} != ${good_Vertices} } {
+ puts "Faulty ${BugNumber}"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set length 110.045
+set 2dviewer 2
--- /dev/null
+puts "================"
+puts "OCC6766"
+puts "================"
+puts ""
+#######################################################################################
+# Invalid result of intersection of a bspline face with a plane
+#######################################################################################
+
+set BugNumber OCC6766
+
+restore [locate_data_file OCC6766.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for s1"
+}
+
+set Y 4
+plane pl 0 ${Y} 0 0 1 0
+mkface f pl
+bsection result a f -2d -a
+
+
+
+set nb_v_good 4
+set nb_e_good 3
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 8
+
+set length 138.474
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC6766"
+puts "================"
+puts ""
+#######################################################################################
+# Invalid result of intersection of a bspline face with a plane
+#######################################################################################
+
+set BugNumber OCC6766
+
+restore [locate_data_file OCC6766.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+set Y 4
+plane pl 0 ${Y} 0 0 1 0
+mkface f pl
+bop a f
+bopsection result
+
+
+set nb_v_good 4
+set nb_e_good 3
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 8
+
+set length 138.474
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC6766"
+puts "================"
+puts ""
+#######################################################################################
+# Invalid result of intersection of a bspline face with a plane
+#######################################################################################
+
+set BugNumber OCC6766
+
+restore [locate_data_file OCC6766.brep] a
+
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+set Y 6
+plane pl 0 ${Y} 0 0 1 0
+mkface f pl
+bsection result a f -2d -a
+
+
+set nb_v_good 4
+set nb_e_good 3
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 8
+
+set length 126.138
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC6766"
+puts "================"
+puts ""
+#######################################################################################
+# Invalid result of intersection of a bspline face with a plane
+#######################################################################################
+
+set BugNumber OCC6766
+
+restore [locate_data_file OCC6766.brep] a
+decho off
+set che_a [checkshape a]
+decho on
+if { [regexp {Faulty} $che_a] } {
+ puts "Faulty ${BugNumber} : checkshape is wrong for a"
+}
+
+set Y 6
+plane pl 0 ${Y} 0 0 1 0
+mkface f pl
+bop a f
+bopsection result
+
+
+set nb_v_good 4
+set nb_e_good 3
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 8
+
+set length 126.138
+set 2dviewer 0
--- /dev/null
+#INTERFACE STEP
+puts "================"
+puts "OCC6811"
+puts "================"
+puts ""
+#######################################################################################
+# Unstable work of the checkshape on the attached file.
+#######################################################################################
+
+catch { pload XDE }
+
+set BugNumber OCC6811
+
+if { [catch { stepread [locate_data_file trj12_b3-tu-203.stp] a * } catch_result] } {
+ puts "Faulty ${BugNumber} : here is reading problem"
+} else {
+ decho off
+ set che_a_1 [checkshape a_1 f]
+ set che_a_2 [checkshape a_1 f]
+ decho on
+ if { [regexp {Faulty} $che_a_1] } {
+ puts "Faulty ${BugNumber} : checkshape 1 is wrong for a"
+ }
+ if { [regexp {Faulty} $che_a_2] } {
+ puts "Faulty ${BugNumber} : checkshape 2 is wrong for a"
+ }
+
+ renamevar a_1 result
+}
+
+set square 1.48021e+06
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bopfuse)
+######################################################
+
+restore [locate_data_file OCC697_2.brep] b2
+restore [locate_data_file OCC697_3.brep] b3
+
+checkshape b2
+checkshape b3
+
+bop b3 b2
+if { [catch {bopfuse result} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 25357.5
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (old topology)
+## (fuse)
+######################################################
+
+restore [locate_data_file OCC697_1.brep] b1
+restore [locate_data_file OCC697_2.brep] b2
+
+checkshape b1
+checkshape b2
+if { [catch {bfuse result b2 b1} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 8879.41
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (old topology)
+## (fuse)
+######################################################
+
+restore [locate_data_file OCC697_2.brep] b2
+restore [locate_data_file OCC697_3.brep] b3
+
+checkshape b2
+checkshape b3
+if { [catch {bfuse result b3 b2} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 25357.5
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC697_1.brep] b1
+restore [locate_data_file OCC697_2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bfuse result b1 b2} catch_result] } {
+ puts "Faulty OCC697"
+}
+
+set square 8879.41
+set 3dviewer 1
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC697_1.brep] b1
+restore [locate_data_file OCC697_2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bfuse result b2 b1} catch_result] } {
+ puts "Faulty OCC697"
+}
+
+set square 8879.41
+set 3dviewer 1
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC697_2.brep] b2
+restore [locate_data_file OCC697_3.brep] b3
+
+checkshape b2
+checkshape b3
+
+if { [catch {bfuse result b2 b3} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 25357.5
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC697_2.brep] b2
+restore [locate_data_file OCC697_3.brep] b3
+
+checkshape b2
+checkshape b3
+
+if { [catch {bfuse result b3 b2} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 25357.5
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bopfuse)
+######################################################
+
+restore [locate_data_file OCC697_1.brep] b1
+restore [locate_data_file OCC697_2.brep] b2
+
+checkshape b1
+checkshape b2
+
+bop b1 b2
+if { [catch {bopfuse result} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 8879.41
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bopfuse)
+######################################################
+
+restore [locate_data_file OCC697_1.brep] b1
+restore [locate_data_file OCC697_2.brep] b2
+
+checkshape b1
+checkshape b2
+
+bop b2 b1
+if { [catch {bopfuse result} catch_result] } {
+ puts "Faulty OCC697"
+}
+set square 8879.41
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC697"
+puts "============"
+puts ""
+######################################################
+# Fuse operation does not work
+######################################################
+## (new topology)
+## (bopfuse)
+######################################################
+
+restore [locate_data_file OCC697_2.brep] b2
+restore [locate_data_file OCC697_3.brep] b3
+
+checkshape b2
+checkshape b3
+
+bop b2 b3
+if { [catch {bopfuse result} catch_result] } {
+ puts "Faulty OCC697 "
+}
+set square 25357.5
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC7626"
+puts "============"
+puts ""
+######################################################
+# Bad result of bcut operation
+######################################################
+
+set BugNumber OCC7626
+
+psphere s 10
+box b 10 0 0 20 20 20
+trotate b 10 0 0 0 0 1 45
+
+bcut result s b
+
+set square 1271.7
+
+set nb_v_good 4
+set nb_e_good 7
+set nb_w_good 4
+set nb_f_good 3
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 21
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC7626"
+puts "============"
+puts ""
+######################################################
+# Bad result of bcut operation
+######################################################
+
+set BugNumber OCC7626
+
+psphere s 10
+box b 10 0 0 20 20 20
+trotate b 10 0 0 0 0 1 45
+
+bcommon result s b
+
+set square 199.095
+
+set nb_v_good 2
+set nb_e_good 3
+set nb_w_good 3
+set nb_f_good 3
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 14
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC7668"
+puts "============"
+puts ""
+#######################################################################
+# BRepOffsetAPI_MakeOffset wrong generated list
+#######################################################################
+
+puts "#"
+puts "Non stable test case on Linux. MKV. 29.12.2010"
+puts " ( VERTEX : 136 or VERTEX : 134 )"
+puts "#"
+
+set BugNumber OCC7668
+
+restore [locate_data_file OCC7668.brep] a1
+
+wire w1 a1
+
+mkoffset result w1 1 2
+
+renamevar result_1 result
+
+# Analysis of "nbshapes res"
+set nb_v_good 134
+set nb_e_good 134
+set nb_w_good 1
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 269
+
+set length 136.008
+set 2dviewer 0
puts "TODO ?OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO ?OCC12345 ALL: Error : The square of result shape is"
+puts "TODO ?OCC12345 ALL: TEST ICOMPLETE"
puts "========"
puts "OCC770"
--- /dev/null
+puts "============"
+puts "OCC8228"
+puts "============"
+puts ""
+######################################################
+# exeption is raised during the vprops in DRAW on the attached shape
+######################################################
+
+set BugNumber OCC8228
+
+catch {pload XDE}
+catch {pload DCAF}
+
+# Create a new document and set UndoLimit
+
+NewDocument D MDTV-XCAF
+UndoLimit D 100
+
+# Open a transaction
+NewCommand D
+
+ReadStep D [locate_data_file OCC8228.stp]
+XGetOneShape result D
+
+set square 1.46159e+06
+
+set nb_v_good 1296
+set nb_e_good 2041
+set nb_w_good 826
+set nb_f_good 761
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 4926
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC8372"
+puts "============"
+puts ""
+######################################################
+# Twisted result of ThruSections operation
+######################################################
+
+set BugNumber OCC8372
+
+restore [locate_data_file OCC8372_1.brep] w1
+restore [locate_data_file OCC8372_2.brep] w2
+
+thrusections result 1 1 w1 w2
+
+set square 4140.46
+
+set nb_v_good 12
+set nb_e_good 18
+set nb_w_good 8
+set nb_f_good 8
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 0
+set nb_shape_good 48
+
+set 2dviewer 0
--- /dev/null
+puts "========="
+puts " OCC951 "
+puts "========="
+puts ""
+##################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+##################################################
+## (old topology)
+## (common)
+## (section)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] b
+restore [locate_data_file OCC951_2.brep] a
+
+checkshape b
+checkshape a
+
+bcommon result a b
+
+set nb_info [nbshapes result]
+
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
+regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh
+regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so
+regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full shl
+
+if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } {
+ puts " OCC951 : COMMON operation was made PROPERLY"
+ puts ""
+} else {
+ puts "Faulty OCC951 : result of COMMON operation is EMPTY compound"
+ puts ""
+}
+
+set square 560.908
+set 3dviewer 1
+
--- /dev/null
+puts "========="
+puts " OCC951 "
+puts "========="
+puts ""
+##################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+##################################################
+## (old topology)
+## (common)
+## (section)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] b
+restore [locate_data_file OCC951_2.brep] a
+
+checkshape b
+checkshape a
+
+bsection result a b
+
+set nb_info [nbshapes result]
+
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
+regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh
+regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so
+regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full shl
+
+
+
+if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } {
+ puts " OCC951 : SECTION operation was made PROPERLY"
+ puts ""
+} else {
+ puts "Faulty OCC951 : result of SECTION operation is EMPTY compound"
+ puts ""
+}
+set length 39.8616
+set 3dviewer 1
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (new topology)
+## (bopcommon)
+## (bopsection)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bop s1 s2
+bopcommon result
+
+set square 560.908
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (new topology)
+## (bopcommon)
+## (bopsection)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bop s1 s2
+bopsection result
+
+set length 39.8616
+set 3dviewer 1
+
--- /dev/null
+puts "========="
+puts " OCC951 "
+puts "========="
+puts ""
+##################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+##################################################
+## (new topology)
+## (bopcommon)
+## (bopsection)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] b
+restore [locate_data_file OCC951_2.brep] a
+
+checkshape b
+checkshape a
+
+############
+bop a b
+bopcommon result
+############
+set nb_info [nbshapes result]
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
+regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh
+regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so
+regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co
+regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full shl
+
+if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } {
+ puts " OCC951 : COMMON operation was made PROPERLY"
+ puts ""
+} else {
+ puts "Faulty OCC951 : result of COMMON operation is EMPTY compound"
+ puts ""
+}
+
+set square 560.908
+set 3dviewer 0
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (new topology)
+## (bopcommon)
+## (bopsection)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bop s2 s1
+bopcommon result
+
+set square 560.908
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (new topology)
+## (bopcommon)
+## (bopsection)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bop s2 s1
+bopsection result
+
+set length 39.8616
+set 3dviewer 1
+
--- /dev/null
+puts "========="
+puts " OCC951 "
+puts "========="
+puts ""
+##################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+##################################################
+## (new topology)
+## (bopcommon)
+## (bopsection)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] b
+restore [locate_data_file OCC951_2.brep] a
+
+checkshape b
+checkshape a
+
+bop a b
+bopcommon res1
+bopsection result
+
+set nb_info [nbshapes result]
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
+regexp {FACE +: +([-0-9.+eE]+)} $nb_info full fa
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full sh
+regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full so
+regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full cm
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full co
+regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full shl
+
+if { $ve != 0 || $ed != 0 || $wi != 0 || $fa != 0 || $sh != 0 || $so != 0 || $cm != 0 || $co != 0 || $shl != 0 } {
+ puts " OCC951 : COMMON operation was made PROPERLY"
+ puts ""
+} else {
+ puts "Faulty OCC951 : result of COMMON operation is EMPTY compound"
+ puts ""
+}
+
+set length 39.8616
+set 3dviewer 0
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (old topology)
+## (common)
+## (section)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bcommon result s1 s2
+
+set square 560.908
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (old topology)
+## (common)
+## (section)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bsection result s1 s2
+
+set length 39.8616
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (old topology)
+## (common)
+## (section)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bcommon result s2 s1
+
+set square 560.908
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC951"
+puts "============"
+puts ""
+######################################################
+##BRepAlgoAPI_Section and BRepAlgoAPI_Common fail on given shapes
+######################################################
+## (old topology)
+## (common)
+## (section)
+######################################################
+
+restore [locate_data_file OCC951_1.brep] s1
+restore [locate_data_file OCC951_2.brep] s2
+
+checkshape s1
+checkshape s2
+
+bsection result s2 s1
+
+set length 39.8616
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC10603"
+puts "============"
+puts ""
+#######################################################################
+# Fuse of torus fails
+#######################################################################
+
+set BugNumber OCC10603
+
+puts "Create 3 torus ..."
+ptorus a0 100 20
+tcopy a0 a1
+tcopy a0 a2
+trotate a1 0 0 0 1 0 0 90
+trotate a2 0 0 0 0 1 0 90
+
+puts "Prepare first boolean operation ..."
+bop a0 a1
+
+puts "Start first boolean operation ..."
+bopfuse res1
+puts "Finish first boolean operation ..."
+
+puts "Prepare second boolean operation ..."
+bop res1 a2
+
+puts "Start second boolean operation ..."
+bopfuse result
+checkshape result
+puts "Finish second boolean operation ..."
+
+set square 197753
+
+# Analysis of "nbshapes res"
+set nb_v_good 12
+set nb_e_good 36
+set nb_w_good 12
+set nb_f_good 12
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 75
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC10604"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10604
+
+puts "Load first shape ..."
+restore [locate_data_file OCC10604-1.brep] b1
+puts "Load second shape ..."
+restore [locate_data_file OCC10604-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcommon result
+checkshape result
+puts "Finish boolean operation ..."
+
+set square 585.072
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 12
+set nb_w_good 5
+set nb_f_good 5
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 31
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10604"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10604
+
+puts "Load first shape ..."
+restore [locate_data_file OCC10604-1.brep] b1
+puts "Load second shape ..."
+restore [locate_data_file OCC10604-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopfuse result
+checkshape result
+puts "Finish boolean operation ..."
+
+set square 808.713
+
+# Analysis of "nbshapes res"
+set nb_v_good 8
+set nb_e_good 15
+set nb_w_good 8
+set nb_f_good 7
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 41
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC10604"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10604
+
+puts "Load first shape ..."
+restore [locate_data_file OCC10604-1.brep] b1
+puts "Load second shape ..."
+restore [locate_data_file OCC10604-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopcut result
+checkshape result
+puts "Finish boolean operation ..."
+
+set square 893.394
+
+# Analysis of "nbshapes res"
+set nb_v_good 7
+set nb_e_good 15
+set nb_w_good 6
+set nb_f_good 5
+set nb_sh_good 1
+set nb_sol_good 1
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 36
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC10604"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10604
+
+puts "Load first shape ..."
+restore [locate_data_file OCC10604-1.brep] b1
+puts "Load second shape ..."
+restore [locate_data_file OCC10604-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+boptuc result
+checkshape result
+puts "Finish boolean operation ..."
+
+set square 500.39
+
+# Analysis of "nbshapes res"
+set nb_v_good 7
+set nb_e_good 12
+set nb_w_good 7
+set nb_f_good 7
+set nb_sh_good 2
+set nb_sol_good 2
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 38
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC10604"
+puts "============"
+puts ""
+#######################################################################
+# Fuse Fails
+#######################################################################
+
+set BugNumber OCC10604
+
+puts "Load first shape ..."
+restore [locate_data_file OCC10604-1.brep] b1
+puts "Load second shape ..."
+restore [locate_data_file OCC10604-2.brep] b2
+
+puts "Prepare boolean operation ..."
+bop b1 b2
+
+puts "Start boolean operation ..."
+bopsection result b1 b2
+checkshape result
+puts "Finish boolean operation ..."
+
+set length 88.9912
+
+# Analysis of "nbshapes res"
+set nb_v_good 6
+set nb_e_good 6
+set nb_w_good 0
+set nb_f_good 0
+set nb_sh_good 0
+set nb_sol_good 0
+set nb_compsol_good 0
+set nb_compound_good 1
+set nb_shape_good 13
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC1416"
+puts "============"
+puts ""
+######################################################
+# Shading mode doesn't work on a face of the model
+######################################################
+
+restore [locate_data_file OCC1416.brep] result
+
+# Clean mesh
+isos result 0
+tclean result
+
+#Creating mesh
+incmesh result 0.01
+
+#View the result of mesh
+triangles result
+
+##############################################
+if { [catch { set tri_info [trinfo result] } catch_result] } {
+##############################################
+ puts "Faulty OCC1416"
+} else {
+ set ll [ llength ${tri_info} ]
+ if {${ll} < 6} {
+ puts "Faulty OCC1416"
+ } else {
+ regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
+ regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
+ if { $tri == 0 || $nod == 0 } {
+ puts "Faulty OCC1416"
+ } else {
+ puts "Warning: OCC1416 looks like OK, but visual checking is required !!!!"
+ }
+ }
+}
+
+set square 863.938
+set 3dviewer 1
--- /dev/null
+puts "========"
+puts "OCC145"
+puts "========"
+
+pload QAcommands
+
+OCC145 [locate_data_file OCC145.brep] 1
+
+set listmem {}
+set i_max 10000
+OCC145 [locate_data_file OCC145.brep] ${i_max}
+
+lappend listmem [expr [meminfo w] / 1024]
+if { [checktrend $listmem 0 1 "Memory leak detected"] } {
+ puts "No memory leak, $i iterations"
+ break
+}
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC157"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC157.brep] wire
+checkshape wire
+
+set Tolerance 100.
+set info_result [OCC157 result wire ${Tolerance}]
+
+set ll [llength ${info_result}]
+if {${ll} < 2} {
+ puts "length = ${ll}"
+ puts "OCC157: Error"
+} else {
+ if { [regexp {OK} $info_result] } {
+ puts "OCC157: OK"
+ } else {
+ puts "OCC157: Error"
+ }
+}
+set square 2.11095e+06
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty OCC1651"
+
+pload QAcommands
+
+puts "============"
+puts "OCC1651"
+puts "============"
+puts ""
+######################################################
+# No intersection found using BRepClass3d_Intersector3d
+######################################################
+
+restore [locate_data_file OCC1651.brep] face
+
+checkshape face
+
+set PntX 164.6207
+set PntY -105.2869
+set PntZ 557.8805
+set DirX 0.5774
+set DirY -0.5774
+set DirZ 0.5774
+
+if { [catch { set PointList [OCC1651 face ${PntX} ${PntY} ${PntZ} ${DirX} ${DirY} ${DirZ}] } catch_result] } {
+ puts "Faulty OCC1651"
+} else {
+ set ll [ llength ${PointList} ]
+ if {${ll} != 3} {
+ puts "Faulty OCC1651"
+ } else {
+ set IntersectionPointX [lindex ${PointList} 0]
+ set IntersectionPointY [lindex ${PointList} 1]
+ set IntersectionPointZ [lindex ${PointList} 2]
+
+ set good_IntersectionPointX 42.6199
+ set good_IntersectionPointY 16.7139
+ set good_IntersectionPointZ 435.88
+
+ set X_percent [expr abs(${IntersectionPointX} - ${good_IntersectionPointX}) / double(${good_IntersectionPointX}) * 100.]
+ set Y_percent [expr abs(${IntersectionPointY} - ${good_IntersectionPointY}) / double(${good_IntersectionPointY}) * 100.]
+ set Z_percent [expr abs(${IntersectionPointZ} - ${good_IntersectionPointZ}) / double(${good_IntersectionPointZ}) * 100.]
+
+ set percent_max 0.1
+
+ set IsGood 1
+ if {${X_percent} > ${percent_max}} {
+ puts "OCC1651 Faulty"
+ set IsGood 0
+ }
+ if {${Y_percent} > ${percent_max}} {
+ puts "OCC1651 Faulty"
+ set IsGood 0
+ }
+ if {${Z_percent} > ${percent_max}} {
+ puts "OCC1651 Faulty"
+ set IsGood 0
+ }
+ if {${IsGood} == 1} {
+ puts "OCC1651 OK"
+ }
+ }
+}
+
+
--- /dev/null
+
+puts "========"
+puts "OCC203"
+puts "========"
+
+set dx 100
+set dy 100
+set dz 100
+
+box b ${dx} ${dy} ${dz}
+
+renamevar b edge
+explode edge e
+
+renamevar edge face
+explode face f
+
+set radis 5
+set angle 45
+
+chamf result1 face edge_1 face_3 A ${radis} ${angle}
+
+explode result1 e
+
+decho off
+if { [catch {fillet result result1 ${radis} result1_1 ${radis} result1_7 } catch_result] } {
+ set mistake 1
+} else {
+ set mistake 0
+}
+decho on
+
+if { $mistake != 0} {
+ puts "OK OCC203"
+ puts "Filet can not be created"
+} else {
+ puts "Faulty OCC203: function FILLET works wrongly"
+ checkshape result
+}
+
+
--- /dev/null
+puts "TODO OCC11111 ALL: OCC2442 Faulty"
+
+puts "============"
+puts "OCC2442"
+puts "============"
+puts ""
+######################################################
+# Error in BRepClass3d_SolidClassifier
+######################################################
+
+set IsGood 1
+
+restore [locate_data_file OCC2442-1.brep] a
+restore [locate_data_file OCC2442-2.brep] b
+
+distmini dm1 a b
+set dm1_list [dump dm1_val]
+set dm1_length [llength $dm1_list]
+if {$dm1_length < 6} {
+ puts "Faulty OCC2442"
+ set IsGood 0
+}
+
+explode a
+explode b
+distmini dm2 a_1 b_1
+set dm2_list [dump dm2_val]
+set dm2_length [llength $dm2_list]
+if {$dm2_length < 6} {
+ puts "Faulty OCC2442"
+ set IsGood 0
+}
+
+if {$IsGood == 1} {
+ regexp {([-0-9.+eE]+)} $dm1_list full dist1
+ regexp {([-0-9.+eE]+)} $dm2_list full dist2
+
+ set good_dist 18.4816355578064
+ set dist1_percent [expr abs(${dist1} - ${good_dist}) / double(${good_dist}) * 100.]
+
+ set dist2_percent [expr abs(${dist1} - ${dist2}) / double(${dist2}) * 100.]
+
+ set percent_max 0.1
+
+ if {${dist1_percent} > ${percent_max}} {
+ puts "OCC2442 Faulty"
+ set IsGood 0
+ }
+ if {${dist2_percent} > ${percent_max}} {
+ puts "OCC2442 Faulty"
+ set IsGood 0
+ }
+ if {${IsGood} == 1} {
+ puts "OCC2442 OK"
+ }
+}
+
+set boundbox [boundingstr a]
+set x0 [lindex $boundbox 0]
+set y0 [lindex $boundbox 1]
+set z0 [lindex $boundbox 2]
+ttranslate a [expr -1 * $x0] [expr -1 * $y0] [expr -1 * $z0]
+ttranslate b [expr -1 * $x0] [expr -1 * $y0] [expr -1 * $z0]
+
+set 3dviewer 1
--- /dev/null
+pload QAcommands
+
+puts "============"
+puts "OCC2569"
+puts "============"
+puts ""
+######################################################
+# If it is not possible to create the bezier curve,
+# it should throw an exception.
+######################################################
+cpulimit 60
+vinit
+set out [OCC2569 26 result]
+if {[string compare $out "\n Degree = 25\n"] == 0} {
+ puts "OCC2569: OK"
+} else {
+ puts "OCC2569: Faulty"
+}
+
+set 3dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Exception"
+puts "TODO OCC11111 ALL: An exception was caught"
+puts "TODO OCC11111 ALL: TEST INCOMPLETE"
+
+pload QAcommands
+
+puts "============"
+puts "OCC2569"
+puts "============"
+puts ""
+######################################################
+# If it is not possible to create the bezier curve,
+# it should throw an exception.
+######################################################
+cpulimit 60
+vinit
+
+OCC2569 29 result
+
+set 3dviewer 0
--- /dev/null
+
+puts "========"
+puts "OCC262"
+puts "========"
+
+restore [locate_data_file OCC262.brep] a
+# checkshape a
+
+set tolerance 1e-5
+
+build3d a ${tolerance}
+
+fsameparameter a
+
+explode a E
+# Verify only a_1 and a_2 eges becouse a_3 had 3d curve before call of build3d command
+
+set toler1 [maxtolerance a_1]
+regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $toler1 full MaxEdgeTolerance1
+
+if { [ expr $MaxEdgeTolerance1 > $tolerance ] } {
+ puts "OCC262 - FAULTY. Tolerance of a_1 is too big"
+} else {
+ puts "TOLERANCE OF A_1 - OK"
+}
+
+set toler2 [maxtolerance a_2]
+regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $toler2 full MaxEdgeTolerance2
+
+if { [ expr $MaxEdgeTolerance2 > $tolerance ] } {
+ puts "OCC262 - FAULTY. Tolerance of a_1 is too big"
+} else {
+ puts "TOLERANCE OF A_2 - OK"
+}
+
+
+#set tolerancelist [maxtolerance a]
+
+#set list [split ${tolerancelist} "\n\t"]
+#set listLength [llength ${list}]
+#if { ${listLength} < 9 } then {puts "OCC262 - Error : listLength= ${listLength}"}
+
+#set EdgeList [lindex ${list} 5]
+#set MaxEdgeTolerance [lindex [split ${EdgeList}] [expr [llength [split ${EdgeList}] ] - 2] ]
+
+#set delta [expr abs(${MaxEdgeTolerance} - ${tolerance}) / ${tolerance} * 100]
+
+#set maxdelta 1
+
+#if { ${delta} > ${maxdelta} } then {puts "OCC262 - Error : delta = ${delta}"} else {
+# puts "OCC262: OK"
+#}
+
+#puts "MaxEdgeTolerance = ${MaxEdgeTolerance}"
+
+renamevar a result
+
+set square 449.437
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC2755"
+puts "============"
+puts ""
+######################################################
+# Boolean Bug in OCC5.0 with the shape having a ellipse curve
+######################################################
+
+restore [locate_data_file OCC2755.brep] a
+
+checkshape a
+
+explode a f
+mksurface gs a_1
+set list [proj gs 0 10 50]
+set ll 4
+
+set good_Parameter1List [list 0 0 0 0]
+set good_Parameter2List [list 40.4616826479819 211.944716681974 64.3186164305428 81.0582330575794]
+set good_OriginXList [list 0 0 0 0]
+set good_OriginYList [list 10 10 10 10]
+set good_OriginZList [list 50 50 50 50]
+set good_AxisXList [list -0.0300865818651084 -0.941236271764613 0.534306660761684 0.998573938898137]
+set good_AxisYList [list 0.999547296325529 -0.337748842654791 -0.845290714645381 0.0533862206328518]
+set good_AxisZList [list 0 0 0 0]
+
+proc CalculatePercent {value good_value} {
+ if {${good_value} == 0. && ${value} == 0.} {
+ set percent 0.
+ } else {
+ set percent [expr abs(${value} - ${good_value}) / double(${good_value}) * 100.]
+ }
+ return ${percent}
+}
+
+if {[llength ${list}] != ${ll}} {
+ puts "Faulty OCC2755"
+} else {
+ set percent_max 0.1
+ set IsGood 1
+ for {set i 0} {$i < ${ll}} {incr i} {
+ set dump_list [dump [lindex ${list} $i]]
+ regexp { *Parameters *: *([-0-9.+eE]+) *([-0-9.+eE]+)} $dump_list full Parameter1 Parameter2
+ regexp { *Origin *:([-0-9.+eE]+), *([-0-9.+eE]+), *([-0-9.+eE]+)} $dump_list full OriginX OriginY OriginZ
+ regexp { *Axis *:([-0-9.+eE]+), *([-0-9.+eE]+), *([-0-9.+eE]+)} $dump_list full AxisX AxisY AxisZ
+
+ set good_Parameter1 [lindex ${good_Parameter1List} $i]
+ set good_Parameter2 [lindex ${good_Parameter2List} $i]
+ set good_OriginX [lindex ${good_OriginXList} $i]
+ set good_OriginY [lindex ${good_OriginYList} $i]
+ set good_OriginZ [lindex ${good_OriginZList} $i]
+ set good_AxisX [lindex ${good_AxisXList} $i]
+ set good_AxisY [lindex ${good_AxisYList} $i]
+ set good_AxisZ [lindex ${good_AxisZList} $i]
+
+ set Parameter1_percent [CalculatePercent ${Parameter1} ${good_Parameter1}]
+ set Parameter2_percent [CalculatePercent ${Parameter2} ${good_Parameter2}]
+ set OriginX_percent [CalculatePercent ${OriginX} ${good_OriginX}]
+ set OriginY_percent [CalculatePercent ${OriginY} ${good_OriginY}]
+ set OriginZ_percent [CalculatePercent ${OriginZ} ${good_OriginZ}]
+ set AxisX_percent [CalculatePercent ${AxisX} ${good_AxisX}]
+ set AxisY_percent [CalculatePercent ${AxisY} ${good_AxisY}]
+ set AxisZ_percent [CalculatePercent ${AxisZ} ${good_AxisZ}]
+
+ puts "good_Parameter1 = ${good_Parameter1}"
+ puts "Parameter1 = ${Parameter1}"
+ puts "Parameter1_percent = ${Parameter1_percent}\n"
+
+ puts "good_Parameter2 = ${good_Parameter2}"
+ puts "Parameter2 = ${Parameter2}"
+ puts "Parameter2_percent = ${Parameter2_percent}\n"
+
+ puts "good_OriginX = ${good_OriginX}"
+ puts "OriginX = ${OriginX}"
+ puts "OriginX_percent = ${OriginX_percent}\n"
+
+ puts "good_OriginY = ${good_OriginY}"
+ puts "OriginY = ${OriginY}"
+ puts "OriginY_percent = ${OriginY_percent}\n"
+
+ puts "good_OriginZ = ${good_OriginZ}"
+ puts "OriginZ = ${OriginZ}"
+ puts "OriginZ_percent = ${OriginZ_percent}\n"
+
+ puts "good_AxisX = ${good_AxisX}"
+ puts "AxisX = ${AxisX}"
+ puts "AxisX_percent = ${AxisX_percent}\n"
+
+ puts "good_AxisY = ${good_AxisY}"
+ puts "AxisY = ${AxisY}"
+ puts "AxisY_percent = ${AxisY_percent}\n"
+
+ puts "good_AxisZ = ${good_AxisZ}"
+ puts "AxisZ = ${AxisZ}"
+ puts "AxisZ_percent = ${AxisZ_percent}\n"
+
+ if {${Parameter1_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${Parameter2_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${OriginX_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${OriginY_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${OriginZ_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${AxisX_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${AxisY_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+ if {${AxisZ_percent} > ${percent_max}} {
+ puts "OCC2755 Faulty (case 3 / $i)"
+ set IsGood 0
+ }
+
+ }
+
+ if {${IsGood} == 1} {
+ puts "OCC2755 OK"
+ }
+
+}
+
+set 3dviewer 0
+
--- /dev/null
+puts "========"
+puts "OCC277"
+puts "========"
+puts ""
+
+pload QAcommands
+
+OCC277
+
+set listmem {}
+set i_max 10
+for {set i 1} {${i} <= ${i_max}} {incr i} {
+ OCC277
+
+ lappend listmem [expr [meminfo w] / 1024]
+ if { [checktrend $listmem 0 1 "Memory leak detected"] } {
+ puts "No memory leak, $i iterations"
+ break
+ }
+}
--- /dev/null
+puts "============"
+puts "OCC2784"
+puts "============"
+puts ""
+######################################################
+# Common and cut operations for two faces gives invalid result
+######################################################
+# Common and cut operations for two faces gives invalid result if one of the faces
+# has a hole and other face lay in this hole (fill this hole).
+######################################################
+## (new topology)
+## (bcut)
+## (bcommon)
+######################################################
+
+############# data #############
+box b1 10 20 10
+box b2 1 1 1
+ttranslate b2 5 5 0
+explode b1 f
+explode b2 f
+
+bcut rcut1 b1_5 b2_5
+checkshape rcut1
+
+bcommon result rcut1 b2_5
+
+regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
+
+if { $m != 0 } {
+ puts "Error : square is not right"
+}
+
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC2784"
+puts "============"
+puts ""
+######################################################
+# Common and cut operations for two faces gives invalid result
+######################################################
+# Common and cut operations for two faces gives invalid result if one of the faces
+# has a hole and other face lay in this hole (fill this hole).
+######################################################
+## (old topology)
+## (cut)
+## (common)
+######################################################
+
+############# data #############
+box b1 10 20 10
+box b2 1 1 1
+ttranslate b2 5 5 0
+explode b1 f
+explode b2 f
+
+bcut rcut1 b1_5 b2_5
+checkshape rcut1
+
+bcommon result rcut1 b2_5
+
+regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
+
+if { $m != 0 } {
+ puts "Error : square is not right"
+}
+
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: OCC299: Error 2"
+
+pload QAcommands
+
+puts "================"
+puts "OCC299"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC298.brep] pr
+checkshape pr
+
+point p 0.86427836 -1 -1
+
+set info_result [OCC299 pr p]
+set ll [llength ${info_result}]
+if { ${ll} < 4 } {
+ puts "OCC299: Error 1"
+} else {
+ if { [regexp {IN} $info_result] } {
+ puts "OCC299: OK"
+ } else {
+ puts "OCC299: Error 2"
+ }
+}
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC353"
+puts "================"
+puts ""
+##########################################################
+## Attached DRAW command "TATA_const" hangs in Geom2dGcc_Circ2d3Tan.
+##########################################################
+
+if [catch { OCC353 }] {
+ puts "OCC353: Error"
+} else {
+ puts "OCC353: OK"
+}
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC367"
+puts "BUC61013"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC105.brep] result
+checkshape result
+
+set step 0.5
+set goodX -307.47165394
+set goodY -340.18073533
+set goodZ 0
+set percent_tolerance 0.01
+
+OCC367 result ${step} ${goodX} ${goodY} ${goodZ} ${percent_tolerance}
+
+set length 1760.13
+set 2dviewer 0
+
+
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bfuse result b1 b2} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 71185
+set 3dviewer 1
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (bfuse)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bfuse result b2 b1} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 71185
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (bcommon)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bcommon result b2 b1} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 0.
+set 3dviewer 1
\ No newline at end of file
--- /dev/null
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (bcut)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bcut result b1 b2} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 71185
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (bcut)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+if { [catch {bcut result b2 b1} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 71185
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "TODO OCC11111 ALL: Error : The square of result shape is"
+
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (boptuc)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+bop b1 b2
+if { [catch {boptuc result} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 71185
+set 3dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC3721"
+puts "============"
+puts ""
+######################################################
+# When using Boolean Operations exception is raised for some tolerance vals.
+######################################################
+## (new topology)
+## (boptuc)
+######################################################
+
+restore [locate_data_file OCC3721-1.brep] b1
+restore [locate_data_file OCC3721-2.brep] b2
+
+checkshape b1
+checkshape b2
+
+bop b2 b1
+if { [catch {boptuc result} catch_result] } {
+ puts "Faulty OCC3721"
+}
+
+checkshape result
+
+set square 71185
+set 3dviewer 1
+
--- /dev/null
+puts "TODO OCC11111 ALL: Error : OCC377"
+
+pload QAcommands
+
+puts "========"
+puts "OCC377"
+puts "BUC61056"
+puts "========"
+puts ""
+###################################################################
+##Incorrect behaviour of BRepTopAdapter_FClass2d. It cannot work with parametric representation
+## of the first wire on the face. It says that point (1.9812, -0.9557948) is outside the contour for
+## forward wire and inside for reversed one if tolerance is equal to 6.45
+###################################################################
+
+set result_info [ OCC377 [locate_data_file OCC377.brep] 1.9812 -0.9557948 6.45 ]
+if { [ regexp {FAULTY} $result_info ]} {
+ puts "Error : OCC377"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty OCC3896"
+
+puts "============"
+puts "OCC3896"
+puts "============"
+puts ""
+######################################################
+# BRepCheck_Analyzer does not detect faulty faces in solid shape.
+######################################################
+
+#
+# a_13 face is FORVARD (faulty), but checkshape command does not detect it
+#
+
+set BugNumber OCC3896
+
+restore [locate_data_file OCC3896-pipe.brep] a
+
+explode a f
+compound a_1 a_13 result
+
+explode a_1 e
+explode a_13 e
+
+smallview
+donly result
+fit
+r
+
+normals result 200
+
+puts "Normal of a_13 face is red (FORWARD)"
+
+for {set i 1} {$i <= 14} {incr i} {
+ whatis a_$i
+}
+
+decho off
+set info_result [checkshape result]
+decho on
+
+if {[regexp {Faulty} $info_result] } {
+ puts "OK ${BugNumber} : checkshape detect faulty faces in solid shape"
+} else {
+ puts "Faulty ${BugNumber} : checkshape does not detect faulty faces in solid shape"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC4426"
+puts "================"
+puts ""
+#######################################################################################
+# Incorrect result of intersection in 2D between circle and line
+#######################################################################################
+
+v2d2
+circle c1 2 2 1
+2dfit
+2dzoom 120
+line l1 3 0 0 1
+2dintersect l1 c1
+erase l1 c1
+2dfit
+
+puts "ATTENTION! Check following:"
+puts "There is only one intersection point (green X)"
+
+set 2dviewer 1
+
--- /dev/null
+puts "================"
+puts "OCC4426"
+puts "================"
+puts ""
+#######################################################################################
+# Incorrect result of intersection in 2D between circle and line
+#######################################################################################
+
+v2d2
+line ll1 0 0 0.3 0.7
+line ll2 0 0 0.37 0.63
+trim tll1 ll1 -0.00001 0.00001
+trim tll2 ll2 -0.00001 0.00001
+donly tll1 tll2
+2dintersect tll1 tll2
+2dfit
+
+puts "ATTENTION! Check following:"
+puts "There is the intersection point (green X) on center of grid axis"
+
+set 2dviewer 1
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC454"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC454_b1.brep] b1
+checkshape b1
+
+restore [locate_data_file OCC454_p1.draw] p1
+
+set info_result [OCC299 b1 p1]
+set ll [llength ${info_result}]
+if { ${ll} < 4 } {
+ puts "OCC454: ERROR 1"
+} else {
+ if { [regexp {IN} ${info_result}] } {
+ puts "OCC454: OK"
+ } else {
+ puts "OCC454: ERROR 2"
+ }
+}
+
+
--- /dev/null
+pload QAcommands
+
+puts "========"
+puts "OCC524"
+puts "========"
+puts ""
+
+
+set LowerVector 1
+set UpperVector 9
+set InitialValueVector 5
+set LowerRowMatrix 1
+set UpperRowMatrix 6
+set LowerColMatrix 1
+set UpperColMatrix 3
+set InitialValueMatrix 4
+
+set info_result [OCC524 ${LowerVector} ${UpperVector} ${InitialValueVector} ${LowerRowMatrix} ${UpperRowMatrix} ${LowerColMatrix} ${UpperColMatrix} ${InitialValueMatrix}]
+
+set ll [llength ${info_result}]
+
+if {${ll} != 64} {
+ puts "OCC524: Error"
+} else {
+ regexp {math_Vector of Length = ([-0-9.+eE]+)} ${info_result} full Vector1Length
+ if {${Vector1Length} != [expr ${UpperVector} - ${LowerVector} + 1]} {
+ puts "Vector1Length=${Vector1Length}"
+ puts "OCC524: Error"
+ } else {
+ regexp {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector1_1
+ regexp {math_Vector\(2\) = ([-0-9.+eE]+)} ${info_result} full Vector1_2
+ regexp {math_Vector\(3\) = ([-0-9.+eE]+)} ${info_result} full Vector1_3
+ regexp {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector1_4
+ regexp {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector1_5
+ regexp {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector1_6
+ regexp {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector1_7
+ regexp {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector1_8
+ regexp {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector1_9
+
+ if {${Vector1_1}!=120. || ${Vector1_2}!=120. || ${Vector1_3}!=120. || ${Vector1_4}!=0. || ${Vector1_5}!=0. || ${Vector1_6}!=0. || ${Vector1_7}!=0. || ${Vector1_8}!= 0.|| ${Vector1_9}!=0.} {
+ puts "Error : OCC524"
+ } else {
+ regexp -all {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector2_1
+ regexp -all {math_Vector\(2\) = ([-0-9.+eE]+)} ${info_result} full Vector2_2
+ regexp -all {math_Vector\(3\) = ([-0-9.+eE]+)} ${info_result} full Vector2_3
+ regexp -all {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector2_4
+ regexp -all {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector2_5
+ regexp -all {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector2_6
+ regexp -all {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector2_7
+ regexp -all {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector2_8
+ regexp -all {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector2_9
+ if {${Vector2_1}!=60. || ${Vector2_2}!=60. || ${Vector2_3}!=60. || ${Vector2_4}!=60. || ${Vector2_5}!=60. || ${Vector2_6}!=60. || ${Vector2_7}!=0. || ${Vector2_8}!= 0.|| ${Vector2_9}!=0.} {
+ puts "OCC524: Error"
+ } else {
+ puts "OCC524: OK"
+ }
+ }
+ }
+}
+
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_1
+checkshape S_2
+
+if [catch {bfuse result S_1 S_2}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.5068e+06
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_1
+checkshape S_3
+
+if [catch {bfuse result S_1 S_3}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.56034e+06
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_1
+checkshape S_4
+
+if [catch {bfuse result S_1 S_4}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.5405e+06
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_1
+checkshape S_5
+
+if [catch {bfuse result S_1 S_5}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.45349e+06
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_2
+checkshape S_1
+
+if [catch {bfuse result S_2 S_1}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.5068e+06
+set 2dviewer 0
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_3
+checkshape S_1
+
+if [catch {bfuse result S_3 S_1}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.56034e+06
+set 2dviewer 0
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_4
+checkshape S_1
+
+if [catch {bfuse result S_4 S_1}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.5405e+06
+set 2dviewer 0
--- /dev/null
+
+puts "========"
+puts "OCC536"
+puts "SAM1504"
+puts "========"
+
+vinit
+
+restore [locate_data_file OCC536.brep] S
+checkshape S
+
+explode S So
+checkshape S_5
+checkshape S_1
+
+if [catch {bfuse result S_5 S_1}] {
+ puts "Faulty OCC536"
+} else {
+ puts "OCC536 : OK"
+ checkshape result
+}
+
+set square 2.45349e+06
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty OCC132"
+
+puts "================"
+puts "OCC538"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC538.brep] Face
+checkshape Face
+
+point p 0.2453959532714904 -1.246869357124329
+
+set res1 [b2dclassify Face p]
+set info_result [split ${res1}]
+
+set ll [llength ${info_result}]
+if {${ll} < 4} {
+ puts "Faulty OCC132"
+} else {
+ if {[regexp {IN} $info_result]} {
+ puts "OCC132 : OK"
+ } else {
+ puts "Faulty OCC132"
+ }
+}
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC5696"
+puts "================"
+puts ""
+#######################################################################################
+# Exception in BRepAdaptor_CompCurve due to uninitialised variable CurIndex
+#######################################################################################
+
+set BugNumber OCC5696
+
+set info_result [OCC5696]
+set index [string compare ${info_result} "par_edge = 1\n"]
+if {$index != 0} {
+ puts "Faulty ${BugNumber}"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+
--- /dev/null
+puts "TODO OCC11111 ALL: Faulty OCC5698"
+
+pload QAcommands
+
+puts "============"
+puts "OCC5698"
+puts "============"
+puts ""
+######################################################
+# Incorrect result of intersection of a plane and an extrusion surface
+######################################################
+
+set BugNumber OCC5698
+
+restore [locate_data_file OCC5698.brep] s1
+
+set info_result [OCC5698 s1]
+
+set index [string compare ${info_result} "OK\n"]
+if {$index != 0} {
+ puts "Faulty ${BugNumber}"
+} else {
+ puts "OK ${BugNumber}"
+}
+
--- /dev/null
+puts "============"
+puts "OCC6278"
+puts "============"
+puts ""
+######################################################
+# Fuse operation produces incorrect result
+######################################################
+
+set BugNumber OCC6278
+
+restore [locate_data_file OCC6278-A.brep] a
+restore [locate_data_file OCC6278-B.brep] b
+
+bfuse result a b
+explode result v
+
+set nb_v_good 4
+
+set DumpList [dump result_2]
+if {[llength ${DumpList}] < 40} {
+ puts "Faulty ${BugNumber}: bad format of dump"
+} else {
+ regexp { *- *Point *3D *: *([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} ${DumpList} full x y z
+ puts $x
+ puts $y
+ puts $z
+
+ set percent_max 0.1
+
+ set x [lindex ${DumpList} 37]
+ set y [lindex ${DumpList} 38]
+ set z [lindex ${DumpList} 39]
+
+ set x [string range ${x} 0 end-1]
+ set y [string range ${y} 0 end-1]
+
+ set good_x -32.3042674857046
+ set good_y 20.0000000000001
+ set good_z 0.
+
+ set Percent_x [expr abs(${x} - ${good_x}) / abs(${good_x}) * 100.]
+ set Percent_y [expr abs(${y} - ${good_y}) / abs(${good_y}) * 100.]
+ if {${z} == 0.} {
+ set Percent_z 0.
+ } else {
+ set Percent_z [expr abs(${good_z} - ${z}) / abs(${z}) * 100.]
+ }
+
+ if {${Percent_x} > ${percent_max}} {
+ puts "Faulty ${BugNumber}: bad value of x = ${x}"
+ }
+ if {${Percent_y} > ${percent_max}} {
+ puts "Faulty ${BugNumber}: bad value of y = ${y}"
+ }
+ if {${Percent_z} > ${percent_max}} {
+ puts "Faulty ${BugNumber}: bad value of z = ${z}"
+ }
+}
+
+set length 278.725
+set 3dviewer 2
--- /dev/null
+puts "========"
+puts "OCC6412"
+puts "========"
+puts ""
+####################################################
+## Regression in visualization
+####################################################
+
+set BugNumber OCC6412
+
+restore [locate_data_file OCC6412.brep] result
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+
+isos result 0
+triangles result
+
+set tri 0
+set nod 0
+set tri_info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
+regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
+if { ${tri} == 0 && ${nod} == 0 } {
+ puts "Faulty ${BugNumber}"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set 3dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6450"
+puts "============"
+puts ""
+######################################################
+# Cannot get common part of two parallel halfspaces
+######################################################
+
+set BugNumber OCC6450
+
+plane pl 100 0 0 1 0 0
+mkface f pl
+halfspace so1 f 0 0 0
+ttranslate f -200 0 0
+halfspace so2 f 0 0 0
+bcommon result so1 so2
+if {[dtyp result] == ""} {
+ puts "Faulty ${BugNumber}: operation failed"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6450"
+puts "============"
+puts ""
+######################################################
+# Cannot get common part of two parallel halfspaces
+######################################################
+
+set BugNumber OCC6450
+
+plane pl 100 0 0 1 0 0
+mkface f pl
+halfspace so1 f 0 0 0
+ttranslate f -200 0 0
+trotate f 0 0 0 0 0 1 45
+halfspace so2 f 0 0 0
+bcommon result so1 so2
+if {[dtyp result] == ""} {
+ puts "Faulty ${BugNumber}: operation failed"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6474"
+puts "============"
+puts ""
+######################################################
+# Incorrect result of intersection of a plane and an extrusion surface
+######################################################
+
+set BugNumber OCC6474
+
+restore [locate_data_file OCC6474-s1.draw] s1
+restore [locate_data_file OCC6474-s2.draw] s2
+
+intersect result s1 s2
+
+if {[llength [directory res*]] != 1} {
+ puts "Faulty ${BugNumber}: more than 1 intersection line is got"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set 3dviewer 1
--- /dev/null
+puts "================"
+puts "OCC6503"
+puts "================"
+puts ""
+#######################################################################################
+# Incorrect calculation of bounding box for infinite surfaces
+#######################################################################################
+
+set BugNumber OCC6503
+
+proc GetPercent {Value GoodValue} {
+ set Percent 0.
+ if {${GoodValue} != 0.} {
+ set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
+ } elseif {${Value} != 0.} {
+ set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
+ } else {
+ set Percent 0.
+ }
+ return ${Percent}
+}
+
+plane pl 0 0 0 0 0 1
+mkface f pl
+set info_result [bounding f]
+
+set x1 [lindex ${info_result} 0]
+set y1 [lindex ${info_result} 1]
+set z1 [lindex ${info_result} 2]
+set x2 [lindex ${info_result} 3]
+set y2 [lindex ${info_result} 4]
+set z2 [lindex ${info_result} 5]
+
+set good_x1 -1e+100
+set good_y1 -1e+100
+set good_z1 -9.9999999999999995e-08
+set good_x2 1e+100
+set good_y2 1e+100
+set good_z2 9.9999999999999995e-08
+
+set percent_max 0.1
+set status 0
+
+set x1_percent [GetPercent ${x1} ${good_x1}]
+set y1_percent [GetPercent ${y1} ${good_y1}]
+set z1_percent [GetPercent ${z1} ${good_z1}]
+set x2_percent [GetPercent ${x2} ${good_x2}]
+set y2_percent [GetPercent ${y2} ${good_y2}]
+set z2_percent [GetPercent ${z2} ${good_z2}]
+
+if {${x1_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : x1 is wrong"
+ set status 1
+}
+if {${y1_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : y1 is wrong"
+ set status 1
+}
+if {${z1_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : z1 is wrong"
+ set status 1
+}
+if {${x2_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : x2 is wrong"
+ set status 1
+}
+if {${y2_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : y2 is wrong"
+ set status 1
+}
+if {${z2_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : z2 is wrong"
+ set status 1
+}
+
+if { ${status} == 0 } {
+ puts "${BugNumber}: OK"
+} else {
+ puts "${BugNumber}: Faulty"
+}
+
+set 3dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# self-intersection test
+restore [locate_data_file OCC497a.brep] a_1
+restore [locate_data_file OCC497b.brep] a_2
+
+decho off
+set resstr [bopargcheck a_2]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# self-intersection test
+restore [locate_data_file OCC497e.brep] a_1
+restore [locate_data_file OCC497f.brep] a_2
+
+decho off
+set resstr [bopargcheck a_2]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC111111 ALL: Faulty OCC6862"
+
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# test small edges
+restore [locate_data_file OCC651a.brep] a
+restore [locate_data_file OCC651b.brep] b
+
+puts "Checking shapes: bopargcheck a b /FTVEIP ..."
+decho off
+set resstr [bopargcheck a b /FTVEIP]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC111111 ALL: Faulty OCC6862"
+
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# test small edges
+restore [locate_data_file OCC651a.brep] a
+
+decho off
+puts "Checking shapes: bopargcheck a b /FTVEIP ..."
+set resstr [bopargcheck a /FTVEIP]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# test types
+box b1 10 20 10
+box b2 20 10 10
+explode b2 f
+
+decho off
+set resstr [bopargcheck b1 b2_1 -C /RFTVEI]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+puts "TODO OCC111111 ALL: Faulty OCC6862"
+
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# test small edges
+restore [locate_data_file OCC726.brep] a
+explode a
+
+decho off
+set resstr [bopargcheck a_1 a_2 -O /FTVEI]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# face verification
+box b1 10 20 10
+box b2 20 10 10
+explode b1 f
+explode b2 f
+bcut r1 b1_6 b2_6
+bcommon r2 b1_6 b2_6
+explode r1 w
+explode r2 w
+mksurface gs b1_6
+mkface ff gs
+add r1_1 ff
+add r2_1 ff
+
+decho off
+set resstr [bopargcheck ff b2_6 -F /RTVEIP]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# test possibility to merge vertices
+box b1 10 20 10
+box b2 20 10 10
+explode b1 e
+explode b2 e
+tcopy b2_10 ee2
+compound b2_10 ee2 comp
+donl b1_10 comp
+
+decho off
+set resstr [bopargcheck b1_10 comp -O /RFTEIP]
+decho on
+
+if {$resstr=="Faulties, that can not be treated by BOP, are detected.\n"} {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC6862"
+puts "============"
+puts ""
+#######################################################################
+# Tool for checking arguments of Boolean Operations
+#######################################################################
+
+set BugNumber OCC6862
+
+# test possibility to merge edges
+box b1 10 20 10
+box b2 20 10 10
+explode b1 e
+explode b2 e
+tcopy b2_10 ee2
+wire ww b2_10 ee2
+donl b1_10 ww
+
+decho off
+set resstr [bopargcheck b1_10 ww -O /RFTVIP]
+decho on
+
+if { $resstr=="Faulties, that can not be treated by BOP, are detected.\n" } {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC7372"
+puts "================"
+puts ""
+#######################################################################################
+# Invalid conversion 2D periodic BSpline curve to Bezier segments
+#######################################################################################
+
+set BugNumber OCC7372
+
+OCC7372
+
+set mistake 0
+set len [llength [directory segment*]]
+if { ${len} != 5 } {
+ puts "Faulty ${BugNumber} : segment number is wrong"
+ set mistake 1
+} else {
+ set good_length 73.3203
+ regexp {The length .* is ([-0-9.+eE]+)} [length segment_5] full current_length
+ if { [expr 1.*abs($good_length - $current_length)/$good_length * 100] > 0.1 } {
+ puts "Faulty ${BugNumber} : length is wrong for segment_5"
+ set mistake 1
+ }
+ renamevar segment_5 result
+}
+
+if { ${mistake} != 0 } {
+ puts "Faulty ${BugNumber}"
+} else {
+ puts "OK ${BugNumber}"
+}
+
+set 2dviewer 0
+
--- /dev/null
+pload QAcommands
+
+puts "============"
+puts "OCC8169"
+puts "============"
+puts ""
+#######################################################################
+# Wrong Geom2dAPI_InterCurveCurve segment
+#######################################################################
+
+set BugNumber OCC6768
+
+restore [locate_data_file OCC8169_1.brep] e1
+restore [locate_data_file OCC8169_2.brep] e2
+
+plane p 0 0 500 0 0 1 1 0 0
+dump p
+mkface result p
+
+if { [regexp {Faulty} [OCC8169 e1 e2 result]] == 0 } {
+ puts "OK ${BugNumber}"
+} else {
+ puts "Faulty ${BugNumber}"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Error on Record"
+puts "TODO OCC12345 ALL: OCC2368: Error during reading attached IGES file"
+
+puts "============"
+puts "OCC2368"
+puts "============"
+puts ""
+######################################################
+# Exeption is raised in the application during reading attached IGES file.
+######################################################
+
+set list [stepread [locate_data_file OCC2368.stp] a *]
+if {[lsearch ${list} Error] > -1} {
+ puts "OCC2368: Error during reading attached IGES file"
+} else {
+ puts "OCC2368: OK"
+}
+
--- /dev/null
+puts "============"
+puts "OCC5099"
+puts "============"
+puts ""
+######################################################
+# After translation attached file obtained shape is invalid.
+######################################################
+
+stepread [locate_data_file OCC5099.stp] a *
+tpcompound result
+
+checkshape result
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5215"
+puts "============"
+puts ""
+######################################################
+# Problem with splitting face
+######################################################
+
+stepread [locate_data_file trj4_k1_geo-md-203.stp] a *
+tpcompound result
+
+checkshape result
+
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "OCC5708"
+puts "OCC6284"
+puts "============"
+puts ""
+######################################################
+# New feature for fixing position vertices made during project COLORVIZ
+# Following after bug OCC5708. Exception during reading on the file attached to the bug OCC5708
+######################################################
+
+cpulimit 3000
+
+set BugNumber OCC5708
+
+#set env(CSF_STEPDefaults) ${filedir}/OCC5708_STEPDefaults/.
+
+stepread [locate_data_file OCC5708.step] a *
+tpcompound result
+
+set 3dviewer 1
+
--- /dev/null
+puts "================"
+puts "OCC10"
+puts "================"
+puts ""
+
+vinit
+box b 10 10 10
+explode b f
+vdisplay b_1
+vfit
+
+set ll 5
+
+OCC10 trihedron1 b_1 ${ll}
+
+set only_screen 1
--- /dev/null
+puts "================"
+puts "OCC113"
+puts "BUC60978"
+puts "================"
+puts ""
+
+# Data
+set X_01 29
+set Y_01 170
+
+set X_02 204
+set Y_02 300
+
+set scale 60.6309
+set center_X 7.07107
+set center_Y 4.08248
+set proj_X 0.479541
+set proj_Y 0.586729
+set proj_Z 0.652525
+set up_X -0.838029
+set up_Y 0.0856396
+set up_Z 0.538863
+set at_X 8.87741
+set at_Y -2.73728
+set at_Z 4.68363
+
+# Display two face
+vinit
+box b 10 10 10
+explode b f
+vdisplay b_1
+vdisplay b_2
+vfit
+
+QAUpdateLights
+
+# Check face color
+checkcolor ${X_01} ${Y_01} 0 1 0
+checkcolor ${X_02} ${Y_02} 0 1 0
+
+# Select faces
+QAAddOrRemoveSelected b_1
+QAAddOrRemoveSelected b_2
+
+# Check face color
+QAUpdateLights
+checkcolor ${X_01} ${Y_01} 0.8 0.8 0.8
+
+QAUpdateLights
+checkcolor ${X_02} ${Y_02} 0.8 0.8 0.8
+
+# Hilight face
+QAMoveTo ${X_01} ${Y_01}
+QAMoveTo ${X_01} ${Y_01}
+
+# Check face color
+QAUpdateLights
+QASelect 10 10
+QAMoveTo ${X_01} ${Y_01}
+checkcolor ${X_01} ${Y_01} 0 1 1
+
+QAUpdateLights
+QAMoveTo ${X_02} ${Y_02}
+checkcolor ${X_02} ${Y_02} 0 1 1
+
+# Rotation
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+set only_screen 1
--- /dev/null
+puts "================"
+puts "OCC1174"
+puts "================"
+puts ""
+########################################################################################
+# puts "Impossible to set different properties for different sides of a (sur)face"
+########################################################################################
+
+set x 200
+set y 200
+
+set Black_R 0
+set Black_G 0
+set Black_B 0
+
+restore [locate_data_file OCC1174.brep] a
+vinit
+OCC1174_1 a
+vdisplay a
+vfit
+
+set scale 2.50501
+set center_X 191.285
+set center_Y 76.6556
+set proj_X 0.672033
+set proj_Y -0.721033
+set proj_Z 0.168771
+set up_X -0.131494
+set up_Y 0.108095
+set up_Z 0.985406
+set at_X -27.258
+set at_Y 30.2321
+set at_Z -9.0201
+
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+set x_GREEN 300
+set y_GREEN 180
+
+set x_BLUE 180
+set y_BLUE 250
+
+QAUpdateLights
+
+set ColorList1 [QAGetPixelColor ${x_GREEN} ${y_GREEN}]
+regexp {RED +: +([-0-9.+eE]+)} $ColorList1 full RED_1
+regexp {GREEN +: +([-0-9.+eE]+)} $ColorList1 full GREEN_1
+regexp {BLUE +: +([-0-9.+eE]+)} $ColorList1 full BLUE_1
+
+set ColorList2 [QAGetPixelColor ${x_BLUE} ${y_BLUE}]
+regexp {RED +: +([-0-9.+eE]+)} $ColorList2 full RED_2
+regexp {GREEN +: +([-0-9.+eE]+)} $ColorList2 full GREEN_2
+regexp {BLUE +: +([-0-9.+eE]+)} $ColorList2 full BLUE_2
+
+if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} {
+ set IsGreen 1
+} else {
+ set IsGreen 0
+}
+
+if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} {
+ set IsBlue 1
+} else {
+ set IsBlue 0
+}
+
+if {${IsGreen} == 1 && ${IsBlue} == 1} {
+ puts "OCC1174: OK"
+} else {
+ puts "OCC1174: Error"
+}
+
+set only_screen 1
+
--- /dev/null
+puts "================"
+puts "OCC1188"
+puts "Impossible to set background image for V3d_View"
+puts "================"
+puts ""
+
+set x 200
+set y 200
+
+vinit
+
+OCC1188 [locate_data_file OCC1188.gif]
+
+QAUpdateLights
+checkcolor $x $y 0.99 0.99 0.99
+if { ${stat} != 1} {
+ puts "OCC1188: Error"
+}
+
+set only_screen 1
--- /dev/null
+if { [array get env os_type] != "" } {
+ set os $env(os_type)
+}
+if { [string compare $os "windows"] != 0 } {
+ puts "TODO OCC12345 ALL: An exception was caught"
+ puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
+ puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+}
+
+puts "================"
+puts "OCC137"
+puts "================"
+#
+# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0
+#
+puts "IT IS NECESSARY TO CHECK SELECTED FACE SHADING"
+puts ""
+
+pload XDE
+
+igesbrep [locate_data_file OCC137-ANC101-Solid.igs] a *
+tpcompound a
+vinit
+vdisplay a
+vfit
+vsetdispmode 1
+
+QASetChoiceMode FACE ON
+set x 170
+set y 80
+QASelect $x $y
+QASelect $x $y
+
+set only_screen 1
--- /dev/null
+if { [array get env os_type] != "" } {
+ set os $env(os_type)
+}
+if { [string compare $os "windows"] != 0 } {
+ puts "TODO OCC12345 ALL: An exception was caught"
+ puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
+ puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+}
+
+puts "================"
+puts "OCC137"
+puts "================"
+#
+# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0
+#
+puts "IT IS NECESSARY TO CHECK SELECTED FACE SHADING"
+puts ""
+
+pload XDE
+
+stepread [locate_data_file OCC137-ANC101-Solid.stp] a *
+tpcompound a
+vinit
+vdisplay a
+vfit
+vsetdispmode 1
+
+QASetChoiceMode FACE ON
+set x 170
+set y 80
+QASelect $x $y
+QASelect $x $y
+
+set only_screen 1
--- /dev/null
+puts "================"
+puts "OCC137"
+puts "================"
+#
+# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0
+#
+puts "IT IS NECESSARY TO CHECK SHAPE SHADING"
+puts ""
+
+restore [locate_data_file OCC137-ANC101-Solid.brep] a
+vinit
+vdisplay a
+vfit
+vsetdispmode 1
+
+set only_screen 1
--- /dev/null
+#INTERFACE IGES
+puts "================"
+puts "OCC137"
+puts "================"
+#
+# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0
+#
+puts "IT IS NECESSARY TO CHECK SHAPE SHADING"
+puts ""
+
+pload XDE
+
+igesbrep [locate_data_file OCC137-ANC101-Solid.igs] a *
+tpcompound a
+vinit
+vdisplay a
+vfit
+vsetdispmode 1
+
+set only_screen 1
--- /dev/null
+puts "================"
+puts "OCC137"
+puts "================"
+#
+# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0
+#
+puts "IT IS NECESSARY TO CHECK SHAPE SHADING"
+puts ""
+
+pload XDE
+
+stepread [locate_data_file OCC137-ANC101-Solid.stp] a *
+tpcompound a
+vinit
+vdisplay a
+vfit
+vsetdispmode 1
+
+set only_screen 1
--- /dev/null
+if { [array get env os_type] != "" } {
+ set os $env(os_type)
+}
+if { [string compare $os "windows"] != 0 } {
+ puts "TODO OCC12345 ALL: An exception was caught"
+ puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
+ puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+}
+
+puts "================"
+puts "OCC137"
+puts "================"
+#
+# The patch "patch-MITUTOYO-USA-05112001.zip" has to be converted to Open Cascade 4.0
+#
+puts "IT IS NECESSARY TO CHECK SELECTED FACE SHADING"
+puts ""
+
+restore [locate_data_file OCC137-ANC101-Solid.brep] a
+vinit
+vdisplay a
+vfit
+vsetdispmode 1
+
+QASetChoiceMode FACE ON
+set x 170
+set y 80
+QASelect $x $y
+QASelect $x $y
+
+set only_screen 1
--- /dev/null
+puts "================="
+puts "OCC166"
+puts "================="
+puts ""
+
+vinit
+
+if [ catch { OCC166 } res ] then {
+ puts "OCC166: Error"
+} else {
+ puts "OCC166: OK"
+}
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC186"
+puts "========"
+
+v2dinit
+v2dcircle circle 0 0 5
+set zoom_factor 10000000
+QAv2dzoom ${zoom_factor}
+
+set only_screen2d 1
+
--- /dev/null
+puts "========"
+puts "OCC200"
+puts "========"
+puts ""
+
+#######################################################
+##puts "2D Viewer. Changing of background color from BLACK to R (R is missing color name)"
+##puts "(visual checking for this case is desirable)"
+#######################################################
+
+set mistake 0
+v2dinit
+if [catch {v2dsetbgcolor R} ] {
+ set mistake 1
+}
+
+if {$mistake != 0} {
+ puts "Faulty : Changing of backgroundcolor was NOT MADE properly"
+} else {
+ puts "Changing of backgroundcolor was made properly"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "================"
+puts "OCC2066"
+puts "================"
+puts ""
+#######################################################################################
+# CRASH in AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr)
+#######################################################################################
+
+box b 10 10 10
+box b2 20 20 20 10 10 10
+vinit
+vdisplay b b2
+vfit
+verase b
+set CollectorToo 1
+
+if [catch {QAPurgeDisplay $CollectorToo} result] {
+ puts "Faulty OCC2066"
+} else {
+ puts "OK OCC2066"
+}
+
+set only_screen 1
+
--- /dev/null
+puts "========"
+puts "OCC223"
+puts "========"
+puts ""
+######################################################
+# Shading is not correct for several overlapped faces, converted to B-Spline representation
+######################################################
+
+restore [locate_data_file OCC223-1.brep] cylinder
+checkshape cylinder
+restore [locate_data_file OCC223-2.brep] face
+checkshape face
+
+set Start_X 140
+set Start_Y 40
+
+vinit
+tclean cylinder
+tclean face
+
+vdisplay cylinder
+vdisplay face
+vfit
+
+vsetdispmode face 1
+vsetcolor face GREEN1
+
+vsetdispmode cylinder 1
+vsetcolor cylinder RED1
+
+QAUpdateLights
+set ColorList [QAGetPixelColor $Start_X $Start_Y]
+regexp {RED +: +([-0-9.+eE]+)} $ColorList full R_START_POINT
+regexp {GREEN +: +([-0-9.+eE]+)} $ColorList full G_START_POINT
+regexp {BLUE +: +([-0-9.+eE]+)} $ColorList full B_START_POINT
+
+puts "R_START_POINT=$R_START_POINT ; G_START_POINT=$G_START_POINT ; B_START_POINT=$B_START_POINT"
+
+set IsGood 1
+for {set count 0} {${count} <= 11} {incr count 1} {
+ QAUpdateLights
+ checkcolor $Start_X $Start_Y $R_START_POINT $G_START_POINT $B_START_POINT
+ if {$stat != 1} {
+ set IsGood 0
+ }
+ incr $Start_X 10
+ incr $Start_Y 10
+}
+
+if {$IsGood == 1} {
+ puts "\nOCC223 OK\n"
+} else {
+ puts "\nFaulty OCC223\n"
+}
+
+set only_screen 1
+
+puts "\n------- Additional Comments From Igor FEOKTISTOV 2002-05-20 12:32 -------\n"
+
+puts "It is not problem of meshing."
+puts "It is pure problem of shading geometrically coinciding faces with different"
+puts "triangulation. If we create analitical cylinder and box by such way that plane"
+puts "faces of cylinder and two faces of box are coinceded, we will have the same"
+puts "result: fractional shading of coinciding faces.\n"
--- /dev/null
+puts "========"
+puts "OCC230"
+puts "OCC489"
+puts "========"
+puts ""
+############################################
+## Numeric Error occures in V2d_View::WindowFit() , Magnify()
+############################################
+
+point p1 0 10
+point p2 10 20
+
+if [catch { OCC230 tc p1 p2 } ] {
+ puts "OCC230: Error"
+} else {
+ puts "OCC230: OK"
+}
--- /dev/null
+puts "========"
+puts "OCC230"
+puts "OCC489"
+puts "========"
+puts ""
+############################################
+## Numeric Error occures in V2d_View::WindowFit() , Magnify()
+############################################
+
+point p1 0 10
+point p2 10 20
+
+if [catch { OCC230 tc p2 p1 } ] {
+ puts "OCC230: Error"
+} else {
+ puts "OCC230: OK"
+}
+
-puts "============"
-puts "CR23652"
-puts "============"
-puts ""
-#######################################################################
+puts "========"
+puts "OCC23652"
+puts "========"
+
+###############################################################################
# Non zoomable text with alignment slides away when zooming view
-#######################################################################
+###############################################################################
-pload AISV
vinit
vtrihedron tri
-vdrawtext Default 0.0 0.0 0.0 255 255 255 0 0 0 0 20 0
-vdrawtext Right_Align 0.0 0.0 0.0 255 255 255 2 0 0 0 20 0
-vfit
+vdrawtext Default 0.0 0.0 0.0 255 255 255 0 0 0 1 20 0
+vdrawtext Right_Align 0.0 0.0 0.0 255 255 255 2 0 0 1 20 0
+
+set scale 3.1783114563761763
+set center_X 0
+set center_Y 0
+set proj_X 0.57735025882720947
+set proj_Y -0.57735025882720947
+set proj_Z 0.57735025882720947
+set up_X -0.40824827551841736
+set up_Y 0.40824827551841736
+set up_Z 0.81649655103683472
+set at_X 0
+set at_Y 0
+set at_Z 0
+
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+set x_coord 36
+set y_coord 201
+
+checkcolor $x_coord $y_coord 0.6 0.6 0.6
+
+set only_screen 1
+
-set 3dviewer 7
--- /dev/null
+puts "========"
+puts "OCC270"
+puts "========"
+
+vinit
+box box 10 10 10
+vaxis axis 1 1 1 7 7 7
+vdisplay box
+vdisplay axis
+vsetdispmode 1
+
+set x1 172
+set y1 223
+
+QAUpdateLights
+checkcolor ${x1} ${y1} 1 0 0
+
+QASetZClippingMode FRONT
+set ZClippingMode [lindex [QAGetZClippingMode] 2]
+if {${ZClippingMode} != "FRONT"} {
+ puts "OCC270: Error (ZClippingMode != FRONT)"
+}
+
+QAUpdateLights
+checkcolor ${x1} ${y1} 1 0 0
+vfit
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC270"
+puts "========"
+
+vinit
+box box 10 10 10
+vaxis axis 1 1 1 7 7 7
+vdisplay box
+vdisplay axis
+vsetdispmode 0
+
+set x1 172
+set y1 223
+
+QAUpdateLights
+checkcolor ${x1} ${y1} 1 0 0
+
+QASetZClippingMode FRONT
+set ZClippingMode [lindex [QAGetZClippingMode] 2]
+if {${ZClippingMode} != "FRONT"} {
+ puts "OCC270: Error (ZClippingMode != FRONT)"
+}
+
+QAUpdateLights
+checkcolor ${x1} ${y1} 1 0 0
+vfit
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+
+vinit
+
+set x 205
+set y 208
+set TypeOfMarker 0
+
+set scale 50.0521
+set center_X 0
+set center_Y 0
+set proj_X 0.57735
+set proj_Y -0.57735
+set proj_Z 0.57735
+set up_X -0.408248
+set up_Y 0.408248
+set up_Z 0.816497
+set at_X 0
+set at_Y 0
+set at_Z 0
+
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+OCC281 ${x} ${y} ${TypeOfMarker}
+OCC281 ${x} ${y} ${TypeOfMarker}
+
+OCC281 200 200 0
+OCC281 200 200 0
+puts "Type of marker mast be blue point!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ''
+
+vinit
+
+OCC281 200 290 9
+OCC281 200 290 9
+puts "Type of marker mast be a ball with 1 color and different saturations!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ''
+
+vinit
+
+OCC281 200 300 10
+OCC281 200 300 10
+puts "Type of marker mast be blue large ring!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ''
+
+vinit
+
+OCC281 200 310 11
+OCC281 200 310 11
+puts "Type of marker mast be blue medium ring!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 320 12
+OCC281 200 320 12
+puts "Type of marker mast be blue small ring!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 210 1
+OCC281 200 210 1
+puts "Type of marker mast be blue plus!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 220 2
+OCC281 200 220 2
+puts "Type of marker mast be blue star!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 230 3
+OCC281 200 230 3
+puts "Type of marker mast be blue circle!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 240 4
+OCC281 200 240 4
+puts "Type of marker mast be blue cross!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 250 5
+OCC281 200 250 5
+puts "Type of marker mast be blue point in a circle!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 260 6
+OCC281 200 260 6
+puts "Type of marker mast be blue plus in a circle!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 270 7
+OCC281 200 270 7
+puts "Type of marker mast be blue star in a circle!"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC281"
+puts "========"
+puts ""
+
+vinit
+
+OCC281 200 280 8
+OCC281 200 280 8
+puts "Type of marker mast be blue cross in a circle!"
+
+set only_screen 1
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC294 : result - shape_result is null"
+
+puts "================"
+puts "OCC294"
+puts "SAM1293"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC294.brep] a
+checkshape a
+
+set a_fullness [nbshapes a]
+regexp {EDGE +: +([-0-9.+eE]+)} $a_fullness full a_edg
+
+explode a e
+if [catch { OCC294 result a a_1 } ] {
+ puts "OCC294: FAULTY"
+} else {
+ set b_fullness [ nbshapes b]
+ regexp {EDGE +: +([-0-9.+eE]+)} $b_fullness full b_edg
+
+ puts "a_edg = ${a_edg}"
+ puts "b_edg = ${b_edg}"
+ if { ${b_edg} >= ${a_edg} } {
+ puts "OCC294: FAULTY"
+ } else {
+ puts "OCC294: OK"
+ }
+}
--- /dev/null
+puts "========"
+puts "OCC301"
+puts "SAM926"
+puts "========"
+puts ""
+
+vinit
+OCC301 50 50 0 5
+OCC301 50 30 0 3
+vtop
+vfit
+puts "Angle dimensions have different arrow sizes"
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC349"
+puts "1. Hidden line removal algorithm works incorrect in the perspective view"
+puts "========"
+
+vinit
+box b 100 900 300
+set 3dviewer 1
+vdisplay b
+
+OCC280 1 0
+
+vfit
+
+set x1 165
+set y1 109
+
+set x2 380
+set y2 26
+
+set x3 215
+set y3 130
+
+set x4 31
+set y4 199
+
+set x5 188
+set y5 254
+
+set x6 351
+set y6 177
+
+set x7 216
+set y7 287
+
+set x8 22
+set y8 373
+
+set x9 2
+set y9 249
+
+set x10 345
+set y10 92
+
+set x11 393
+set y11 109
+
+set x12 52
+set y12 284
+
+#
+# ___________2________________
+# /| /|
+# / | / |
+# / | / |
+# / | / |
+# / | / |
+# 1 | 3 |
+# / | / |
+# / | / |
+# / | / |
+# / | / |
+# ----------------4------------ |
+# | | | |
+# | | | |
+# | | | |
+# | 10 | 11
+# | | | |
+# | | | |
+# | | | |
+# | | | |
+# | | | |
+# 9 | 12 |
+# | |___________6____|__________|
+# | / | /
+# | / | /
+# | / | /
+# | / | /
+# | 5 | /
+# | / | 7
+# | / | /
+# | / | /
+# | / | /
+# |/ |/
+# |--------------8------------|
+#
+#
+
+QAUpdateLights
+checkcolor ${x1} ${y1} 1 1 0
+checkcolor ${x2} ${y2} 1 1 0
+checkcolor ${x3} ${y3} 1 1 0
+checkcolor ${x4} ${y4} 1 1 0
+checkcolor ${x7} ${y7} 1 1 0
+checkcolor ${x8} ${y8} 1 1 0
+checkcolor ${x9} ${y9} 1 1 0
+checkcolor ${x11} ${y11} 1 1 0
+checkcolor ${x12} ${y12} 1 1 0
+checkcolor ${x5} ${y5} 0 0 0
+checkcolor ${x6} ${y6} 0 0 0
+checkcolor ${x10} ${y10} 0 0 0
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC362"
+puts "BUC60997"
+puts "========"
+
+smallview
+box b 10 10 10
+sphere s -30 -30 -30 20
+QAwzoom 1 -86 -72 -13 10
+
--- /dev/null
+puts "========"
+puts "OCC38"
+puts "========"
+
+set GAMMA_CORRECTION 0.5
+set env(Xw_SET_GAMMA_CORRECTION) ${GAMMA_CORRECTION}
+
+v2dinit
+
+set Xw_SET_GAMMA_CORRECTION [expr 1. / ${GAMMA_CORRECTION}]
+
+OCC404 0.7 0.7 0.7
+
+set x_coord 10
+set y_coord 10
+set color2d 1
+checkcolor $x_coord $y_coord 0.6 0.6 0.6
+
+set only_screen2d 1
+
--- /dev/null
+puts "================"
+puts "OCC389"
+puts "================"
+puts ""
+
+v2dinit
+
+box b 10 10 10
+
+if [catch { OCC389 proj b } res] {
+ puts "OCC389: Error"
+ puts "${res}"
+} else {
+ puts "OCC389: OK"
+}
+
+v2ddisplay proj
+v2dfit
+set only_screen2d 1
+
--- /dev/null
+puts "========"
+puts "OCC402"
+puts "========"
+
+v2dinit
+
+set IndexMarker 1
+set TypeOfDetection 0
+set X 10
+set Y 10
+set Width 3
+set Height 3
+set Angle 0
+
+for {set i 1} {${i} <= 14} {incr i} {
+ OCC402 ${IndexMarker} ${TypeOfDetection} ${X} ${Y} ${Width} ${Height} ${Angle}
+ incr X 10
+ incr Y 10
+ incr IndexMarker 1
+}
+
+puts "There are 14 markers in the viewer"
+puts "Visual checking is required !!!!"
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC403"
+puts "========"
+
+v2dinit
+v2dgrid Rect 0 0 10 10 0 Lines
+
+OCC403 RED GREEN
+
+puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+puts "Visual control: background is RED"
+puts "Visual control: major grid lines are GREEN"
+puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+puts ""
+
+set x_coord 175
+set y_coord 155
+set color2d 1
+checkcolor $x_coord $y_coord 1 0 0
+
+if {$stat != 1} {
+ puts "Faulty OCC403: background has NOT RED color"
+} else {
+ puts "OCC403 OK: background is RED"
+}
+
+set x_coord 122
+set y_coord 105
+checkcolor $x_coord $y_coord 0 1 0
+
+if {$stat != 1} {
+ puts "Faulty OCC403: major grid lines have NOT GREEN color"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC404"
+puts "========"
+
+v2dinit
+
+#
+### RED
+#
+set R1 1
+set G1 0
+set B1 0
+
+OCC404 ${R1} ${G1} ${B1}
+
+set x_coord 10
+set y_coord 10
+set color2d 1
+checkcolor $x_coord $y_coord 1 0 0
+
+if { $stat != 1 } {
+ puts "OCC404: Get background color ERROR (case 1)"
+}
+
+
+#
+### GREEN
+#
+
+set R1 0
+set G1 1
+set B1 0
+
+OCC404 ${R1} ${G1} ${B1}
+
+set x_coord 10
+set y_coord 10
+set color2d 1
+checkcolor $x_coord $y_coord 0 1 0
+
+if { $stat != 1 } {
+ puts "OCC404: Get background color ERROR (case 2)"
+}
+
+
+#
+### BLUE
+#
+
+set R1 0
+set G1 0
+set B1 1
+
+OCC404 ${R1} ${G1} ${B1}
+
+set x_coord 10
+set y_coord 10
+set color2d 1
+checkcolor $x_coord $y_coord 0 0 1
+
+if { $stat != 1 } {
+ puts "OCC404: Get background color ERROR (case 2)"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC543"
+puts "========"
+
+v2dinit
+
+set X 0
+set Y 0
+set Radius 10
+set Alpha 0
+set Beta 3.14
+
+QAv2dcircle Circle ${X} ${Y} ${Radius} ${Alpha} ${Beta}
+v2dfit
+
+set x1 207
+#set y1 103
+set y1 104
+
+QAMoveTo2d ${x1} ${y1}
+
+set result [lindex [OCC543 Circle] 2]
+
+if {${result} == 0} {
+ puts "OCC543: Error"
+}
+
+set only_screen2d 1
+
+
--- /dev/null
+puts "========"
+puts "OCC544"
+puts "========"
+puts ""
+#################################
+## Problems with the results of MakePipeShell
+#################################
+
+vinit
+vsetdispmode 1
+OCC544
+vdisplay result
+vsetmaterial result PLASTIC
+vsetcolor result MATRABLUE
+vsettransparency result 0.5
+vsetdispmode 1
+vfit
+
+set scale 2.05374
+set center_X 169.854
+set center_Y -49.5549
+set proj_X 0.135192
+set proj_Y -0.978297
+set proj_Z -0.157031
+set up_X -0.399854
+set up_Y -0.198875
+set up_Z 0.894743
+set at_X 241.985
+set at_Y 329.911
+set at_Z 390.356
+
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+set x1 300
+set y1 70
+
+set x2 190
+set y2 110
+
+set x3 220
+set y3 110
+
+QAMoveTo ${x1} ${y1}
+QAMoveTo ${x1} ${y1}
+
+QAUpdateLights
+checkcolor $x3 $y3 0.04 0.04 0.5
+
+set only_screen 1
+
--- /dev/null
+puts "========"
+puts "OCC60"
+puts "SAM723"
+puts "BUC60916"
+puts "========"
+
+vinit
+box b 10 10 10
+vdisplay b
+vfit
+
+set x_coord 83
+set y_coord 337
+
+QAUpdateLights
+checkcolor $x_coord $y_coord 1 1 0
+
+set xmin 1
+set ymin 1
+set xmax 409
+set ymax 300
+
+# Select part of box
+OCC60 ${xmin} ${ymin} ${xmax} ${ymax}
+OCC60 ${xmin} ${ymin} ${xmax} ${ymax}
+
+set Selection_R 0.8
+set Selection_G 0.8
+set Selection_B 0.8
+
+QAUpdateLights
+checkcolor $x_coord $y_coord 0.8 0.8 0.8
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC61"
+puts "SAM723"
+puts "BUC60919"
+puts "========"
+
+vinit
+vtrihedron trihedron
+
+set x_coord 205
+set y_coord 205
+
+QAUpdateLights
+checkcolor $x_coord $y_coord 0.43 0.48 0.54
+
+set xmin 1
+set ymin 1
+set xmax 409
+set ymax 205
+
+# Select part of trihedron
+OCC60 ${xmin} ${ymin} ${xmax} ${ymax}
+OCC60 ${xmin} ${ymin} ${xmax} ${ymax}
+
+QAUpdateLights
+checkcolor $x_coord $y_coord 0.8 0.8 0.8
+
+set only_screen 1
--- /dev/null
+puts "================"
+puts "OCC6132"
+puts "================"
+puts ""
+#######################################################################################
+# Bad isos presentation in Draw for a face built on a periodic surface
+#######################################################################################
+
+set BugNumber OCC6132
+
+restore [locate_data_file OCC6132.brep] result
+checkshape result
+
+set 2dviewer 1
+
--- /dev/null
+puts "========"
+puts "OCC627"
+puts "========"
+
+v2dinit
+v2dcircle circle 0 0 5
+v2dfit
+
+set i 10
+for {set j 1} {${j} <= ${i}} {incr j} {
+ v2derase circle
+ v2ddisplay circle
+}
+
+set k [lindex [OCC627] 2]
+
+if {${k} != 1} {
+ puts "Sequence length = ${k}"
+ puts "OCC627: Error"
+}
+
+set only_screen2d 1
+
+
+
+
+
--- /dev/null
+puts "================"
+puts "OCC71"
+puts "BUC61045"
+puts "================"
+puts ""
+
+# Data
+set Triedron_X 29
+set Triedron_Y 380
+
+set Shape_X 120
+set Shape_Y 250
+
+# Display box
+vinit
+box b 10 10 10
+vdisplay b
+
+# Display triedron
+OCC71
+vfit
+
+# Check triedron color
+checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1
+
+# Shading box
+vsetdispmode b 1
+
+# Check box color
+checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
+
+# Check triedron color
+checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1
+
+# Select box
+QASelect ${Shape_X} ${Shape_Y}
+QASelect ${Shape_X} ${Shape_Y}
+
+# Check box color
+checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
+
+# Check triedron color
+checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1
+
+# Select empty view
+QASelect 1 1
+QASelect 1 1
+
+# Check box color
+checkcolor ${Shape_X} ${Shape_Y} 0.78 0.54 0.09
+
+# Check triedron color
+checkcolor ${Triedron_X} ${Triedron_Y} 1 1 1
+
+set only_screen 1
--- /dev/null
+puts "TODO ?OCC12345 ALL: An exception was caught"
+puts "TODO ?OCC12345 ALL: \\*\\* Exception \\*\\*.*"
+puts "TODO ?OCC12345 ALL: TEST INCOMPLETE"
+
+puts "================"
+puts "OCC74"
+puts "BUC61051"
+puts "================"
+puts ""
+
+# Data
+set Shape_X 100
+set Shape_Y 346
+
+set Vertex_X 29
+set Vertex_Y 305
+
+set Edge_X ${Shape_X}
+set Edge_Y ${Shape_Y}
+
+set Wire_X ${Shape_X}
+set Wire_Y ${Shape_Y}
+
+set Face_X ${Shape_X}
+set Face_Y ${Shape_Y}
+
+set Shell_X ${Shape_X}
+set Shell_Y ${Shape_Y}
+
+set Solid_X ${Shape_X}
+set Solid_Y ${Shape_Y}
+
+# Display box
+vinit
+box b 10 10 10
+vdisplay b
+vfit
+
+QAUpdateLights
+
+### FIRST PART
+
+# Check Shape color
+checkcolor ${Shape_X} ${Shape_Y} 1 1 0
+
+# Check Vertex color
+checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0
+
+# Check Edge color
+checkcolor ${Edge_X} ${Edge_Y} 1 1 0
+
+# Check Wire color
+checkcolor ${Wire_X} ${Wire_Y} 1 1 0
+
+# Check Face color
+checkcolor ${Face_X} ${Face_Y} 1 1 0
+
+# Check Shell color
+checkcolor ${Shell_X} ${Shell_Y} 1 1 0
+
+# Check Solid color
+checkcolor ${Solid_X} ${Solid_Y} 1 1 0
+
+### SECOND PART
+
+# Check Shape color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 0
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Shape_X} ${Shape_Y}
+QAMoveTo ${Shape_X} ${Shape_Y}
+
+QAUpdateLights
+checkcolor ${Shape_X} ${Shape_Y} 0 1 1
+
+# Check Vertex color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 1
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Vertex_X} ${Vertex_Y}
+QAMoveTo ${Vertex_X} ${Vertex_Y}
+
+QAUpdateLights
+checkcolor ${Vertex_X} ${Vertex_Y} 0 1 1
+
+# Check Edge color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 2
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Edge_X} ${Edge_Y}
+QAMoveTo ${Edge_X} ${Edge_Y}
+
+QAUpdateLights
+checkcolor ${Edge_X} ${Edge_Y} 0 1 1
+
+# Check Wire color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 3
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Wire_X} ${Wire_Y}
+QAMoveTo ${Wire_X} ${Wire_Y}
+
+QAUpdateLights
+checkcolor ${Wire_X} ${Wire_Y} 0 1 1
+
+# Check Face color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 4
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Face_X} ${Face_Y}
+QAMoveTo ${Face_X} ${Face_Y}
+
+QAUpdateLights
+checkcolor ${Face_X} ${Face_Y} 0 1 1
+
+# Check Shell color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 5
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Shell_X} ${Shell_Y}
+QAMoveTo ${Shell_X} ${Shell_Y}
+
+QAUpdateLights
+checkcolor ${Shell_X} ${Shell_Y} 0 1 1
+
+# Check Solid color
+QAMoveTo 1 1
+QAMoveTo 1 1
+set SetSelectMode 6
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+QAMoveTo ${Solid_X} ${Solid_Y}
+QAMoveTo ${Solid_X} ${Solid_Y}
+
+QAUpdateLights
+checkcolor ${Solid_X} ${Solid_Y} 0 1 1
+
+### THIRD PART
+
+set SetSelectMode -1
+OCC74_set b ${SetSelectMode}
+set GetSelectMode [OCC74_get b]
+if { ${GetSelectMode} != ${SetSelectMode} } then {
+ puts "Select Mode = ${GetSelectMode}"
+ puts "OCC74: Get Select Mode Error "
+}
+
+# Check Shape color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Shape_X} ${Shape_Y}
+QAMoveTo ${Shape_X} ${Shape_Y}
+
+QAUpdateLights
+checkcolor ${Shape_X} ${Shape_Y} 1 1 0
+
+# Check Vertex color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Vertex_X} ${Vertex_Y}
+QAMoveTo ${Vertex_X} ${Vertex_Y}
+
+QAUpdateLights
+checkcolor ${Vertex_X} ${Vertex_Y} 1 1 0
+
+# Check Edge color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Edge_X} ${Edge_Y}
+QAMoveTo ${Edge_X} ${Edge_Y}
+
+QAUpdateLights
+checkcolor ${Edge_X} ${Edge_Y} 1 1 0
+
+# Check Wire color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Wire_X} ${Wire_Y}
+QAMoveTo ${Wire_X} ${Wire_Y}
+
+QAUpdateLights
+checkcolor ${Wire_X} ${Wire_Y} 1 1 0
+
+# Check Face color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Face_X} ${Face_Y}
+QAMoveTo ${Face_X} ${Face_Y}
+
+QAUpdateLights
+checkcolor ${Face_X} ${Face_Y} 1 1 0
+
+# Check Shell color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Shell_X} ${Shell_Y}
+QAMoveTo ${Shell_X} ${Shell_Y}
+
+QAUpdateLights
+checkcolor ${Shell_X} ${Shell_Y} 1 1 0
+
+# Check Solid color
+QAMoveTo 1 1
+QAMoveTo 1 1
+QAMoveTo ${Solid_X} ${Solid_Y}
+QAMoveTo ${Solid_X} ${Solid_Y}
+
+QAUpdateLights
+checkcolor ${Solid_X} ${Solid_Y} 1 1 0
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC79"
+puts "========"
+
+vinit
+restore [locate_data_file OCC162.brep] s
+vdisplay s
+
+verase s
+vdisplay s
+
+set listmem {}
+set i_max 10
+for {set i 1} {${i} <= ${i_max}} {incr i} {
+ verase s
+ vdisplay s
+
+ lappend listmem [expr [meminfo w] / 1024]
+ if { [checktrend $listmem 0 1 "Memory leak detected"] } {
+ puts "No memory leak, $i iterations"
+ break
+ }
+}
--- /dev/null
+puts "============"
+puts "OCC1055"
+puts "============"
+puts ""
+######################################################
+# Exception is raised during mesh preparation for shading mode representation
+######################################################
+
+restore [locate_data_file OCC1055.brep] a
+checkshape a
+
+if [catch { fixshape result a 1e-7 } res] {
+ puts "Error : fixshape works wrongly"
+}
+
+set square 162.581
+set 2dviewer 1
+
--- /dev/null
+puts "================"
+puts "OCC1430"
+puts "ShapeFix_Wireframe does not process separate wires"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC1430-1.brep] a
+checkshape a
+
+set message [fixsmall result a 10.]
+
+if {[string length ${message}] > 0} {
+ # Small edges fixed on shape
+ checkshape result
+ set 2dviewer 0
+} else {
+ puts "OCC1430: Error"
+}
+
--- /dev/null
+puts "================"
+puts "OCC1430"
+puts "ShapeFix_Wireframe does not process separate wires"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC1430-2.brep] a
+checkshape a
+
+set message [fixwgaps result a 0.1]
+
+if {[string length ${message}] > 0} {
+ # Small edges fixed on shape
+ checkshape result
+ set 2dviewer 0
+} else {
+ puts "OCC1430: Error"
+}
+
--- /dev/null
+puts "============"
+puts "OCC2821"
+puts "============"
+puts ""
+######################################################
+# IGES file not impored correctly
+######################################################
+
+igesbrep [locate_data_file OCC2821.igs] a *
+
+set comp [tpcompound result]
+regexp {([-0-9.+eE]+) +Shape\(s\)} $comp full nb
+if { $nb < 1} {
+ puts "Error : Number of shape(s) listed is wrong"
+} else {
+ set square 41153
+}
+
+set 2dviewer 1
+
--- /dev/null
+puts "============"
+puts "OCC3926"
+puts "============"
+puts ""
+######################################################
+# Exception during reading file using XDEDRAWEXE
+######################################################
+
+pload DCAF
+
+NewDocument D MDTV-XCAF
+UndoLimit D 100
+NewCommand D
+
+ReadStep D [locate_data_file PRO9233.stp]
+
--- /dev/null
+puts "================"
+puts "OCC394"
+puts "SAM1296"
+puts "================"
+puts ""
+###################################################################
+## After operation "Merge edges" tolerance shape increased from 5 to 198.
+###################################################################
+
+pload QAcommands
+
+restore [locate_data_file OCC394.brep] a
+
+OCC394 r a 10000 2 1.57
+
+regexp { +Face +: +Min +([-0-9.+eE]+)} [maxtolerance a] full face_a_tolerance
+regexp { +Edge +: +Min +([-0-9.+eE]+)} [maxtolerance a] full edge_a_tolerance
+regexp { +Vertex +: +Min +([-0-9.+eE]+)} [maxtolerance a] full vertex_a_tolerance
+
+set max_a_tolerance ${face_a_tolerance}
+if {${edge_a_tolerance} > ${max_a_tolerance}} {
+ set max_a_tolerance ${edge_a_tolerance}
+}
+if {${vertex_a_tolerance} > ${max_a_tolerance}} {
+ set max_a_tolerance ${vertex_a_tolerance}
+}
+
+regexp { +Face +: +Min +([-0-9.+eE]+)} [maxtolerance r] full face_r_tolerance
+regexp { +Edge +: +Min +([-0-9.+eE]+)} [maxtolerance r] full edge_r_tolerance
+regexp { +Vertex +: +Min +([-0-9.+eE]+)} [maxtolerance r] full vertex_r_tolerance
+
+set max_r_tolerance ${face_r_tolerance}
+if {${edge_r_tolerance} > ${max_r_tolerance}} {
+ set max_r_tolerance ${edge_r_tolerance}
+}
+if {${vertex_r_tolerance} > ${max_r_tolerance}} {
+ set max_r_tolerance ${vertex_r_tolerance}
+}
+
+puts "\nface_a_tolerance = ${face_a_tolerance}"
+puts "edge_a_tolerance = ${edge_a_tolerance}"
+puts "vertex_a_tolerance = ${vertex_a_tolerance}"
+puts "\nmax_a_tolerance = ${max_a_tolerance}"
+
+puts "\nface_r_tolerance = ${face_r_tolerance}"
+puts "edge_a_tolerance = ${edge_a_tolerance}"
+puts "vertex_a_tolerance = ${vertex_a_tolerance}"
+puts "\nmax_r_tolerance = ${max_r_tolerance}\n"
+
+if { ${max_a_tolerance} < ${max_r_tolerance} } {
+ puts "OCC394 - Error"
+} else {
+ puts "OCC394 - OK"
+}
+
+renamevar r result
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "OCC5439"
+puts "============"
+puts ""
+######################################################
+# Problems in work of fixshape
+######################################################
+
+restore [locate_data_file OCC5439-1.brep] a
+
+catch { fixshape result a 1.e-7 }
+
+set square 13.1825
+set 2dviewer 1
--- /dev/null
+puts "============"
+puts "OCC6283"
+puts "============"
+puts ""
+######################################################
+# Unstable work fixshape on attached shape (different number of warnings)
+######################################################
+
+set BugNumber OCC6283
+
+set list [stepread [locate_data_file wgehaeuse_surface.stp] a *]
+
+if {[lsearch ${list} Error] > -1} {
+ puts "${BugNumber} : Error during reading attached IGES file"
+} else {
+ tpcompound comp
+ if [catch { set fixlist [fixshape result comp 1e-7] } res] {
+ puts "${BugNumber}: Error during fixshape"
+ } else {
+ set index [string first "Segments were disordered; fixed\n" ${fixlist}]
+ if {$index != -1} {
+ puts "Faulty ${BugNumber}"
+ } else {
+ puts "OK ${BugNumber}"
+ }
+ set square 2.22665e+06
+ set 2dviewer 0
+ }
+}
+
--- /dev/null
+puts "========"
+puts "OCC6542"
+puts "========"
+puts ""
+######################################################
+# Circle is translated to IGES as NURBS
+######################################################
+
+set BugNumber OCC6542
+set TheFileName OCC6542.igs
+set TheFileName2 ${TheFileName}-2.igs
+
+set percent_max 0.1
+
+igesbrep [locate_data_file ${TheFileName}] a *
+set comp [tpcompound res1]
+
+set status 0
+set result [checkshape res1]
+set index [lsearch $result Faulty]
+if {$index > -1} {
+ puts "Faulty ${BugNumber} : checkshape is wrong for source file"
+ incr status
+} else {
+ puts "OK ${BugNumber} : checkshape is good for source file"
+
+ set dumpList [split [dump res1] "\n\t :,"]
+ set index1 [lsearch -exact ${dumpList} Circle]
+
+ if {${index1} == -1} {
+ puts "Faulty ${BugNumber} : there is not a cirle in source file"
+ incr status
+ } else {
+ puts "OK ${BugNumber} : there is a cirle in source file"
+ set Center_X_1 [lindex ${dumpList} [expr ${index1} + 5]]
+ set Center_Y_1 [lindex ${dumpList} [expr ${index1} + 7]]
+ set Center_Z_1 [lindex ${dumpList} [expr ${index1} + 9]]
+ set Axis_X_1 [lindex ${dumpList} [expr ${index1} + 17]]
+ set Axis_Y_1 [lindex ${dumpList} [expr ${index1} + 19]]
+ set Axis_Z_1 [lindex ${dumpList} [expr ${index1} + 21]]
+ set XAxis_X_1 [lindex ${dumpList} [expr ${index1} + 28]]
+ set XAxis_Y_1 [lindex ${dumpList} [expr ${index1} + 30]]
+ set XAxis_Z_1 [lindex ${dumpList} [expr ${index1} + 32]]
+ set YAxis_X_1 [lindex ${dumpList} [expr ${index1} + 39]]
+ set YAxis_Y_1 [lindex ${dumpList} [expr ${index1} + 41]]
+ set YAxis_Z_1 [lindex ${dumpList} [expr ${index1} + 43]]
+ set Radius_1 [lindex ${dumpList} [expr ${index1} + 49]]
+ puts "Center_X_1 = ${Center_X_1}"
+ puts "Center_Y_1 = ${Center_Y_1}"
+ puts "Center_Z_1 = ${Center_Z_1}"
+ puts "Axis_X_1 = ${Axis_X_1}"
+ puts "Axis_Y_1 = ${Axis_Y_1}"
+ puts "Axis_Z_1 = ${Axis_Z_1}"
+ puts "XAxis_X_1 = ${XAxis_X_1}"
+ puts "XAxis_Y_1 = ${XAxis_Y_1}"
+ puts "XAxis_Z_1 = ${XAxis_Z_1}"
+ puts "YAxis_X_1 = ${YAxis_X_1}"
+ puts "YAxis_Y_1 = ${YAxis_Y_1}"
+ puts "YAxis_Z_1 = ${YAxis_Z_1}"
+ puts "Radius_1 = ${Radius_1}"
+ }
+
+ brepiges res1 ${imagedir}/${TheFileName2}
+
+ dall
+ if [catch { igesbrep ${imagedir}/${TheFileName2} b * } res] {
+ puts "Error ${BugNumber}: there is reading problem"
+ } else {
+ set comp [tpcompound res]
+ set result [checkshape res]
+ set index [lsearch $result Faulty]
+ if {$index > -1} {
+ puts "Faulty ${BugNumber} : checkshape is wrong for writing file"
+ incr status
+ } else {
+ puts "OK ${BugNumber} : checkshape is good for writing file"
+
+ set dumpList2 [split [dump res] "\n\t :,"]
+ set index2 [lsearch -exact ${dumpList2} Circle]
+
+ if {${index2} == -1} {
+ puts "Faulty ${BugNumber} : there is not a cirle in writing file"
+ incr status
+ } else {
+ puts "OK ${BugNumber} : there is a cirle in writing file"
+ set Center_X_2 [lindex ${dumpList2} [expr ${index2} + 5]]
+ set Center_Y_2 [lindex ${dumpList2} [expr ${index2} + 7]]
+ set Center_Z_2 [lindex ${dumpList2} [expr ${index2} + 9]]
+ set Axis_X_2 [lindex ${dumpList2} [expr ${index2} + 17]]
+ set Axis_Y_2 [lindex ${dumpList2} [expr ${index2} + 19]]
+ set Axis_Z_2 [lindex ${dumpList2} [expr ${index2} + 21]]
+ set XAxis_X_2 [lindex ${dumpList2} [expr ${index2} + 28]]
+ set XAxis_Y_2 [lindex ${dumpList2} [expr ${index2} + 30]]
+ set XAxis_Z_2 [lindex ${dumpList2} [expr ${index2} + 32]]
+ set YAxis_X_2 [lindex ${dumpList2} [expr ${index2} + 39]]
+ set YAxis_Y_2 [lindex ${dumpList2} [expr ${index2} + 41]]
+ set YAxis_Z_2 [lindex ${dumpList2} [expr ${index2} + 43]]
+ set Radius_2 [lindex ${dumpList2} [expr ${index2} + 49]]
+ puts "Center_X_2 = ${Center_X_2}"
+ puts "Center_Y_2 = ${Center_Y_2}"
+ puts "Center_Z_2 = ${Center_Z_2}"
+ puts "Axis_X_2 = ${Axis_X_2}"
+ puts "Axis_Y_2 = ${Axis_Y_2}"
+ puts "Axis_Z_2 = ${Axis_Z_2}"
+ puts "XAxis_X_2 = ${XAxis_X_2}"
+ puts "XAxis_Y_2 = ${XAxis_Y_2}"
+ puts "XAxis_Z_2 = ${XAxis_Z_2}"
+ puts "YAxis_X_2 = ${YAxis_X_2}"
+ puts "YAxis_Y_2 = ${YAxis_Y_2}"
+ puts "YAxis_Z_2 = ${YAxis_Z_2}"
+ puts "Radius_2 = ${Radius_2}"
+
+ set Center_X_percent [GetPercent ${Center_X_2} ${Center_X_1}]
+ set Center_Y_percent [GetPercent ${Center_Y_2} ${Center_Y_1}]
+ set Center_Z_percent [GetPercent ${Center_Z_2} ${Center_Z_1}]
+
+ set Axis_X_percent [GetPercent ${Axis_X_2} ${Axis_X_1}]
+ set Axis_Y_percent [GetPercent ${Axis_Y_2} ${Axis_Y_1}]
+ set Axis_Z_percent [GetPercent ${Axis_Z_2} ${Axis_Z_1}]
+
+ set XAxis_X_percent [GetPercent ${XAxis_X_2} ${XAxis_X_1}]
+ set XAxis_Y_percent [GetPercent ${XAxis_Y_2} ${XAxis_Y_1}]
+ set XAxis_Z_percent [GetPercent ${XAxis_Z_2} ${XAxis_Z_1}]
+
+ set YAxis_X_percent [GetPercent ${YAxis_X_2} ${YAxis_X_1}]
+ set YAxis_Y_percent [GetPercent ${YAxis_Y_2} ${YAxis_Y_1}]
+ set YAxis_Z_percent [GetPercent ${YAxis_Z_2} ${YAxis_Z_1}]
+
+ set Radius_percent [GetPercent ${Radius_2} ${Radius_1}]
+
+ if {${Center_X_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Center_X is wrong"
+ incr status
+ }
+ if {${Center_Y_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Center_Y is wrong"
+ incr status
+ }
+ if {${Center_Z_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Center_Z is wrong"
+ incr status
+ }
+
+ if {${Axis_X_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Axis_X is wrong"
+ incr status
+ }
+ if {${Axis_Y_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Axis_Y is wrong"
+ incr status
+ }
+ if {${Axis_Z_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Axis_Z is wrong"
+ incr status
+ }
+
+ if {${XAxis_X_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : XAxis_X is wrong"
+ incr status
+ }
+ if {${XAxis_Y_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : XAxis_Y is wrong"
+ incr status
+ }
+ if {${XAxis_Z_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : XAxis_Z is wrong"
+ incr status
+ }
+
+ if {${YAxis_X_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : YAxis_X is wrong"
+ incr status
+ }
+ if {${YAxis_Y_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : YAxis_Y is wrong"
+ incr status
+ }
+ if {${YAxis_Z_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : YAxis_Z is wrong"
+ incr status
+ }
+
+ if {${Radius_percent} > ${percent_max}} {
+ puts "Faulty ${BugNumber} : Radius is wrong"
+ incr status
+ }
+
+ }
+ }
+ }
+}
+
+puts ""
+if {${status} == 0} {
+ puts "${BugNumber}: OK"
+} else {
+ puts "${BugNumber}: Error"
+}
+
+