--- /dev/null
+pload DCAF
+
+
+
+
+
+
+
+
--- /dev/null
+puts "==========="
+puts "BUC60756"
+puts "BUC60761"
+puts "BUC60762"
+puts "BUC60764"
+puts "==========="
+
+Open [locate_data_file BUC60756_Doc.std] D
+
+######################################################################
+catch {file delete ${imagedir}/Doc2.std}
+
+SaveAs D ${imagedir}/Doc2.std
+Close D
+Open ${imagedir}/Doc2.std D
+
--- /dev/null
+puts "==========="
+puts "BUC60790"
+puts "BUC60836"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+set ResultError [BUC60836 D]
+if {${ResultError} != 0 } {
+ puts "BUC60790: Error = $ResultError"
+}
+
--- /dev/null
+puts "==========="
+puts "BUC60813"
+puts "==========="
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+Label D 0:1
+
+SetName D 0:1 SourceLabel
+SetReal D 0:1 3.1415
+
+set Result [CopyLabel D 0:1 0:2]
+if { ${Result} == 0} {
+ puts "BUC60813: Error 1"
+} else {
+ set Name [GetName D 0:2]
+ if { [string length ${Name}] == 0 } {
+ puts "BUC60813: Error 2"
+ } else {
+ set Result [CopyLabel D 0:2 0:3]
+ if { ${Result} == 0 } {
+ puts "BUC60813: Error 3"
+ } else {
+ puts "BUC60813: OK"
+ }
+ }
+}
--- /dev/null
+puts "==========="
+puts "BUC60817"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+set ResultError [BUC60817 D]
+if { ${ResultError} != 0 } {
+ puts "BUC60817: Error = $ResultError"
+}
+
--- /dev/null
+puts "==========="
+puts "BUC60831"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+set L 0:3
+Label D $L
+
+set Status 0
+
+set Result [BUC60831_1 D]
+if { ${Result} != 0 } {
+ puts "BUC60831: Error 1"
+ set Status 1
+}
+
+NewCommand D
+
+set Result [BUC60831_2 D $L]
+if { ${Result} != 0 } {
+ puts "BUC60831: Error 2"
+ set Status 1
+}
+
+set Result [BUC60831_1 D]
+if { ${Result} != 1 } {
+ puts "BUC60831: Error 3"
+ set Status 1
+}
+
+NewCommand D
+
+Undo D
+
+set Result [BUC60831_1 D]
+if { ${Result} != 0 } {
+ puts "BUC60831: Error 4"
+ set Status 1
+}
+
+if { ${Status} != 0} then {
+ puts "BUC60831: Error"
+}
+
--- /dev/null
+puts "==========="
+puts "BUC60844"
+puts "BUC60845"
+puts "==========="
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+Label D 0:2
+Label D 0:2:1
+Label D 0:2:1:1
+Label D 0:2:1:2
+Label D 0:3
+
+SetNode D 0:1
+SetNode D 0:2
+SetNode D 0:2:1
+SetNode D 0:2:1:1
+SetNode D 0:2:1:2
+SetNode D 0:3
+
+InsertNodeAfter D 0:1 0:2
+InsertNodeAfter D 0:2 0:3
+
+AppendNode D 0:2 0:2:1
+
+AppendNode D 0:2:1 0:2:1:1
+InsertNodeAfter D 0:2:1:1 0:2:1:2
+
+NewCommand D
+
+ForgetAll D 0:2:1
+
+NewCommand D
+
+Undo D
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : Present script does not work currently !!! SKETCH application is missing"
+puts "TODO OCC12345 ALL: Tcl Exception"
+puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+
+puts "==========="
+puts "BUC60846"
+puts "==========="
+
+puts "Faulty : Present script does not work currently !!! SKETCH application is missing"
+##############################################################
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+Label D 0:3
+NewSketch D 0:3 0 0 0 1 0 0
+Point D 0:3 10 20
+Point D 0:3 11 20
+Segment D 0:3 0:3:2:3 0:3:2:4
+
+Point D 0:3 10 21
+Point D 0:3 11 21
+Segment D 0:3 0:3:2:9 0:3:2:10
+
+Distance D 0:3 0:3:2:5 0:3:2:11
+
+AISInitViewer D
+
+AISSet D 0:3:2:15 C
+
+AISDisplay D 0:3:2:15
+
+NewCommand D
+
+
--- /dev/null
+puts "==========="
+puts "BUC60847"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+box Shape 10 20 30
+
+set ResultError [BUC60847 D Shape]
+if { ${ResultError} != 0 } {
+ puts "BUC60847: Error = $ResultError"
+}
+
--- /dev/null
+puts "==========="
+puts "BUC60862"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+vertex V1 10 20 0
+vertex V2 20 10 0
+
+catch {edge Shape ${V1} ${V2}}
+catch {set ResultError [BUC60862 D $Shape]}
+
+if { ${ResultError} != 0 } {
+ puts "BUC60862: Error = $ResultError"
+}
+
--- /dev/null
+puts "==========="
+puts "BUC60867"
+puts "==========="
+
+pload QAcommands
+
+set ResultError [ BUC60867 [locate_data_file BUC60756_Doc.std] ]
+
+if { [regexp "0" $ResultError] != 1 } {
+ puts "Error : 1"
+}
+
--- /dev/null
+puts "==========="
+puts "BUC60910"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+set ResultError [BUC60910 D]
+if { ${ResultError} != 0 } {
+ puts "Error : 1"
+}
+
+NewCommand D
+
+
--- /dev/null
+puts "==========="
+puts "BUC60917"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+box b 10 10 10
+SetShape D 0:1:1 b
+
+AISInitViewer D
+
+OpenCommand D
+
+AISSet D 0:1:1 NS
+AISWidth D 0:1:1 1.0
+set W [AISWidth D 0:1:1]
+if { ${W} != 1 } {
+ puts "Error : 1"
+} else {
+ AISDisplay D 0:1:1
+ vfit
+ CommitCommand D
+
+ puts "Doing Undo... "
+
+ Undo D
+ AISRepaint D
+ AISRepaint D
+
+ puts "And now, look: Redo!"
+
+ Redo D
+ AISRepaint D
+
+ set W [AISWidth D 0:1:1]
+ if { ${W} != 1 } {
+ puts "Error : 2"
+ }
+}
+
+set 3dviewer 2
+
+
+
+
+# This TCL script demonstrates bug in AIS/OCAF viewer
+#
+# It needs an additional DRAW command to be defined for
+# setting Width parameter of TPrsStd_AISPresentation attribute.
+# The code for this command (AISWidth) is provided separately.
+#
+# The problem is that when width is set to AISPresentation attribute
+# and Undo/redo are made, this causes error 'width is 0' in the viewer.
+# It seems that width is not kept during Undo/Redo operations.
+
--- /dev/null
+puts "==========="
+puts "BUC60921"
+puts "BUC60954"
+puts "==========="
+
+pload QAcommands
+
+# see end of script!
+#set EXEID TCAF
+set EXEID DRAWEXE
+set BREP [locate_data_file BUC60921.brep]
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+set MemoryLeakage 0
+set i_max 10
+set IsFirstTime 1
+for {set i 1} {$i <= ${i_max}} {incr i} {
+ CommitCommand D
+ OpenCommand D
+ BUC60921 D 0:1:1 $BREP
+
+ catch {exec ps -e -o vsz,comm | grep $EXEID } res
+ puts "Iteration $i: virtual memory consumption = $res"
+ set Mem1 [lindex ${res} 0]
+ if { ${IsFirstTime} == 1} {
+ set Mem0 ${Mem1}
+ set IsFirstTime 0
+ }
+ CommitCommand D
+ OpenCommand D
+ Undo D
+ catch {exec ps -e -o vsz,comm | grep $EXEID } res
+ puts "Iteration $i: virtual memory consumption = $res"
+ set Mem2 [lindex ${res} 0]
+ set Delta [expr abs(${Mem2} - ${Mem1})]
+ set MemoryLeakage [expr ${MemoryLeakage} + ${Delta}]
+ puts " ${i} delta memory consumed: ${Delta} KB"
+}
+
+set percent_max 5
+set percent [expr ${MemoryLeakage} / (double(${i_max}) * ${Mem0} ) * 100.]
+puts "percent = ${percent}"
+
+if {${percent} > ${percent_max}} {
+ puts "BUC60921: Error . There is memory leakage during Undo/Redo"
+} else {
+ puts "BUC60921: OK"
+}
+
+
+# This TCL script demonstrates memory leak in OCAF Undo/Redo
+#
+# The DRAW command TestOCAF (provided separately) just reads
+# the specified brep file
+# and puts it into the document on a given label.
+# This operation is done and undone several times,
+# and the problem is that each time additional memory
+# (approximately equivalent to the size of shape)
+# is consumed.
+#
+# While obviously it should not be so: even if Undo keeps the
+# shape in memory as delta on Redo, this delta should be cleared
+# by the next operation!
+#
+# The bug persists with any setting of variables MMGT_OPT and MMGT_MMAP
+# (while with different initial size and step) and
+#
+# It seems that either delta is not completely freed, or some
+# other data structures keep the shape memory
+
+#================================================
+# The two settings below are necessary to localize the script in order
+# to identify DRAW process among others, and to define path to BREP file
+# The BREP file should be big anough (>= 1Mb recommended)
+set EXEID QATCAF
+set BREP /users/det/files/GEAR.brep
+#================================================
--- /dev/null
+puts "==========="
+puts "BUC60925"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 100
+
+NewCommand D
+
+set ResultError [BUC60925 D]
+if { ${ResultError} != 0 } {
+ puts "Error : 1"
+}
+
+NewCommand D
+
+
--- /dev/null
+puts "==========="
+puts "OCC114"
+puts "==========="
+
+#--------------------------------------------------------------------
+####### Setting value of memory leakage in percents of memory allocated by shape
+set percent_max 10
+puts "Max memory leakage is $percent_max%"
+####### Setting amount of iterations for computing leackage
+set i_max 20
+puts "Amount of iterations is $i_max"
+#--------------------------------------------------------------------
+
+if ![string compare $tcl_platform(platform) "windows"] {
+ proc VMem { memory } {
+ upvar $memory mem
+ regsub "^.*PeakVirtualSize: *\(\[0-9\]*\) KB.*$" \
+ [exec tlist [pid]] "\\1" mem
+ }
+} else {
+ proc VMem { memory } {
+ upvar $memory mem
+ set mem [lindex [exec ps -o vsz -p [pid]] 1]
+ }
+}
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+
+VMem Mem0
+restore [locate_data_file OCC114.brep] s
+VMem Mem1
+#puts "... The peak memory consumed: [expr $Mem1 - $Mem0] KB"
+
+set MemoryLeakage 0
+
+for {set i 1} {${i} <= ${i_max}} {incr i} {
+
+ OpenCommand D
+ SetShape D 0:1 s
+ AbortCommand D
+
+ VMem Mem2
+ set Delta [expr $Mem2 - $Mem1]
+ set MemoryLeakage [expr $MemoryLeakage + $Delta]
+# puts " $i delta memory consumed: $Delta KB"
+}
+
+
+if { $MemoryLeakage != 0 } then {
+ set percent [expr ${MemoryLeakage} / (double(${i_max}) * (${Mem1} - ${Mem0})) * 100.]
+} else {
+ set percent 0
+}
+puts "Current memory leakage in percents = ${percent}"
+
+if {${percent} > ${percent_max}} {
+ puts "OCC114: Error"
+} else {
+ puts "OCC114: OK"
+}
+
+
--- /dev/null
+puts "=============="
+puts "OCC158"
+puts "=============="
+
+NewDocument D MDTV-Standard
+
+##################################################################
+if { [catch {set res [SaveAs D ${imagedir}/OCC158.std]}] != 0 } {
+ puts "OCC158: Error"
+} else {
+ file delete ${imagedir}/OCC158.std
+}
+
+
+
--- /dev/null
+puts "==========="
+puts "OCC261"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+NewCommand D
+SetReal D 0:1 10
+
+NewCommand D
+SetReal D 0:1 20
+
+NewCommand D
+SetReal D 0:1 30
+
+NewCommand D
+SetReal D 0:1 40
+
+Undo D
+Undo D
+
+OCC261 D
+
+set Res [UndoLimit D]
+if { [regexp " 0" $Res] != 1 } {
+ puts "OCC261: Error"
+}
+
+
--- /dev/null
+puts "==========="
+puts "OCC282"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+circle acirc 0 0 0 20
+mkedge anEdge acirc
+wire aWire anEdge
+
+plane pl 0 0 1
+mkface aface pl aWire
+
+NameImportShape D 0:1 aface
+
+if [catch { CheckNaming D 0:2 1 Label 0:1 1 1 1 } res] {
+ puts "OCC282: Error"
+}
+
--- /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 Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_IntegerArray
+SetIntArray D ${Label} ${From} ${To} ${IntegerArray1} ${IntegerArray2} 0
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_IntegerArray
+SetIntArray D ${Label} ${From} ${To} ${IntegerArray1} ${IntegerArray2} 0
+############################################
+
+# Set new value for TDataStd_Real
+SetReal D ${Label} ${Real2}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+# Checking
+set length [llength ${list}]
+set good_length 17
+puts "length = ${length}"
+puts "good_length = ${good_length}"
+
+if { ${length} != ${good_length} } {
+ puts "OCC2932 Error (case 1)"
+} else {
+ set name_attribute [lindex ${list} [expr ${good_length} - 1]]
+ puts "name_attribute = ${name_attribute}"
+ puts "modified_attribute = ${modified_attribute}"
+ if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
+ puts "OCC2932 OK"
+ } else {
+ puts "OCC2932 Error (case 2)"
+ }
+}
+
+
--- /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 Real1 300.
+set Real2 400.
+set modified_attribute TDataStd_Real
+
+############################################
+# Set TDataStd_RealArray
+SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
+############################################
+
+SetReal D ${Label} ${Real1}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+############################################
+# Set old value for TDataStd_RealArray
+SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0
+############################################
+
+# Set new value for TDataStd_Real
+SetReal D ${Label} ${Real2}
+set list [DumpCommand D]
+
+# Open a transaction
+NewCommand D
+set list [DumpCommand D]
+
+# Checking
+set length [llength ${list}]
+set good_length 17
+puts "length = ${length}"
+puts "good_length = ${good_length}"
+
+if { ${length} != ${good_length} } {
+ puts "OCC2932 Error (case 1)"
+} else {
+ set name_attribute [lindex ${list} [expr ${good_length} - 1]]
+ puts "name_attribute = ${name_attribute}"
+ puts "modified_attribute = ${modified_attribute}"
+ if {[string compare ${name_attribute} ${modified_attribute}] == 0} {
+ puts "OCC2932 OK"
+ } else {
+ puts "OCC2932 Error (case 2)"
+ }
+}
--- /dev/null
+puts "==========="
+puts "OCC350"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+vertex v1 0 0 -50
+vertex v2 0 100 -50
+vertex v3 100 0 -50
+line l1 0 0 -50 0 1 0
+line l2 0 100 -50 1 -1 0
+line l3 100 0 -50 -1 0 0
+mkedge e1 l1 v1 v2
+mkedge e2 l2 v2 v3
+mkedge e3 l3 v3 v1
+wire w e1 e2 e3
+plane pl 0 0 -50 0 0 1
+mkface f pl w
+NameImportShape D 0:1 f
+NamePrism D 0:2 0:1 250 0 0 1
+NameBox D 0:3 150 150 150
+GetShape D 0:2 aPrism
+GetShape D 0:3 aBox
+NameCut D 0:4 aPrism aBox
+
+if [catch { CheckNaming D 0:9 1 Label 0:4 1 1 1 } res] {
+ puts "OCC350: Error"
+}
+
--- /dev/null
+puts "==========="
+puts "OCC351"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+NameBox D 0:1 100 100 100
+NamePrism D 0:2 0:1:1 200 -1 0 0
+
+if [catch { CheckNaming D 0:3 1 Label 0:2 1 1 1 } res] {
+ puts "OCC351: Error"
+}
+
--- /dev/null
+puts "==========="
+puts "OCC352"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+NameBox D 0:1 100 100 100
+box abox 100 100 100
+ttranslate abox 100 0 50
+NameImportShape D 0:2 abox
+
+NameGlue D 0:3 0:1 0:2
+
+if [catch { CheckNaming D 0:4 1 Label 0:3 1 1 1 } res] {
+ puts "OCC352: Error"
+}
--- /dev/null
+puts "==========="
+puts "OCC355"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+NameCylinder D 0:1 20 100 0 Solid
+NamePrism D 0:2 0:1:2 50 0 0 1
+
+if [catch { CheckNaming D 0:3 1 Label 0:2 1 1 1 } res] {
+ puts "OCC355: Error"
+}
+
--- /dev/null
+puts "================="
+puts "OCC361"
+puts "BUC60995"
+puts "================="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+if { [catch { OCC361 D }] } {
+ puts "OCC361: Error"
+}
+
--- /dev/null
+puts "================="
+puts "OCC381"
+puts "================="
+puts ""
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+######################################################
+catch { SaveAs D ${imagedir}/OCC381.std }
+
+if { [catch { OCC381_Save D } ] } {
+ puts "OCC381: Error"
+} else {
+ file delete ${imagedir}/OCC381.std
+}
--- /dev/null
+puts "================="
+puts "OCC381"
+puts "================="
+puts ""
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+
+######################################################
+if { [catch { OCC381_SaveAs D ${imagedir}/OCC381.std}] } {
+ puts "OCC381: Error"
+} else {
+ file delete ${imagedir}/OCC381.std
+}
+
--- /dev/null
+puts "==========="
+puts "OCC387"
+puts "SAM1452"
+puts "==========="
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+NewCommand D
+SetVariable D 0:1 0 a
+SetRelation D 0:1 a=10 0:1
+SetReal D 0:1 10
+
+NewCommand D
+SetRelation D 0:1 a=20 0:1
+SetReal D 0:1 20
+NewCommand D
+Undo D
+set Res [DumpRelation D 0:1]
+
+if { [regexp "a=20" $Res] == 1 } {
+ puts "OCC387: Error "
+}
+
--- /dev/null
+puts "==========="
+puts "OCC425"
+puts "OCC414"
+puts "==========="
+######################################################
+# Exception on attemp to save a document that contains empty TDataStd_Name
+######################################################
+# Crash on NT during document saving (SAM1344-#2153)
+######################################################
+
+set IsGood 1
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+
+# Add an attribute to a data framework
+set aSetAttr1 ""
+set aLabel 0:2
+Label D ${aLabel}
+SetName D ${aLabel} ${aSetAttr1}
+
+# Close/Open the transaction
+NewCommand D
+
+# Save the document
+set aFile ${imagedir}/OCC425.std
+catch {file delete ${aFile}}
+SaveAs D ${aFile}
+if { ![file exists ${aFile}] } {
+ puts "There is not ${aFile} file; SaveAs command: Error"
+ set IsGood 0
+}
+catch {exec chmod 777 ${aFile}}
+
+# Restore the document
+Close D
+Open ${aFile} DD
+
+# Get a value of the attribute
+set aGetAttr3 ""
+set IsDone [catch {set aGetAttr3 [GetName DD ${aLabel}]} aResult]
+if { ${IsDone} != 0 } {
+ puts "OCC425: Error"
+ set IsGood 0
+}
+if { ${aSetAttr1}!=${aGetAttr3} } {
+ puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}"
+ puts "Get a value of TDataStd_Name attribute from restoring document: Error"
+ set IsGood 0
+}
+
+if { ${IsGood} != 1 } {
+ puts "OCC425: Error"
+}
+
--- /dev/null
+puts "==========="
+puts "OCC73"
+puts "BUC61050"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+
+# Close/Open transaction
+NewCommand D
+
+# Set NamedShape attribute
+box aBox1 100 200 300
+set aLabel 0:2
+SetShape D ${aLabel} aBox1
+
+# Initialize 3D viewer
+AISInitViewer D
+
+# Add AISPresentation attribute with parameter NS
+AISSet D ${aLabel} NS
+
+# Display presentation of NamedShape in the viewer
+AISDisplay D ${aLabel}
+
+# Get a selection mode of the shape
+set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
+
+# Set a selection mode of the shape as 1
+set SelectionMode 1
+OCC73_SelectionMode D ${aLabel} ${SelectionMode}
+
+# Get a selection mode of the shape
+set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
+
+puts "SelectionMode0 = ${SelectionMode0}"
+puts "SelectionMode1 = ${SelectionMode1}"
+puts "SelectionMode = ${SelectionMode}"
+
+if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode}} then {
+ puts "OCC73: Error"
+} else {
+ puts "OCC73: OK"
+}
--- /dev/null
+puts "==========="
+puts "OCC73"
+puts "BUC61050"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+
+# Close/Open transaction
+NewCommand D
+
+# Set NamedShape attribute
+box aBox1 100 200 300
+set aLabel 0:2
+SetShape D ${aLabel} aBox1
+
+# Initialize 3D viewer
+AISInitViewer D
+
+# Add AISPresentation attribute with parameter NS
+AISSet D ${aLabel} NS
+
+# Display presentation of NamedShape in the viewer
+AISDisplay D ${aLabel}
+
+# Get a selection mode of the shape
+set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
+
+# Set a selection mode of the shape as 1
+set SelectionMode 1
+OCC73_SelectionMode D ${aLabel} ${SelectionMode}
+
+# Get a selection mode of the shape
+set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
+
+# Close/Open transaction
+NewCommand D
+
+# Undo
+Undo D
+
+# Redo
+Redo D
+
+# Get a selection mode of the shape
+set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]
+
+puts "SelectionMode0 = ${SelectionMode0}"
+puts "SelectionMode1 = ${SelectionMode1}"
+puts "SelectionMode = ${SelectionMode}"
+puts "SelectionMode2 = ${SelectionMode2}"
+
+if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then {
+ puts "OCC73: Error"
+} else {
+ puts "OCC73: OK"
+}
--- /dev/null
+puts "==========="
+puts "OCC73"
+puts "BUC61050"
+puts "==========="
+
+pload QAcommands
+
+NewDocument D MDTV-Standard
+UndoLimit D 10
+
+# Close/Open transaction
+NewCommand D
+
+# Set NamedShape attribute
+box aBox1 100 200 300
+set aLabel 0:2
+SetShape D ${aLabel} aBox1
+
+# Initialize 3D viewer
+AISInitViewer D
+
+# Add AISPresentation attribute with parameter NS
+AISSet D ${aLabel} NS
+
+# Display presentation of NamedShape in the viewer
+AISDisplay D ${aLabel}
+
+# Get a selection mode of the shape
+set SelectionMode0 [OCC73_SelectionMode D ${aLabel}]
+
+# Set a selection mode of the shape as 1
+set SelectionMode 1
+OCC73_SelectionMode D ${aLabel} ${SelectionMode}
+
+# Get a selection mode of the shape
+set SelectionMode1 [OCC73_SelectionMode D ${aLabel}]
+
+# Close/Open transaction
+NewCommand D
+
+# Forget the attribute
+ForgetAll D ${aLabel}
+NewCommand D
+
+# Undo-Redo-Undo
+Undo D
+Redo D
+Undo D
+
+# Get a selection mode of the shape
+set IsDone [catch {set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]} aResult]
+
+if { ${IsDone} != 0 } {
+ puts "OCC73: Error"
+ puts ${aResult}
+} else {
+
+puts "SelectionMode0 = ${SelectionMode0}"
+puts "SelectionMode1 = ${SelectionMode1}"
+puts "SelectionMode = ${SelectionMode}"
+puts "SelectionMode2 = ${SelectionMode2}"
+
+if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then {
+ puts "OCC73: Error"
+} else {
+ puts "OCC73: OK"
+}
+
+}
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : the first string is not zero string :"
+puts "TODO OCC12345 ALL: Faulty : the second string is not zero string :"
+
+puts "=========="
+puts "BUC60724"
+puts "=========="
+
+pload QAcommands
+
+BUC60724
+
--- /dev/null
+puts "============="
+puts "BUC60727"
+puts "============="
+
+pload QAcommands
+
+set start [BUC60727]
+set n [llength $start]
+set end [lindex $start [expr $n-1]]
+
+if { $end != 3} {
+ puts "Faulty : Incorrect converting of the unit"
+}
+
--- /dev/null
+puts "========"
+puts "BUC60944"
+puts "========"
+puts ""
+
+pload QAcommands
+
+BUC60944 "../../.."
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1/word2} res] {
+ puts "Error : OCC132"
+}
+
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1:word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1*word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1?word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1\"word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1<word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1>word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1|word2} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC132"
+puts "BUC61029"
+puts "BUC61030"
+puts "========"
+
+pload QAcommands
+
+if [catch {OCC132 word1.word2.word3} res] {
+ puts "Error : OCC132"
+}
--- /dev/null
+puts "========"
+puts "OCC39"
+puts "========"
+
+pload QAcommands
+
+if ![string compare $tcl_platform(platform) "windows"] {
+ OCC39 W:\pak.per 0 res
+ puts [checkshape res]
+} else {
+ puts "Thes case for WNT only!"
+}
+
--- /dev/null
+puts "================"
+puts "OCC63"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC63_×Ú.brep] result
+puts [checkshape result]
+
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : Section is incorrect"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+
+puts "============="
+puts "BUC60462"
+puts "============="
+puts "Section"
+puts ""
+
+restore [locate_data_file buc60462a.brep] a
+puts [checkshape a]
+restore [locate_data_file buc60462b.brep] b
+puts [checkshape b]
+bsection result a b
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full cs
+
+if { $cs != 0 } {
+ puts "Faulty : Section is incorrect"
+}
+
+set length 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_17"
+puts "TODO OCC12345 ALL: Faulty : mistakes are found in checked shape by checkshape command"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+
+puts "=========="
+puts "BUC60462"
+puts "=========="
+
+restore [locate_data_file buc60462c.brep] a
+puts [checkshape a]
+restore [locate_data_file buc60462d.brep] b
+puts [checkshape b]
+puts "Fuse begin"
+bfuse result a b
+puts "Fuse end"
+
+set che [checkshape result r]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in checked shape by checkshape command"
+} else {
+ puts "Checking by checkshape - OK"
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Faulty : Section is incorrect"
+
+puts "============="
+puts "BUC60463"
+puts "============="
+puts "Section"
+puts ""
+cpulimit 1400
+restore [locate_data_file buc60463a.brep] a
+puts [checkshape a]
+restore [locate_data_file buc60463b.brep] b
+puts [checkshape b]
+bsection result a b
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full cs
+if { $cs != 0 } {
+ puts "Faulty : Section is incorrect"
+}
+set length 0
+set 2dviewer 0
+
--- /dev/null
+puts "============="
+puts "BUC60555"
+puts "CUT Case2"
+puts "============="
+cpulimit 1400
+restore [locate_data_file buc60555a.brep] part
+puts [checkshape part]
+restore [locate_data_file buc60555b.brep] trTool1
+puts [checkshape trTool1]
+
+halfspace hs1 trTool1 20000 10000 0
+bcut cut1 part hs1
+puts [checkshape cut1]
+
+set che [checkshape cut1 r]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in checked shape by checkshape command"
+} else {
+ puts "Checking by checkshape - OK"
+}
+
+puts [maxtolerance cut1]
+
+restore [locate_data_file buc60555c.brep] trTool2
+halfspace hs2 trTool2 10000 10000 0
+bcut cut2 cut1 hs2
+
+tcopy cut2 result
+
+explode cut2 e
+mkcurve cu1 cut2_1
+mkcurve cu2 cut2_2
+mkcurve cu3 cut2_3
+mkcurve cu4 cut2_4
+
+set che [checkshape cut2 r]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in checked shape by checkshape command"
+} else {
+ puts "Checking by checkshape - OK"
+}
+
+puts [checkshape cut2]
+set tolerance [ maxtolerance cut2 ]
+regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance
+regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance
+regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance
+if { $MaxFaceTolerance > 1 || $MaxEdgeTolerance > 1 || $MaxVertexTolerance > 1 } {
+ puts "Faulty : Tolerance of shape is more then 1.0"
+} else {
+ puts "Tolerance of shape is less then 1.0"
+}
+set square 4.52817e+07
+set 2dviewer 0
--- /dev/null
+puts "=============="
+puts "BUC60555"
+puts "CUT Case 3"
+puts "=============="
+cpulimit 5000
+restore [locate_data_file buc60555a.brep] part
+puts [checkshape part]
+restore [locate_data_file buc60555b.brep] trTool1
+puts [checkshape trTool1]
+
+halfspace hs1 trTool1 20000 10000 0
+bcut cut1 part hs1
+puts [checkshape cut1]
+
+set che [checkshape cut1 r]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in checked shape by checkshape command"
+} else {
+ puts "Checking by checkshape - OK"
+}
+
+maxtolerance cut1
+
+restore [locate_data_file buc60555c.brep] trTool2
+halfspace hs2 trTool2 10000 10000 0
+bcut cut2 cut1 hs2
+puts [checkshape cut2]
+
+set che [checkshape cut2 r]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in checked shape by checkshape command"
+} else {
+ puts "Checking by checkshape - OK"
+}
+
+maxtolerance cut2
+
+restore [locate_data_file buc60555d.brep] trTool3
+halfspace hs3 trTool3 20000 1000 0
+bcut cut3 cut2 hs3
+
+tcopy cut3 result
+
+explode cut3 e
+mkcurve cu1 cut3_1
+mkcurve cu2 cut3_2
+mkcurve cu3 cut3_3
+mkcurve cu4 cut3_4
+
+set che [checkshape cut3 r]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in checked shape by checkshape command"
+} else {
+ puts "Checking by checkshape - OK"
+}
+
+puts [checkshape cut3 ]
+
+set tolerance [ maxtolerance cut3 ]
+regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance
+regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance
+regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance
+
+if { $MaxFaceTolerance > 1 || $MaxEdgeTolerance > 1 || $MaxVertexTolerance > 1 } {
+ puts "Faulty : Tolerance of shape is more then 1.0"
+} else {
+ puts "Tolerance of shape is less then 1.0"
+}
+set square 2.22138e+07
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts "BUC60585"
+puts "========================"
+
+restore [locate_data_file buc60585a.brep] s
+puts [checkshape s]
+plane ps 2036.25 -97.5 -1460.499755859375 0.0 -0.75103523489975432 -0.66026212668838646 1.0 0.0 0.0
+
+psection result s ps
+
+set length 117.81
+set 2dviewer 0
+
+## set num [lindex [checksection res] 4]
+# if { $num != 0 } {
+# puts " Faulty : Result shape is Unclosed !!! "
+# }
--- /dev/null
+puts "=========="
+puts "BUC60649"
+puts "BUC60657"
+puts "=========="
+puts ""
+
+restore [locate_data_file buc60649a.brep] a
+puts [checkshape a]
+
+set che [checkshape a rr]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
+ puts "Body of the script was not executed"
+} else {
+ puts "Checking of SOURCE shape by checkshape - OK"
+ mkoffset result a 1 1
+ renamevar result_1 result
+}
+set length 271.473
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : the distanse is"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+
+puts "====================================="
+puts "BUC60663"
+puts "====================================="
+puts ""
+puts "It takes visual check for this BUG."
+puts "====================================="
+puts ""
+
+restore [locate_data_file buc60663a.brep] a
+puts [checkshape a]
+restore [locate_data_file buc60663b.brep] b
+puts [checkshape b]
+
+bsection result a b
+
+set expl [explode result v]
+set len [llength $expl]
+set ver [lindex $expl [expr $len - 1]]
+explode b e
+explode b_4 v
+distmini d $ver b_5
+
+regexp {([-0-9.+eE]+)} [dump d_val] full dist
+regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [maxtolerance $ver] full toler
+
+if {$dist > $toler} {
+ puts "Faulty : the distanse is $dist. It is more $toler."
+}
+set length 0
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "=================="
+puts "BUC60669"
+puts "=================="
+puts ""
+#############################################################
+## An exception was caught OSD_SIGBUS: SIGBUS 'bus error' detected.**
+## Exception ** OSD_SIGBUS: SIGBUS 'bus error' detected.
+#############################################################
+
+restore [locate_data_file buc60669a.brep] shell1
+puts [checkshape shell1]
+restore [locate_data_file buc60669b.brep] shell2
+puts [checkshape shell2]
+
+ksection result shell1 shell2 1000 0.0001 0.00001 0
+
+#checksection res
+set length 104.754
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty BUC60682"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_5"
+
+pload QAcommands
+
+puts "=================="
+puts "BUC60682"
+puts "=================="
+
+restore [locate_data_file buc60682a.brep] shell1
+restore [locate_data_file buc60682b.brep] shell2
+
+set che [checkshape shell1]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60682 (shell 1): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar shell1 result
+} else {
+ puts "BUC60682 OK (shell 1): Source shape is valid"
+ set che [checkshape shell2]
+ if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60682 (shell 2): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar shell2 result
+ } else {
+ puts "BUC60682 OK (shell 2): Source shape is valid"
+ ksection result shell1 shell2 1000 0.0001 0.00001 0
+ }
+}
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : The distance between"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+
+puts "========================"
+puts "BUC60690"
+puts "========================"
+puts ""
+
+restore [locate_data_file buc60690a.brep] a
+restore [locate_data_file buc60690b.brep] b
+
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60690 (shape 1): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar a result
+} else {
+ puts "BUC60690 OK (shape 1): Source shape is valid"
+ set che [checkshape b]
+ if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60690 (shape 2): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar b result
+ } else {
+ puts "BUC60690 OK (shape 2): Source shape is valid"
+
+ bsection result a b
+
+ set le [explode result v]
+ distmini d1 result_1 b
+ distmini d2 [lindex $le [expr [llength $le] - 1]] b
+
+ regexp {([-0-9.+eE]+)} [dump d1_val] full du1
+
+ if { [expr $du1 > 1e-7] } {
+ puts "Faulty : The distance between first vertex and shellB is $du1. It is more then 1e-7."
+ }
+
+ regexp {([-0-9.+eE]+)} [dump d2_val] full du2
+ if { [expr $du2 > 1e-7] } {
+ puts "Faulty : The distance between last vertex and shellB is $du2. It is more then 1e-7."
+ }
+ }
+}
+set length 0
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: An exception was caught"
+puts "TODO OCC12345 ALL: Exception"
+puts "TODO OCC12345 ALL: Faulty BUC60703: here is problem with FUSE operation"
+puts "TODO OCC12345 ALL: Error : The command can not be build."
+
+puts "========================"
+puts "BUC60703"
+puts "================================="
+puts "Action with models with VERY BIG tolerance"
+puts "================================="
+##########################################
+## Crash during a fuse whilst two plans are tangent.
+## ( Case has LIMITATION status currently )
+##########################################
+
+#cpulimit 9000
+
+restore [locate_data_file buc60703a.brep] a
+# maxtolerance a
+puts [checkshape a]
+restore [locate_data_file buc60703b.brep] b
+# maxtolerance b
+puts [checkshape b]
+
+if [catch {bfuse result a b } catch_result] {
+ puts "Faulty BUC60703: here is problem with FUSE operation"
+} else {
+ puts "OK OCC348: function FUSE works ok"
+ if [catch {checkshape result } catch_result] {
+ puts "Faulty BUC60703 : here is checking problem."
+ } else {
+ puts "BUC60703 OK"
+ }
+ # maxtolerance res
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+
+puts "==========="
+puts "BUC60708"
+puts "==========="
+
+restore [locate_data_file buc60708a.brep] a
+puts [checkshape a]
+restore [locate_data_file buc60708b.brep] b
+puts [checkshape b]
+
+bcommon result a b
+
+set faces [explode result f]
+set n [llength $faces]
+
+set end [lindex $faces [expr $n-1]]
+
+if { $end != "result_4" } {
+ puts " Faulty :Common operation was made wrongly"
+} else {
+ puts " Common operation was made successfully"
+}
+set square 13.4871
+set 2dviewer 0
--- /dev/null
+puts "=========="
+puts "BUC60712"
+puts "=========="
+puts ""
+puts "=================================="
+puts "It takes visual check for this BUG"
+puts "=================================="
+
+#
+# OCC22070: Grid Tests: CHL set, detected problems
+# Problems:
+# The shape buc60712a.brep is self-interferred.
+# thus it can not be used as the argument for Boolean Operation Algorithm.
+#
+# Proposals:
+# The Case chl/902/F3 should be removed or rewritten:
+
+restore [locate_data_file buc60712a.brep] a
+puts [checkshape a]
+
+restore [locate_data_file buc60712b.brep] b
+puts [checkshape b]
+
+# Recompute "a" shape
+explode a f
+
+bop a_1 a_2
+bopfuse r12
+
+bop a_3 a_4
+bopfuse r34
+
+bop r12 r34
+
+bopfuse r
+
+# Start boolean operation
+bop r b
+bopsection result
+
+# Check result
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
+# Resume
+if { $num != 0 } {
+ puts " Faulty BUC60712: Result shape is INcorrect !!! "
+} else {
+ puts "BUC60712 OK: Result shape is correct "
+}
+set length 1.88145
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "========================"
+puts "BUC60744"
+puts "========================"
+puts ""
+
+restore [locate_data_file buc60744a.brep] a
+restore [locate_data_file buc60744b.brep] b
+
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60744 (shape 1): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar a result
+} else {
+ puts "BUC60744 OK (shape 1): Source shape is valid"
+
+ set che [checkshape b]
+ if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60744 (shape 2): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar b result
+ } else {
+ puts "BUC60744 OK (shape 2): Source shape is valid"
+
+ ksection result a b 1000 0.0001 0.00001 0
+
+ set ne [llength [explode result e]]
+ set nv [llength [explode result v]]
+
+ if {$ne >= $nv} {
+ puts [format "Faulty : the number of edges is %s, but the number of vertexes is %s." $ne $nv]
+ }
+ }
+}
+bsection result a b
+
+set ne [llength [explode result e]]
+set nv [llength [explode result v]]
+
+if {$ne >= $nv} {
+ puts [format "Faulty : the number of edges is %s, but the number of vertexes is %s." $ne $nv]
+}
+
+set length 228.386
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts "BUC60777"
+puts "========================"
+
+profile p x 30 y -10 x 10 y 10 x 10 y 30 t -30 -20 t -30 20
+mkoffset result p 1 -1
+explode p w
+
+regexp {Mass +: +([-0-9.+eE]+)} [lprops result_1] full end
+regexp {Mass +: +([-0-9.+eE]+)} [lprops p_1] full end1
+
+if { $end >= $end1} {
+ puts " Faulty Mkoffset operation was made wrongly"
+ } else {
+ puts " Mkoffset operation was made successfully"
+}
+
+# Lenth of "profile" : 203.733802110964
+
+renamevar result_1 result
+
+set length 191.044
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_2"
+puts "TODO OCC12345 ALL: Faulty : mistakes are found in SOURCE shape by checkshape command"
+puts "TODO OCC12345 ALL: Faulty BUC60782"
+puts "TODO OCC12345 ALL: Error : The command can not be build."
+
+puts "========================"
+puts "BUC60782"
+puts "CASE 2"
+puts "========================"
+puts ""
+puts "Results of Geom2d_OffsetCurve are sometimes strange (not correct). "
+puts ""
+
+restore [locate_data_file buc60782b.brep] a
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60782 (case 2): Source shape is invalid"
+} else {
+ puts "BUC60782 OK (case 2): Sourse shape is correct"
+}
+
+set che [checkshape a rr]
+if { [regexp {OK} $che ] != 1} {
+ puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
+ puts "Body of the script was not executed"
+} else {
+ puts "Checking of SOURCE shape by checkshape - OK"
+ if [catch { mkoffset result a 1 10 } catch_result] {
+ puts "Faulty BUC60782: mkoffset works wrongly"
+ renamevar a result
+ } else {
+ puts "OK BUC60782: offset is created"
+ tpcompound result
+ }
+}
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "BUC60787"
+puts "BUC60783"
+puts "========"
+
+#restore Common_Shell_Case2.brep S1
+#restore Common_Solid_Case2.brep S2
+
+restore [locate_data_file buc60787a.brep] S1
+puts [checkshape S1]
+restore [locate_data_file buc60787b.brep] S2
+puts [checkshape S1]
+
+bcommon result S1 S2
+
+set nb_info [nbshapes result]
+
+
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
+
+if { $err != 0 || $err1 != 1} {
+ puts "Faulty : result should be a shell, but not a compound of faces"
+} else {
+ puts "BUC60787 - OK"
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "BUC60787"
+puts "BUC60783"
+puts "========"
+
+#restore Cut_Shell_Case2.brep S1
+#restore Cut_Solid_Case2.brep S2
+
+restore [locate_data_file buc60787c.brep] S1
+puts [checkshape S1]
+restore [locate_data_file buc60787d.brep] S2
+puts [checkshape S2]
+
+bcut result S1 S2
+
+set nb_info [nbshapes result]
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
+
+if { $err != 0 || $err1 != 1} {
+ puts "Faulty : result should be a shell, but not a compound of faces"
+} else {
+ puts "BUC60787 - OK"
+}
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "BUC60788"
+puts "case 3"
+puts "========"
+
+#restore Cut_Shell_Case2.brep S1
+#restore Cut_Solid_Case2.brep S2
+
+restore [locate_data_file buc60788e.brep] S1
+puts [checkshape S1]
+restore [locate_data_file buc60787d.brep] S2
+puts [checkshape S2]
+
+bcut result S1 S2
+
+set nb_info [nbshapes result]
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
+
+if { $err != 0 || $err1 != 1} {
+ puts "Faulty : result should be a shell, but not a compound of faces"
+} else {
+ puts "BUC60788 - OK"
+}
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "BUC60788"
+puts "case 2"
+puts "========"
+
+#restore Common_Shell_Case2.brep S1
+#restore Common_Solid_Case2.brep S2
+
+restore [locate_data_file buc60788c.brep] S1
+puts [checkshape S1]
+restore [locate_data_file buc60787b.brep] S2
+puts [checkshape S1]
+
+bcommon result S1 S2
+
+set nb_info [nbshapes result]
+regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err
+regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1
+
+if { $err != 0 || $err1 != 1} {
+ puts "Faulty : result should be a shell, but not a compound of faces"
+} else {
+ puts "BUC60788 - OK"
+}
+set square 0
+set 2dviewer 0
--- /dev/null
+
+puts "========"
+puts "BUC60789"
+puts "========"
+puts ""
+
+#restore buc60789a.brep S1
+restore [locate_data_file buc60787b.brep] S1
+### (by apn during classification)
+puts [checkshape S1]
+restore [locate_data_file buc60789b.brep] S2
+puts [checkshape S2]
+
+bcommon result S1 S2
+
+
+set nb_info [nbshapes result]
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+
+if { $ve != 0 && $ed != 0 } {
+ puts " BUC60789 OK: COMMON operation was made properly"
+} else {
+ puts "Faulty BUC60789: COMMON operation was made wrongly"
+}
+set length 78.3594
+set 2dviewer 0
--- /dev/null
+
+puts "========"
+puts "BUC60789"
+puts "========"
+puts ""
+
+#restore buc60789c.brep S1
+##by apn
+restore [locate_data_file buc60787b.brep] S1
+puts [checkshape S1]
+restore [locate_data_file buc60789d.brep] S2
+puts [checkshape S2]
+
+bcut result S2 S1
+
+set nb_info [nbshapes result]
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+
+ if { $ve != 0 && $ed != 0 } {
+ puts " BUC60789 OK: CUT operation was made properly"
+ } else {
+ puts "Faulty BUC60789: CUT operation was made wrongly"
+ }
+set length 288.856
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60826b.brep could not be found"
+puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+
+puts "========================"
+puts "BUC60826"
+puts "========================"
+
+#restore Model2-a.brep a
+restore [locate_data_file BUC60826a.brep] a
+puts [checkshape a]
+
+# restore Model2-b.brep b
+restore [locate_data_file BUC60826b.brep] b
+puts [checkshape b]
+
+bsection result a b
+
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num
+
+if { $num != 0 } {
+ puts " Faulty BUC60826 : Result shape is Unclosed !!! "
+} else {
+ puts "BUC60826 OK: Result shape is CORRECT !!! "
+}
+set length 0
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60827d.brep could not be found"
+puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+
+puts "========================"
+puts "BUC60827"
+puts "========================"
+
+#restore Model3-a.brep a
+restore [locate_data_file BUC60827c.brep] a
+
+#restore Model3-b.brep b
+restore [locate_data_file BUC60827d.brep] b
+
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60827 (shape 1): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar a result
+} else {
+ puts "BUC60827 OK (shape 1): Source shape is valid"
+
+ set che [checkshape b]
+ if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty BUC60827 (shape 2): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar b result
+ } else {
+ puts "BUC60827 OK (shape 2): Source shape is valid"
+
+ bsection result a b
+ set rlen 0
+ set rlen [llength [explode res v]]
+ if ([expr $rlen == 0]) {
+ puts "Faulty :The result of section is an empty compound."
+ } else {
+ distmini d1 res_1 a_1
+ regexp {([-0-9.+eE]+)} [dump d1_val] full len1
+ if ([expr $len1 > 1e-7]) {
+ puts "Faulty :The section is incomplite."
+ } else {
+ distmini d2 res_2 a_2
+ regexp {([-0-9.+eE]+)} [dump d2_val] full len2
+ if ([expr $len2 > 1e-7]) {
+ puts "Faulty :The section is incomplite."
+ }
+ }
+ }
+ }
+}
+
+set length 0
+set 2dviewer 0
--- /dev/null
+puts "============="
+puts "BUC60830"
+puts "BUC60829"
+puts "============="
+
+restore [locate_data_file BUC60830-face2.brep] f
+puts [checkshape f]
+
+set che [checkshape f rr]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
+ puts "Body of the script was not executed"
+} else {
+ puts "Checking of SOURCE shape by checkshape - OK"
+ mkoffset result f 1 3
+ renamevar result_1 result
+}
+
+set length 81.5088
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60853_plane.brep could not be found"
+puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+
+puts "========"
+puts "BUC60853"
+puts "========"
+puts ""
+###############################################################################
+##The exception Standard_NumericError is generated in the function TopOpeBRepTool_CurveTool::MakeCurves().
+## The error occurs only when approximate mode is switched on. The command in draw is :
+## > section res err_face.brep err_plane.brep -a
+###############################################################################
+
+restore [locate_data_file BUC60853_face.brep] face
+restore [locate_data_file BUC60853_plane.brep] plane
+puts [checkshape face]
+puts [checkshape plane]
+
+bsection result face plane -a
+
+
+# set text [nbshapes res]
+# set ver [lindex $text 7]
+# set edg [lindex $text 10]
+# set com [lindex $text 28]
+
+set nb_info [nbshapes result]
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ver
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edg
+
+# if { $com != 0} {
+# puts " Faulty BUC60853: Result shape is COMPOUND, but it must be edge "
+# set make_photo 0
+# } else {
+if { $edg != 1} {
+ puts " Faulty BUC60853: Result shape contains more than one edge "
+ explode res v
+} else {
+ if { $ver < 2} {
+ puts " Faulty BUC60853: Result edge contains less than two vertexes."
+ explode res v
+ } else {
+ puts " BUC60853 OK: Result of section operation is correct "
+ explode res v
+ }
+}
+#}
+set length 0
+set 2dviewer 0
--- /dev/null
+puts "============="
+puts "BUC60878"
+puts "============="
+
+#restore BUC60878-wire1.brep a
+#########dtext -10 -10 -60 "THE CASE IS INCORRECT"
+#mkoffset r a 1 0.5
+#tpcompound res
+#checkshape res
+
+restore [locate_data_file BUC60878-wire1.brep] a
+puts [checkshape a]
+
+set che [checkshape a rr]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
+ puts "Body of the script was not executed"
+} else {
+ puts "Checking of SOURCE shape by checkshape - OK"
+ mkoffset result a 1 0.5
+ renamevar result_1 result
+}
+
+set length 370.796
+set 2dviewer 0
--- /dev/null
+puts "============="
+puts "BUC60878"
+puts "============="
+
+#restore BUC60878-wire3.brep a
+#########dtext -10 -10 -60 "THE CASE IS INCORRECT"
+#mkoffset r a 1 0.25
+#tpcompound res
+#checkshape res
+
+restore [locate_data_file BUC60878-wire3.brep] a
+puts [checkshape a]
+
+set che [checkshape a rr]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
+ puts "Body of the script was not executed"
+} else {
+ puts "Checking of SOURCE shape by checkshape - OK"
+ mkoffset result a 1 0.25
+ renamevar result_1 result
+}
+
+set length 11.2406
+set 2dviewer 0
--- /dev/null
+puts "============="
+puts "BUC60878"
+puts "============="
+
+#restore BUC60878-wire5.brep a
+###############dtext 0 -10 0 "THE CASE IS INCORRECT"
+#mkoffset r a 1 4
+#tpcompound res
+#checkshape res
+
+restore [locate_data_file BUC60878-wire5.brep] a
+puts [checkshape a]
+
+set che [checkshape a rr]
+if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in SOURCE shape by checkshape command"
+ puts "Body of the script was not executed"
+} else {
+ puts "Checking of SOURCE shape by checkshape - OK"
+ mkoffset result a 1 4
+ renamevar result_1 result
+}
+
+set length 107.351
+set 2dviewer 0
--- /dev/null
+
+puts "============"
+puts "BUC60880"
+puts "============"
+puts ""
+##########################################
+## We have overlapping edges when section a shell by plane.
+##########################################
+
+restore [locate_data_file BUC60880_sec_error2.brep] sh
+puts [checkshape sh]
+
+plane pl 65000 19000 2600 1 0 0
+mkface f pl
+
+bsection result sh f
+
+set nb_info [nbshapes result]
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed
+
+if { $ed == 1 } {
+ puts "BUC60880 OK: SECTION operation was made properly"
+} else {
+ explode result e
+ set status [OCC333 result_1 result_2]
+ if {[llength ${status}] < 1} {
+ puts "BUC60880 ERROR"
+ } else {
+ regexp {([-0-9.+eE]+)} $status full code
+ if { ${code} == 3 || ${code} == 2} {
+ puts "BUC60880 : Section command works properly"
+ } else {
+ puts "Faulty BUC60880: Section was made WRONGLY"
+ }
+ }
+}
+set length 1424.94
+set 2dviewer 0
--- /dev/null
+puts "============"
+puts "BUC60882"
+puts "============"
+puts ""
+#######################################################################
+## The edge is corrupted after applying command "fsameparameter": tolerance is increased up to 1e+50
+#######################################################################
+
+pload XDE
+catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands }
+
+restore [locate_data_file BUC60882_samepar.brep] result
+
+set che [checkshape result]
+
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Warning BUC60882: Source shape is NOT correct. It was detected by Checkshape command"
+} else {
+ puts "BUC60882 OK: Source shape is valid"
+}
+
+puts "*** Before : "
+
+regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol
+
+puts "MaxTolerance = $MaxTol"
+if { $MaxTol > 1 } {
+ puts "Warning : Tolerance of Source edge is more then 1.0"
+} else {
+ puts " Tolerance of source edge is less then 1.0"
+}
+
+fsameparameter result 1e-5
+
+puts "*** After : "
+regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol_1
+
+puts "MaxTolerance = $MaxTol_1"
+if { $MaxTol_1 > $MaxTol } {
+ puts [format "Faulty BUC60882 : Tolerance of Result edge increased and it is equal to %s" $MaxTol_1]
+} else {
+ puts " BUC60882 OK: Tolerance of Result edge is less or equal to tolerance of Sourse edge."
+}
+
+set length 1768.53
+set 2dviewer 0
--- /dev/null
+
+puts "============"
+puts "BUC60896"
+puts "============"
+puts ""
+###############################################################
+## If give command "sameparameter edge" on attached edge in the DRAW this command hang.
+###############################################################
+
+restore [locate_data_file BUC60896_edge.rle] result
+# checkshape res
+
+sameparameter result
+sameparameter result tol 1.e-2
+sameparameter result tol 1000
+
+set length 48288.3
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty BUC60898: here is reading problem"
+puts "TODO OCC12345 ALL: Error : The command can not be build."
+
+puts "==========="
+puts " BUC60898"
+puts "==========="
+puts ""
+
+pload XDE
+catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands }
+
+if [catch { igesbrep [locate_data_file $filedir/buc60898.igs] a *} result] {
+## rename to BUC60898.igs
+ puts "Faulty BUC60898: here is reading problem"
+} else {
+ puts "BUC60898 OK"
+ tpcompound a
+
+ if [catch {sewing result 1e-7 a } catch_result] {
+ puts "Faulty BUC60898: function SEWING gives except"
+ } else {
+ puts " BUC60898 OK: function SEWING works without except"
+ }
+}
+
+#checkshape res
+#set che [checkshape res r]
+#set err [lindex $che [expr [llength $che] - 1]]
+#if { $err != "OK"} {
+# puts "Faulty : mistakes are found in checked shape by checkshape command"
+#} else {
+# puts "Checking by checkshape - OK"
+#}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+
+puts "============"
+puts "BUC60922"
+puts "============"
+puts ""
+#############################
+## Exception NumericError in Extrema
+#############################
+
+restore [locate_data_file BUC60907_px1.rle] sh
+puts [checkshape sh]
+
+line l 40 0 5 0 1 0
+mkedge e l
+subshape sh F 379
+mksurface result sh_379
+
+puts "Info: compute extrema"
+extrema result l
+
+puts "Info: compute distmini"
+distmini r sh e
+
+mkface result result
+
+set square 157.932
+set 2dviewer 0
--- /dev/null
+
+puts "============"
+puts "BUC60926"
+puts "============"
+puts ""
+######################################################################
+## Creating a sphere of radius 1 at 0,0,0 and a cone with r1=1 r2=2 height=2 angle=3*PI/2 at 1,1,0 and
+## then using BRepAlgoAPI_Fuse on the two solids will trigger a segmentation fault.
+######################################################################
+
+restore [locate_data_file shading_132.brep] a
+puts [checkshape a]
+
+restore [locate_data_file BUC60926-2.brep] b
+puts [checkshape b]
+
+bfuse result a b
+
+set square 41.7175
+set 2dviewer 0
--- /dev/null
+
+puts "============"
+puts "BUC60946"
+puts "============"
+
+restore [locate_data_file BUC60946_prism.brep] c
+explode c
+puts [checkshape c_1]
+puts [checkshape c_2]
+
+renamevar c_1 sh
+renamevar c_2 pr
+bsection result sh pr
+
+set nb_info [nbshapes result]
+regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_vertices
+regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_edges
+
+if { $nb_vertices != $nb_edges } {
+ puts "Section is opened: Faulty shape"
+} else {
+ puts "Section is closed: OK"
+}
+set length 52.5057
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts " BUC60706 "
+puts " OCC110 "
+puts "(cases 1-3)"
+puts "========================"
+
+restore [locate_data_file buc60706a.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706b.brep] w
+puts [checkshape w]
+pipe t w f
+
+restore [locate_data_file buc60706c.brep] s
+puts [checkshape s]
+
+bcut res_1 s t
+puts [checkshape res_1]
+
+restore [locate_data_file buc60706d.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706e.brep] w
+puts [checkshape w]
+pipe t w f
+
+bcut res_2 res_1 t
+puts [checkshape res_2]
+
+restore [locate_data_file buc60706g.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706h.brep] w
+puts [checkshape w]
+pipe t w f
+
+bcut result res_2 t
+
+set square 865172
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts " BUC60706 "
+puts " OCC110 "
+puts "(case 4-6)"
+puts "========================"
+
+restore [locate_data_file buc60706j.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706b.brep] w
+puts [checkshape w]
+pipe t w f
+
+restore [locate_data_file buc60706l.brep] s
+puts [checkshape s]
+
+bcut res_1 s t
+puts [checkshape res_1]
+
+restore [locate_data_file buc60706m.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706e.brep] w
+puts [checkshape w]
+pipe t w f
+
+bcut res_2 res_1 t
+puts [checkshape res_2]
+
+restore [locate_data_file buc60706p.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706h.brep] w
+puts [checkshape w]
+pipe t w f
+
+bcut result res_2 t
+
+set square 860752
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts " BUC60706 "
+puts " OCC110 "
+puts "(case 7-9)"
+puts "========================"
+
+restore [locate_data_file buc60706s.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706b.brep] w
+puts [checkshape w]
+pipe t w f
+
+restore [locate_data_file buc60706l.brep] s
+puts [checkshape s]
+
+bcut res_1 s t
+puts [checkshape res_1]
+
+restore [locate_data_file buc60706v.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706e.brep] w
+puts [checkshape w]
+pipe t w f
+
+bcut res_2 res_1 t
+puts [checkshape res_2]
+
+restore [locate_data_file buc60706x.brep] f
+puts [checkshape f]
+
+restore [locate_data_file buc60706h.brep] w
+puts [checkshape w]
+pipe t w f
+
+bcut result res_2 t
+
+set square 861220
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC23 : Checkshape command works wrongly"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "================"
+puts "OCC23"
+puts "================"
+puts ""
+#####################################################################
+## Checkshape gives result that there is a selfintersection on wire, but there are no intersection on it.
+#####################################################################
+
+restore [locate_data_file OCC23.brep] sh
+
+decho off
+set che [checkshape sh]
+decho on
+
+if { [regexp {Faulty} $che] == 1 } {
+ puts "Faulty OCC23 : Checkshape command works wrongly"
+} else {
+ puts "OCC23 OK : Checkshape command works properly"
+}
+
+explode sh f
+explode sh_2 w
+
+renamevar sh_2_1 result
+
+set length 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : Result shape is WRONG !!!"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "========================"
+puts " OCC238 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_2_solid.brep and case_2_edge1.brep"
+#################################################
+puts " "
+puts [restore [locate_data_file OCC238a.brep] a]
+puts [restore [locate_data_file case_2_edge1.brep] b]
+puts [bop a b]
+puts [bopcommon result b a]
+
+set nb_info [nbshapes result]
+set nb_v_good 14
+set nb_e_good 7
+
+explode result v
+explode a e
+distmini di result_1 a_3
+regexp {([-0-9.+eE]+)} [dump $di_val] full dis
+if { [expr $dis > 1.e-5] } {
+ puts "Faulty : Result shape is WRONG !!!"
+} else {
+ puts " Result shape is COMPLITE"
+}
+
+set length 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : Result shape is WRONG !!!"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "========================"
+puts " OCC238 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_2_solid.brep from case_2_edge1.brep"
+#################################################
+puts " "
+puts [restore [locate_data_file OCC238a.brep] a]
+puts [restore [locate_data_file case_2_edge1.brep] b]
+puts [bop a b]
+puts [boptuc result b a]
+
+set nb_info [nbshapes result]
+set nb_v_good 14
+set nb_e_good 7
+
+explode result v
+explode a e
+distmini di result_2 a_3
+regexp {([-0-9.+eE]+)} [dump $di_val] full dis
+if { [expr $dis > 1.e-5] } {
+ puts "Faulty : Result shape is WRONG !!!"
+} else {
+ puts " Result shape is COMPLITE"
+}
+
+set length 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contain"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+
+puts "========================"
+puts " OCC239 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_2_solid.brep and case_2_wire1.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC238a.brep] a
+restore [locate_data_file case_2_wire1.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+
+ set nb_info [nbshapes result]
+ set nb_v_good 18
+ set nb_e_good 10
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+
+puts "========================"
+puts " OCC239 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_2_solid.brep and case_2_wire1.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC238a.brep] a
+restore [locate_data_file case_2_wire1.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 18
+ set nb_e_good 11
+
+set length 2481.26
+set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command is not valid"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
+
+puts "========================"
+puts " OCC240 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_2_shell.brep and case_2_edge2.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC240a.brep] a
+restore [locate_data_file case_2_edge2.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 14
+ set nb_e_good 6
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+
+puts "========================"
+puts " OCC240 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_2_shell.brep and case_2_edge2.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC240a.brep] a
+restore [locate_data_file case_2_edge2.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 14
+ set nb_e_good 7
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command is not valid"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
+
+puts "========================"
+puts " OCC241 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_2_shell.brep and case_2_edge3.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC240a.brep] a
+restore [locate_data_file case_2_edge3.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 6
+ set nb_e_good 3
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
+
+puts "========================"
+puts " OCC241 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_2_shell.brep and case_2_edge3.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC240a.brep] a
+restore [locate_data_file case_2_edge3.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 6
+ set nb_e_good 3
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command is not valid"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
+
+puts "========================"
+puts " OCC242 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_2_shell.brep and case_2_wire1.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC240a.brep] a
+restore [locate_data_file case_2_wire1.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 18
+ set nb_e_good 9
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must"
+
+puts "========================"
+puts " OCC242 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_2_shell.brep and case_2_wire1.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC240a.brep] a
+restore [locate_data_file case_2_wire1.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 18
+ set nb_e_good 13
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+
+puts "========================"
+puts " OCC243 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_4_shell.brep and case_4_wire3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_4_shell.brep] a
+restore [locate_data_file case_4_wire3.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 15
+ set nb_e_good 10
+
+ set length 1150.78
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+
+puts "========================"
+puts " OCC243 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_4_shell.brep and case_4_wire3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_4_shell.brep] a
+restore [locate_data_file case_4_wire3.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 16
+ set nb_e_good 11
+
+ set length 929.278
+ set 2dviewer 1
+
\ No newline at end of file
--- /dev/null
+
+puts "========================"
+puts " OCC244 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_5_solid.brep and case_5_wire3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_5_solid.brep] a
+restore [locate_data_file case_4_wire3.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 12
+ set nb_e_good 11
+
+ set length 1808.02
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+
+puts "========================"
+puts " OCC245 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_5_shell.brep and case_5_wire3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_5_shell.brep] a
+restore [locate_data_file case_4_wire3.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 12
+ set nb_e_good 11
+
+ set length 1808.02
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+
+puts "========================"
+puts " OCC245 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_5_shell.brep and case_5_wire3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_5_shell.brep] a
+restore [locate_data_file case_4_wire3.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 3
+ set nb_e_good 2
+
+ set length 272.04
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC246 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_1_solid.brep and case_1_wire1.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC246a.brep] a
+restore [locate_data_file case_1_wire1.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 5
+ set nb_e_good 2
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command is not valid. The length is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC248 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_8_solid.brep and case_8_wire6.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC247a.brep] a
+restore [locate_data_file OCC248b.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 1
+ set nb_e_good 0
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC248 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_8_solid.brep and case_8_wire6.brep"
+#################################################
+ puts " "
+restore [locate_data_file OCC247a.brep] a
+restore [locate_data_file OCC248b.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 8
+ set nb_e_good 8
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command is not valid. The length is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC249 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_9_wire_a.brep and case_9_edge3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_edge3.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 2
+ set nb_e_good 1
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC249 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_9_wire_a.brep and case_9_edge3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_edge3.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 4
+ set nb_e_good 2
+
+ set length 0
+ set 2dviewer 0
+
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC249 "
+puts "========================"
+
+#################################################
+## puts " BOPCUT case_9_wire_a.brep and case_9_edge3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_edge3.brep] b
+ puts [bop a b]
+ puts [bopcut result]
+ set nb_info [nbshapes result]
+ set nb_v_good 4
+ set nb_e_good 2
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC249 "
+puts "========================"
+
+#################################################
+## puts " BOPFUSE case_9_wire_a.brep and case_9_edge3.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_edge3.brep] b
+ puts [bop a b]
+ puts [bopfuse result]
+ set nb_info [nbshapes result]
+ set nb_v_good 6
+ set nb_e_good 5
+
+ set length 0
+ set 2dviewer 2
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command is not valid. The length is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC250 "
+puts "========================"
+
+#################################################
+## puts " BOPCOMMON case_9_wire_a.brep and case_9_wire2.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_wire2.brep] b
+ puts [bop a b]
+ puts [bopcommon result]
+ set nb_info [nbshapes result]
+ set nb_v_good 2
+ set nb_e_good 1
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC250 "
+puts "========================"
+
+#################################################
+## puts " BOPTUC case_9_wire_a.brep and case_9_wire2.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_wire2.brep] b
+ puts [bop a b]
+ puts [boptuc result]
+ set nb_info [nbshapes result]
+ set nb_v_good 7
+ set nb_e_good 6
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC250 "
+puts "========================"
+
+#################################################
+## puts " BOPCUT case_9_wire_a.brep and case_9_wire2.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_wire2.brep] b
+ puts [bop a b]
+ puts [bopcut result]
+ set nb_info [nbshapes result]
+ set nb_v_good 4
+ set nb_e_good 2
+
+ set length 0
+ set 2dviewer 0
+
\ No newline at end of file
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The length of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains"
+
+puts "========================"
+puts " OCC250 "
+puts "========================"
+
+#################################################
+## puts " BOPFUSE case_9_wire_a.brep and case_9_wire2.brep"
+#################################################
+ puts " "
+restore [locate_data_file case_9_wire_a.brep] a
+restore [locate_data_file case_9_wire2.brep] b
+ puts [bop a b]
+ puts [bopfuse result]
+set nb_info [nbshapes result]
+set nb_v_good 9
+set nb_e_good 9
+
+set length 0
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC251"
+puts "================"
+puts ""
+###########################################################
+## Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and
+## section r2 f2 f1 give different results, one of result is invalid - overlapped edges.
+###########################################################
+
+restore [locate_data_file OCC251.brep] f
+explode f
+puts [checkshape f_1]
+puts [checkshape f_2]
+
+bsection result f_1 f_2
+explode result
+
+set status [OCC333 result_1 result_2]
+if {[llength ${status}] < 1} {
+ puts "OCC251 ERROR"
+} else {
+ regexp {([-0-9.+eE]+)} $status full code
+ if { ${code} == 3 || ${code} == 2} {
+ puts "OCC251 OK (case 1) : Section command works properly"
+ } else {
+ puts "Faulty OCC251 (case 1): Section was made WRONGLY"
+ }
+}
+
+set length 1.
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC251"
+puts "================"
+puts ""
+###########################################################
+## Section of two faces f1 and f2 depends on order of arguments: section r1 f1 f2 and
+## section r2 f2 f1 give different results, one of result is invalid - overlapped edges.
+###########################################################
+
+restore [locate_data_file OCC251.brep] f
+explode f
+puts [checkshape f_1]
+puts [checkshape f_2]
+
+bsection result f_2 f_1
+explode result
+
+set status [OCC333 result_1 result_2]
+if {[llength ${status}] < 1} {
+ puts "OCC251 ERROR"
+} else {
+ regexp {([-0-9.+eE]+)} $status full code
+ if { ${code} == 3 || ${code} == 2 } {
+ puts "OCC251 OK (case 2) : Section command works properly"
+ } else {
+ puts "Faulty OCC251 (case 2): Section was made WRONGLY"
+ }
+}
+
+set length 1.
+set 2dviewer 0
}
set square 1.3135
-set 2dviewer 0
+set 3dviewer 0
}
set square 0
-set 2dviewer 0
+set 3dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_10: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 10)"
+puts "========"
+
+restore [locate_data_file OCC264_10.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 0
+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 != 8 && $nod != 10 } {
+ puts "Faulty OCC264_10: here is shading problem"
+} else {
+ puts "Shading of OCC264_10 is OK"
+}
+
+set square 0
+set 3dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_11: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 11)"
+puts "========"
+
+restore [locate_data_file OCC264_11.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 0
+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 != 32 && $nod != 28 } {
+ puts "Faulty OCC264_11: here is shading problem"
+} else {
+ puts "Shading of OCC264_11 is OK"
+}
+
+set square 0
+set 3dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_2: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 2)"
+puts "========"
+
+restore [locate_data_file OCC264_02.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 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 != 10 && $nod != 12 } {
+ puts "Faulty OCC264_2: here is shading problem"
+} else {
+ puts "Shading of OCC264_2 is OK"
+}
+
+set square 0
+set 3dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_3: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 3)"
+puts "========"
+
+restore [locate_data_file OCC264_03.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 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 != 13 && $nod != 15 } {
+ puts "Faulty OCC264_3: here is shading problem"
+} else {
+ puts "Shading of OCC264_3 is OK"
+}
+
+set square 0
+set 3dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_4: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 4)"
+puts "========"
+
+restore [locate_data_file OCC264_04.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 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 != 13 && $nod != 15 } {
+ puts "Faulty OCC264_4: here is shading problem"
+} else {
+ puts "Shading of OCC264_4 is OK"
+}
+
+set square 0
+set 3dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_5: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 5)"
+puts "========"
+
+restore [locate_data_file OCC264_05.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 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 != 85 && $nod != 87 } {
+ puts "Faulty OCC264_5: here is shading problem"
+} else {
+ puts "Shading of OCC264_5 is OK"
+}
+
+set square 0
+set 3dviewer 0
+
}
set square 19.2399
-set 2dviewer 0
+set 3dviewer 0
}
set square 150.283
-set 2dviewer 0
+set 3dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_8: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 8)"
+puts "========"
+
+restore [locate_data_file OCC264_08.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 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_8: here is shading problem"
+} else {
+ puts "Shading of OCC264_8 is OK"
+}
+
+set square 0
+set 3dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC264_9: here is shading problem"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC264"
+puts " (case 9)"
+puts "========"
+
+restore [locate_data_file OCC264_09.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vclear
+
+isos result 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_9: here is shading problem"
+} else {
+ puts "Shading of OCC264_9 is OK"
+}
+
+set square 0
+set 3dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC12345 ALL: OCC287 : Faulty"
+
+puts "========================"
+puts " OCC287 "
+puts "========================"
+
+restore [locate_data_file shading_170.brep] result
+puts [checkshape result]
+
+tclean result
+isos result 0
+incmesh result .1
+triangles result
+
+# set 3dviewer 1
+
+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 != 604 && $nod != 363} {
+ puts " Warning: OCC287 looks like OK, but visual checking is required !!!!"
+} else {
+ puts "OCC287 : Faulty"
+}
+
+puts ""
+puts "Besides, it is impossible to load this shape in 3D Viewer"
+vinit
+vdisplay result
+vfit
+vsetdispmode result 1
+
+set square 0
+set 3dviewer 0
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC295"
+puts "================"
+puts ""
+##############################################################
+## Exception is raised in the GeomConvert_CompCurveToBSplineCurve
+##Exception "Run-time exception error
+## current exception: xalloc. No handler for exception.
+## " is raised during merging to edges in DRAW with command "merge re e1 e2".
+##############################################################
+
+restore [locate_data_file OCC295-1.brep] e1
+
+set che [checkshape e1]
+if { [regexp {Faulty} $che] == 1} {
+ puts "Faulty OCC295 (shape1): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar e1 result
+} else {
+ puts "OCC295 OK (shape1): Source shape is valid"
+ restore [locate_data_file OCC295-2.brep] e2
+ set che [checkshape e2]
+ if { [regexp {Faulty} $che] == 1} {
+ puts "Faulty OCC295 (shape2): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar e2 result
+ } else {
+ puts "OCC295 OK (shape2): Source shape is valid"
+ OCC295 result e1 e2
+ }
+}
+
+set length 19.5611
+set 2dviewer 0
--- /dev/null
+
+puts "================"
+puts "OCC300"
+puts "================"
+puts ""
+#################################################
+## Compsolids have no volume. #2432(SAM1380)
+#################################################
+
+restore [locate_data_file OCC300.brep] result
+
+set che [checkshape result]
+if { [regexp {Faulty} $che] == 1 } {
+ puts "Faulty OCC300: Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+} else {
+ puts "OCC300 OK: Source shape is valid"
+
+ set props [vprops result]
+ set list [split ${props}]
+ set listLength [llength ${list}]
+ if { ${listLength} < 5 } {
+ puts "OCC300 - Error : listLength= ${listLength}"
+ }
+
+ regexp {Mass +: +([-0-9.+eE]+)} $props full volume
+ set maxdelta 0.000001
+ if { ${volume} < ${maxdelta} } then {
+ puts "OCC300 - Error "
+ } else {
+ puts "OCC300 - OK"
+ }
+ puts "Volume = ${volume}"
+}
+
+set square 750
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Tcl Exception: result is not a topological shape!!!"
+puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+
+puts "========"
+puts "OCC305"
+puts "========"
+puts ""
+######################################################
+# BRepOffsetAPI_MakeOffset: problem with offsetting a wire
+######################################################
+
+puts ""
+puts "Bug's attributes"
+puts "################"
+puts ""
+puts "Customer : Telco"
+puts "Channel : External"
+puts "Version : 4.0"
+puts "OS : IRIX"
+puts "Urgency : High"
+puts "Type : BUG"
+puts ""
+puts "Summary: BRepOffsetAPI_MakeOffset: problem with offsetting a wire"
+puts ""
+puts "Description:"
+puts "I am attaching the brep file of a curve, obtained from intersection with a"
+puts "plane. Its a planer curve and we want to offset it by the amount which"
+puts "is feasible. after trying with all options we were not able to offset it."
+puts "But the same wire when we read inside EUCLID3 as well as CATIA it does"
+puts "the offset correctly."
+puts ""
+puts ""
+puts "Bug's advancement"
+puts "#################"
+puts ""
+puts "Customer version Development version"
+puts "Status : CLOSED Status : CLOSED"
+puts "Resolution : NOT Resolution : NOT"
+puts "Leave as CLOSED NOT Leave as CLOSED NOT"
+puts ""
+puts ""
+puts "Bug's history"
+puts "#############"
+puts ""
+puts "------- Additional Comments From Igor NAZAROV-BUGMASTER 2002-04-19 16:21 -------"
+puts "Dear Sergey,"
+
+puts "Below you will find conclusion of JGV about thia bug"
+puts "Bugmaster"
+puts " This case can not be done by existing algorithm. It is mathematical"
+puts "limitation: the offset may be performed only from at least C1-continuous"
+puts "curve, but all the 12 edges of initial wire are based on C0-continuous"
+puts "curves."
+puts " I may modify the algorithm so that it splits initial edges into"
+puts "C1-continuous curves, but then resulting wire will consist of too many"
+puts "small edges (in our case the number of edges will increase about 100"
+puts "times)."
+puts " But user may obtain initial wire more smooth: when he intersects"
+puts "something with a plane by command \"section\", he can add the key \"-a\""
+puts "(force approximation)."
+puts ""
+puts ""
+
+catch {pload XDE}
+
+restore [locate_data_file OCC305.brep] a
+puts [checkshape a]
+
+if [catch {mkoffset result a 1 0.5 } catch_result] {
+ puts "Faulty OCC305 : function MKOFFSET works wrongly"
+} else {
+ decho off
+ set che [checkshape result]
+ decho on
+ if { [regexp {This shape seems to be valid} $che] == 1} {
+ puts "OCC305 OK"
+ } else {
+ puts "Faulty OCC305"
+ }
+}
+set square 0
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_1"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+pload QAcommands
+
+puts "================"
+puts "OCC307"
+puts "SAM1265"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC307.brep] f
+
+set che [checkshape f]
+if { [regexp {Faulty} $che ] == 1} {
+ puts "Warning OCC307: Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC307 OK: Source shape is valid"
+}
+
+explode f f
+
+renamevar f w
+
+explode w w
+
+OCC307 result1 f_4 w_6 0
+OCC307 result2 f_5 result1 0
+
+puts [checkshape result1]
+renamevar result2 result
+
+set square 0
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_1"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+pload QAcommands
+
+puts "================"
+puts "OCC307"
+puts "SAM1265"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC307.brep] f
+
+set che [checkshape f]
+if { [regexp {Faulty} $che] == 1} {
+ puts "Warning OCC307: Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC307 OK: Source shape is valid"
+}
+
+explode f f
+
+renamevar f w
+
+explode w w
+
+OCC307 result1 f_4 w_6 1
+OCC307 result2 f_5 result1 1
+
+puts [checkshape result1]
+renamevar result2 result
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts " OCC317 "
+puts "========================"
+puts ""
+##################################################
+## A Solid "so" is valid, whereas wire "so_5" from the solid is not valid.
+##################################################
+
+restore [locate_data_file OCC317.brep] result
+
+set che [checkshape result]
+if { [regexp {Faulty} $che] == 1} {
+ puts "Faulty OCC317: Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+} else {
+ puts "OCC317 OK: Source shape is valid"
+ explode result w
+
+ set che [checkshape result_5]
+ if { [regexp {Faulty} $che] == 1} {
+ puts "Faulty OCC317: Wire is invalid. It was detected by Checkshape command"
+ } else {
+ puts "OCC317 OK : Wire is valid."
+ }
+
+ set che [checkshape result r]
+ if { [regexp {OK} $che] != 1 } {
+ puts "Faulty OCC317: Wire is invalid. It was detected by Checkshape command"
+ } else {
+ puts "OCC317 OK : Wire is valid."
+ }
+}
+
+set square 2104.21
+set 2dviewer 0
+
--- /dev/null
+puts "========================"
+puts " OCC327 "
+puts " case 3 "
+puts "========================"
+
+restore [locate_data_file OCC327c.brep] result
+
+set che [checkshape result r]
+if { [regexp {OK} $che] == 1 } {
+ puts " OCC327 case 3: OK"
+} else {
+ puts " OCC327 case 3: Faulty"
+}
+
+set square 61013.8
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts " OCC327 "
+puts " case 4 "
+puts "========================"
+
+restore [locate_data_file OCC327d.brep] result
+
+set che [checkshape result r]
+if { [regexp {OK} $che] == 1 } {
+ puts " OCC327 case 4: OK"
+} else {
+ puts " OCC327 case 4: Faulty"
+}
+
+set square 7793.26
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC330: Checkshape command works wrongly"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========================"
+puts " OCC330 "
+puts "========================"
+puts ""
+##################################################
+## checkshape command consider the shape with incorrect order of tolerance as valid.
+##################################################
+
+restore [locate_data_file OCC330.brep] result
+
+decho off
+set che [checkshape result]
+decho on
+
+if { [regexp {Faulty} $che ] != 1 } {
+ puts "Faulty OCC330: Checkshape command works wrongly"
+} else {
+ puts "OCC330 OK : Checkshape command works properly"
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+
+puts "================"
+puts "OCC337"
+puts "================"
+puts ""
+############################################
+## It's impossible to fuse two solids in the file attached.
+############################################
+
+restore [locate_data_file OCC337_clone1.brep] a
+explode a
+
+set che [checkshape a_1]
+
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC337 (shape 1): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar a_1 result
+} else {
+ puts "OCC337 OK (shape 1): Source shape is valid"
+ set che [checkshape a_2]
+ if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC337 (shape 2): Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar a_2 result
+ } else {
+ puts "OCC337 OK (shape 2): Source shape is valid"
+ bfuse result a_1 a_2
+ }
+}
+
+set square 35009.9
+set 2dviewer 0
+
+
+
+
--- /dev/null
+
+puts "================"
+puts "BUC61048"
+puts "OCC345"
+puts "================"
+puts ""
+############################################
+## Command sameparametr in DRAW hangs on attached edge.
+############################################
+
+restore [locate_data_file OCC345.brep] result
+
+sameparameter result
+set length 3.89067
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "OCC357"
+puts "BUC60970"
+puts "========"
+
+restore [locate_data_file buc60970a.brep] a
+puts [checkshape a]
+## small/brep/OCC358a.brep - second shape
+restore [locate_data_file OCC358a.brep] b
+puts [checkshape b]
+
+if { [catch { pipe result a b } catch_result] } {
+ puts "$catch_result"
+}
+
+set square 44761.1
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts " BUC60977 "
+puts " OCC358 "
+puts "========================"
+#####
+puts "The helical pipe is not shaded in AISViewer"
+#####
+
+restore [locate_data_file OCC358a.brep] f
+puts [checkshape f]
+
+restore [locate_data_file OCC358b.brep] w
+puts [checkshape w]
+
+pipe result w f
+
+vinit
+vdisplay result
+vfit
+vsetdispmode result 1
+# checkshape res
+# maxtolerance res
+
+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 == 12966 && $nod == 6896} {
+ puts " OCC358 looks like OK"
+} else {
+ puts [format " tri= %s nod= %s " $tri $nod]
+ puts " OCC358 : Shady (bad shading)"
+}
+
+set square 24861.2
+set 2dviewer 0
+
--- /dev/null
+pload QAcommands
+
+puts "================"
+puts "OCC395"
+puts "SAM1296"
+puts "================"
+puts ""
+##############################################################
+## After merge two edges with help GeomConvert_CompCurveToBSplineCurve result is bad.
+##############################################################
+
+restore [locate_data_file OCC395-1.brep] e1
+
+set che [checkshape e1]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC395: Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar e1 result
+} else {
+ puts "OCC395 OK: Source shape is valid"
+
+ restore [locate_data_file OCC395-2.brep] e2
+ set che [checkshape e2]
+ if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC395: Source shape is invalid. It was detected by Checkshape command"
+ puts "Body of the script was NOT executed"
+ renamevar e2 result
+ } else {
+ puts "OCC395 OK: Source shape is valid"
+ OCC395 result e1 e2
+ }
+}
+
+set length 34.9073
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts " OCC397 "
+puts "========================"
+
+pload QAcommands
+
+set rd_ch 50588
+set gr_ch 34901
+set bl_ch 5098
+
+restore [locate_data_file OCC397.brep] a
+puts [checkshape a]
+
+tclean a
+explode a f
+renamevar a_55 result
+
+vinit
+vdisplay result
+vfit
+vsetdispmode result 1
+
+set color [QAGetPixelColor 235 180]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : Shading is missing in 3D Viewer"
+}
+
+QASelect 220 170
+QASelect 220 170
+
+set square 92.9029
+set only_screen 1
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_2"
+puts "TODO OCC12345 ALL: Faulty OCC399: Command checkshape works wrongly: Source shape is invalid but this shape must be OK"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC399"
+puts "========"
+puts ""
+#########################################
+## Checkshape gives wrong result for valid face
+#########################################
+
+restore [locate_data_file OCC399.brep] result
+
+set che [checkshape result]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC399: Command checkshape works wrongly: Source shape is invalid but this shape must be OK"
+} else {
+ puts "OCC399 OK : Source shape is valid. Command checkshape works properly."
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC406: Command checkshape works wrongly: Source shape looks invalid"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC406"
+puts "========"
+puts ""
+#########################################
+## Checkshape says face is Ok, but it looks invalid
+#########################################
+
+restore [locate_data_file OCC406.brep] result
+
+set che [checkshape result]
+
+if { [regexp {Faulty} $che ] != 1 } {
+ puts "Faulty OCC406: Command checkshape works wrongly: Source shape looks invalid"
+} else {
+ puts "OCC406 OK : Source shape is invalid. Command checkshape works properly."
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts " OCC410 "
+puts "(case 3)"
+puts "========================"
+puts ""
+
+restore [locate_data_file f7] b1
+puts [checkshape b1]
+
+restore [locate_data_file f3] b2
+puts [checkshape b2]
+
+bcut result b1 b2
+
+set square 15.0891
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts " OCC410 "
+puts "(case 4)"
+puts "========================"
+puts ""
+
+restore [locate_data_file f7] b1
+puts [checkshape b1]
+
+restore [locate_data_file f3] b2
+puts [checkshape b2]
+
+
+if [catch {bcut result b2 b1 } result] {
+ puts "Faulty OCC410: function CUT works wrongly"
+} else {
+ puts " OCC410 OK: function CUT works properly"
+}
+
+set square 93.6289
+set 2dviewer 0
--- /dev/null
+
+puts "========================"
+puts " OCC416 "
+puts "CTS19305"
+puts "========================"
+puts ""
+
+restore [locate_data_file CTO900_cts19305-part.rle] part
+puts [checkshape part]
+
+restore [locate_data_file CTO900_cts19305-tool.rle] tool
+puts [checkshape tool]
+
+bcut result part tool
+
+checkshape -top result
+
+set square 76632.9
+set 2dviewer 0
+
+
--- /dev/null
+
+puts "========================"
+puts " OCC439 "
+puts "========================"
+puts ""
+#####################################################
+## Cut operation produces NOT Valid result on attached shapes
+#####################################################
+
+restore [locate_data_file OCC439.brep] a
+explode a
+
+puts [checkshape a_1]
+puts [checkshape a_2]
+
+bcut result a_1 a_2
+
+set che [checkshape result]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC134: Resulte shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC134 OK: Result shape is valid"
+}
+
+set square 247000
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_2"
+puts "TODO OCC12345 ALL: Faulty OCC446"
+###puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========"
+puts "OCC446"
+puts "OCC447"
+puts "(case 1)"
+puts "========"
+puts ""
+######################################
+## As result I have fail on shape that it is not closed.
+######################################
+
+restore [locate_data_file OCC446a.brep] result
+
+set che [checkshape result]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC446 (case 1): Source shape is NotClosed"
+} else {
+ puts "OCC446 OK (case 1): Source shape is Closed"
+}
+set square 108.845
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "OCC452"
+puts "(case 1)"
+puts "========"
+puts ""
+
+pcone pc 10 0 20
+explode pc f
+
+prism pcy pc_2 0 0 10
+
+dchrono h2 reset
+dchrono h2 start
+
+bcut result pc pcy
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 3 } {
+ puts "Elapsed time is more then 3 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 3 seconds - OK"
+}
+
+set square 254.16
+set 2dviewer 0
+
--- /dev/null
+
+puts "========"
+puts "GER60239"
+puts "OCC452"
+puts "(case 2)"
+puts "========"
+puts ""
+
+restore [locate_data_file mds-part1.rle] a
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 1): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 1): Source shape is valid"
+}
+
+restore [locate_data_file mds-part2.rle] b
+set che [checkshape b]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 2): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 2): Source shape is valid"
+}
+
+restore [locate_data_file CTO900_ger60239a.rle] c
+set che [checkshape c]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 3): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 3): Source shape is valid"
+}
+
+restore [locate_data_file CTO900_ger60239b.rle] d
+set che [checkshape d]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 4): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 4): Source shape is valid"
+}
+dchrono h2 reset
+dchrono h2 start
+
+bfuse r a b
+#checkshape r
+
+bfuse result c d
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 60 } {
+ puts "Elapsed time is more then 60 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 60 seconds - OK"
+}
+set square 3468.6
+set 2dviewer 0
--- /dev/null
+
+puts "========"
+puts "GER60239"
+puts "OCC452"
+puts "(case 3)"
+puts "========"
+puts ""
+
+restore [locate_data_file CTO900_ger60239a.rle] a
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 5): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 5): Source shape is valid"
+}
+
+restore [locate_data_file CTO900_ger60239b.rle] b
+set che [checkshape b]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 6): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 6): Source shape is valid"
+}
+
+dchrono h2 reset
+dchrono h2 start
+
+bfuse result a b
+#checkshape -top res
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 50 } {
+ puts "Elapsed time is more then 50 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 50 seconds - OK"
+}
+set square 3468.6
+set 2dviewer 0
+
+
--- /dev/null
+
+puts "========"
+puts "PRO7934"
+puts "OCC452"
+puts "(case 4)"
+puts "========"
+puts ""
+
+restore [locate_data_file CTO900_pro7934a.rle] a
+set che [checkshape a]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 7): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 7): Source shape is valid"
+}
+
+restore [locate_data_file CTO900_pro7934b.rle] b
+set che [checkshape b]
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC452 (shape 8): Source shape is invalid. It was detected by Checkshape command"
+} else {
+ puts "OCC452 OK (shape 8): Source shape is valid"
+}
+
+dchrono h2 reset
+dchrono h2 start
+
+bfuse result a b
+#checkshape -top res
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 5 } {
+ puts "Elapsed time is more then 5 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 5 seconds - OK"
+}
+set square 201978
+set 2dviewer 0
+
+
+
--- /dev/null
+
+puts "========"
+puts "OCC453"
+puts "(case 1)"
+puts "========"
+puts ""
+
+dchrono h2 reset
+dchrono h2 start
+
+set make_print_out 0
+
+dset SCALE 1000.
+dset SCALE1 5
+tolblend 0.01 1e-04 1e-05 1e-03
+
+restore [locate_data_file CFI_5_f12fgk.rle] s
+tscale s 0 0 0 SCALE1
+explode s E
+
+blend result s 0.5*SCALE1 s_1 0.5*SCALE1 s_4 0.5*SCALE1 s_12 0.5*SCALE1 s_8 0.5*SCALE1 s_6
+explode result sh
+tcopy result_1 result
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 50 } {
+ puts "Elapsed time is more then 50 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 50 seconds - OK"
+}
+set square 6021.51
+set 2dviewer 1
--- /dev/null
+
+puts "========"
+puts "OCC453"
+puts "(case 2)"
+puts "========"
+puts ""
+
+dchrono h2 reset
+dchrono h2 start
+
+set make_print_out 0
+
+dset SCALE 1000.
+dset SCALE1 5
+tolblend 0.01 1e-04 1e-05 1e-03
+
+restore [locate_data_file shading_137.brep] s
+tscale s 0 0 0 SCALE1
+explode s E
+
+ blend result s 4.5*SCALE1 s_2 4.5*SCALE1 s_1 4.5*SCALE1 s_6 4.5*SCALE1 s_8 4.5*SCALE1 s_10 4.5*SCALE1 s_14 4.5*SCALE1 s_4 4.5*SCALE1 s_5 4.5*SCALE1 s_16 4.5*SCALE1 s_11 4.5*SCALE1 s_19 4.5*SCALE1 s_13
+ explode result So
+ tcopy result_1 result
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 110 } {
+ puts "Elapsed time is more then 110 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 110 seconds - OK"
+}
+
+set square 3.65777e+06
+set 2dviewer 1
--- /dev/null
+
+puts "========"
+puts "OCC465"
+puts "========"
+puts ""
+
+restore [locate_data_file OCC465.brep] result
+
+set dum [dump result]
+
+regexp {PCurve : 1 on surface 1, range : ([-0-9.+eE]+) ([-0-9.+eE]+)} $dum full err1 err2
+regexp {Curve 3D : 1, range : ([-0-9.+eE]+) ([-0-9.+eE]+)} $dum full err3 err4
+
+if { $err1== $err3 && $err2 == $err4 } {
+ puts "Faulty OCC465: it is reset the PCurve range by range of Curve3d after restoring Curve3d"
+} else {
+ puts "OCC465 OK"
+}
+
+set length 4.21716
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_8"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========================"
+puts " OCC472 "
+puts "(case 1)"
+puts "========================"
+puts ""
+#####################################################
+## Bad result of Fuse Operation (Cut&Common - bad too). SAM1470 (#2634)
+#####################################################
+
+restore [locate_data_file OCC472a.brep] b1
+puts [checkshape b1]
+
+restore [locate_data_file OCC472b.brep] b2
+puts [checkshape b2]
+
+bcut result b1 b2
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_9"
+
+puts "========================"
+puts " OCC472 "
+puts "(case 2)"
+puts "========================"
+puts ""
+#####################################################
+## Bad result of Fuse Operation (Cut&Common - bad too). SAM1470 (#2634)
+#####################################################
+
+restore [locate_data_file OCC472a.brep] b1
+puts [checkshape b1]
+
+restore [locate_data_file OCC472b.brep] b2
+puts [checkshape b2]
+
+bcommon result b1 b2
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_8"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contains 5 vertexes instead of 6"
+
+puts "========================"
+puts " OCC472 "
+puts "(case 3)"
+puts "========================"
+puts ""
+#####################################################
+## Bad result of Fuse Operation (Cut&Common - bad too). SAM1470 (#2634)
+#####################################################
+
+restore [locate_data_file OCC472a.brep] b1
+puts [checkshape b1]
+
+restore [locate_data_file OCC472b.brep] b2
+puts [checkshape b2]
+
+bfuse result b1 b2
+
+set nb_info [nbshapes result]
+set nb_v_good 5
+set nb_e_edge 7
+
+set square 0
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_3"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========="
+puts " OCC497 "
+puts "(case 1)"
+puts "========="
+puts ""
+########################################################
+## Result of cut and fuse operation are faulty shapes although arguments are valid.
+########################################################
+
+restore [locate_data_file OCC497a.brep] a_1
+puts [checkshape a_1]
+
+restore [locate_data_file OCC497b.brep] a_2
+puts [checkshape a_2]
+
+if [catch {bcut result a_1 a_2 } catch_result] {
+ puts "Faulty OCC497:function CUT works wrongly "
+} else {
+ puts "OCC497 : function CUT works without hangs up "
+}
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Error : The command can not be build."
+
+puts "========="
+puts " OCC497 "
+puts "(case 3)"
+puts "========="
+puts ""
+########################################################
+## Result of cut and fuse operation are faulty shapes although arguments are valid.
+########################################################
+
+restore [locate_data_file OCC497e.brep] a_1
+puts [checkshape a_1]
+
+restore [locate_data_file OCC497f.brep] a_2
+puts [checkshape a_2]
+
+bcut result a_1 a_2
+
+#if { [catch { bcut result a_1 a_2 } catch_result] } {
+# puts "Faulty OCC497:function CUT works wrongly "
+#} else {
+# puts "OCC497 : function CUT works without hangs up "
+#}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+
+puts "================"
+puts "BUC60974 "
+puts " OCC57"
+puts "================"
+puts ""
+
+restore [locate_data_file BUC60974.brep] a
+explode a
+puts [checkshape a_1]
+puts [checkshape a_2]
+
+bfuse result a_1 a_2
+set square 191388
+set 2dviewer 0
--- /dev/null
+
+puts "================"
+puts "BUC60974 "
+puts " OCC57"
+puts "================"
+puts ""
+
+restore [locate_data_file BUC60974.brep] a
+explode a
+puts [checkshape a_1]
+puts [checkshape a_2]
+
+bfuse result a_2 a_1
+set square 191388
+set 2dviewer 0
--- /dev/null
+
+puts "================"
+puts "BUC60975 "
+puts " OCC59"
+puts "================"
+puts ""
+
+restore [locate_data_file BUC60975.brep] a
+explode a
+puts [checkshape a_1]
+puts [checkshape a_2]
+
+bfuse result a_1 a_2
+set square 241843
+set 2dviewer 0
--- /dev/null
+
+puts "================"
+puts "BUC60975 "
+puts " OCC59"
+puts "================"
+puts ""
+
+restore [locate_data_file BUC60975.brep] a
+explode a
+puts [checkshape a_1]
+puts [checkshape a_2]
+
+bfuse result a_2 a_1
+set square 241843
+set 2dviewer 1
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_4"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "================"
+puts "OCC62"
+puts "BUC61001"
+puts "================"
+
+cpulimit 1400
+restore [locate_data_file OCC62.brep] sh
+
+explode sh
+puts [checkshape sh]
+
+bfuse res1 sh_1 sh_3
+puts [checkshape res1]
+
+bfuse res2 res1 sh_2
+puts [checkshape res2]
+
+bfuse res3 res2 sh_6
+puts [checkshape res3]
+
+bfuse res4 res3 sh_4
+puts [checkshape res4]
+
+bfuse res5 res4 sh_5
+puts [checkshape res5]
+
+renamevar res5 result
+
+set square 0
+set 2dviewer 0
+
--- /dev/null
+puts "============"
+puts "BUC60912"
+puts "OCC83"
+puts "============"
+puts ""
+###############################
+## Section of simple BSpline surfaces is performed too slow
+###############################
+
+puts "1 case: perform section with plane"
+restore [locate_data_file BUC60912_sec_slow.brep] c
+explode c
+puts [checkshape c_1]
+puts [checkshape c_2]
+
+renamevar c_1 sh
+renamevar c_2 pr
+plane f 0 0 0 1 0 0
+mkface f f -11 11 -11 11
+
+dchrono h reset
+dchrono h start
+bsection result f pr
+
+dchrono h stop
+set q2 [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z
+puts "$z"
+if { $z > 5 } {
+ puts "Elapsed time is more then 5 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 5 - OK"
+}
+
+set length 42.879
+set 2dviewer 0
+
+
--- /dev/null
+puts "============"
+puts "BUC60912"
+puts "OCC83"
+puts "============"
+puts ""
+###############################
+## Section of simple BSpline surfaces is performed too slow
+###############################
+
+puts "2 case: perform section with planar BSpline surface"
+restore [locate_data_file BUC60912_sec_slow.brep] c
+explode c
+puts [checkshape c_1]
+puts [checkshape c_2]
+
+renamevar c_1 sh
+renamevar c_2 pr
+plane f 0 0 0 1 0 0
+mkface f f -11 11 -11 11
+
+puts "Info: perform section with planar BSpline surface"
+dchrono h2 reset
+dchrono h2 start
+bsection result sh pr
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 40 } {
+ puts "Elapsed time is more then 40 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 40 - OK"
+}
+set length 42.879
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty : Now w1,w2 have bspline curves as basic !!!"
+puts "TODO OCC12345 ALL: Error : The square of result shape is"
+
+puts "========================"
+puts " BUC60958 "
+puts " OCC87 "
+puts "========================"
+
+puts "Restoring the wires :"
+restore [locate_data_file OCC86a.brep] w1
+puts [checkshape w1]
+restore [locate_data_file OCC86b.brep] w2
+puts [checkshape w2]
+
+set first1 [dump w1]
+set second1 [dump w2]
+
+# puts "Do Thrusection by following command: thrusections res 0 0 w1 w2 "
+
+thrusections result 0 0 w1 w2
+
+set first2 [dump w1]
+set second2 [dump w2]
+
+if {$first1 != $first2 || $second1 != $second2} {
+ puts "Faulty : Now w1,w2 have bspline curves as basic !!!"
+} else {
+ puts "Correct result: Wires have circle curves as basic"
+}
+
+set square 0
+set 2dviewer 0
--- /dev/null
+puts "======================="
+puts "BUC60607"
+puts "It takes visual check for this BUC"
+puts "======================="
+
+set len_ch 2513
+
+point p 1600 300
+line l 0 500 2000 500
+cirtang c p l 400
+
+set info1 [length $c_1]
+set info2 [length $c_2]
+regexp {The length c_1 is +([-0-9.+eE]+)} $info1 full len1
+regexp {The length c_2 is +([-0-9.+eE]+)} $info2 full len2
+set len_int1 [expr int($len1)]
+set len_int2 [expr int($len2)]
+
+if { ${len_int1} != ${len_ch} || ${len_int2} != ${len_ch} } {
+ puts "Error : Length is invalid"
+}
--- /dev/null
+puts "======================="
+puts "BUC60607"
+puts "It takes visual check for this BUC"
+puts "======================="
+
+point p 1600 300
+line l 0 500 2000 500
+cirtang c1 p l 200
--- /dev/null
+puts "======================="
+puts "BUC60607"
+puts "It takes visual check for this BUC"
+puts "======================="
+
+point p2 1400 1400
+line l2 3000 1700 1000 1550
+cirtang c3 p2 l2 300
--- /dev/null
+puts "======================="
+puts "BUC60607"
+puts "It takes visual check for this BUC"
+puts "======================="
+
+point p2 1400 1400
+line l2 3000 1700 1000 1550
+cirtang result p2 l2 150
--- /dev/null
+puts "=================================="
+puts "BUC60618"
+puts "=================================="
+puts "There was a problem filter of solutions. Several solutions were skipped."
+puts ""
+puts "It takes visual check for this BUG"
+puts "=================================="
+puts ""
+set len_ch1 3568
+set len_ch2 9964
+set len_ch3 2082
+set len_ch4 32696
+set len_ch5 1681
+set len_ch6 3097
+set len_ch7 1545
+set len_ch8 772
+
+circle c1 0 0 100
+circle c2 500 -400 300
+circle c3 300 200 200
+cirtang result c1 c2 c3
+
+set info1 [length $result_1]
+set info2 [length $result_2]
+set info3 [length $result_3]
+set info4 [length $result_4]
+set info5 [length $result_5]
+set info6 [length $result_6]
+set info7 [length $result_7]
+set info8 [length $result_8]
+
+regexp {The length result_1 is +([-0-9.+eE]+)} $info1 full len1
+regexp {The length result_2 is +([-0-9.+eE]+)} $info2 full len2
+regexp {The length result_3 is +([-0-9.+eE]+)} $info3 full len3
+regexp {The length result_4 is +([-0-9.+eE]+)} $info4 full len4
+regexp {The length result_5 is +([-0-9.+eE]+)} $info5 full len5
+regexp {The length result_6 is +([-0-9.+eE]+)} $info6 full len6
+regexp {The length result_7 is +([-0-9.+eE]+)} $info7 full len7
+regexp {The length result_8 is +([-0-9.+eE]+)} $info8 full len8
+
+set len_int1 [expr int($len1)]
+set len_int2 [expr int($len2)]
+set len_int3 [expr int($len3)]
+set len_int4 [expr int($len4)]
+set len_int5 [expr int($len5)]
+set len_int6 [expr int($len6)]
+set len_int7 [expr int($len7)]
+set len_int8 [expr int($len8)]
+
+if { ${len_int1} != ${len_ch1}
+ || ${len_int2} != ${len_ch2}
+ || ${len_int3} != ${len_ch3}
+ || ${len_int4} != ${len_ch4}
+ || ${len_int5} != ${len_ch5}
+ || ${len_int6} != ${len_ch6}
+ || ${len_int7} != ${len_ch7}
+ || ${len_int8} != ${len_ch8} } {
+ puts "Error : Length is invalid"
+}
--- /dev/null
+puts "=========="
+puts "BUC60622"
+puts "=========="
+puts ""
+puts "=================================="
+puts "It takes visual check for this BUG"
+puts "=================================="
+puts ""
+
+circle c1 2900 800 500
+circle c2 2900 900 400
+circle c3 2900 1000 300
+catch {cirtang result c1 c2 c3}
+
--- /dev/null
+puts "=================================="
+puts "BUC60622"
+puts "=================================="
+puts "There was an infinity of solutions and also c1, c2 and c3 are solutions"
+puts ""
+puts "It takes visual check for this BUG"
+puts "=================================="
+puts ""
+
+set len_ch1 2513
+set len_ch2 837
+set len_ch3 279
+
+circle c1 500 1800 500
+circle c2 500 1900 400
+circle c3 700 1900 200
+cirtang result c1 c2 c3
+
+set info1 [length $result_1]
+set info2 [length $result_2]
+set info3 [length $result_3]
+regexp {The length result_1 is +([-0-9.+eE]+)} $info1 full len1
+regexp {The length result_2 is +([-0-9.+eE]+)} $info2 full len2
+regexp {The length result_3 is +([-0-9.+eE]+)} $info3 full len3
+set len_int1 [expr int($len1)]
+set len_int2 [expr int($len2)]
+set len_int3 [expr int($len3)]
+
+if { ${len_int1} != ${len_ch1}
+ || ${len_int2} != ${len_ch2}
+ || ${len_int3} != ${len_ch3} } {
+ puts "Error : Length is invalid"
+}
--- /dev/null
+puts "=================================="
+puts "BUC60622"
+puts "=================================="
+puts "There was an infinity of solutions and also c1, c2 and c3 are solutions"
+puts ""
+puts "It takes visual check for this BUG"
+puts "=================================="
+puts ""
+
+set len_ch1 1570
+set len_ch2 785
+set len_ch3 785
+set len_ch4 523
+set len_ch5 523
+
+circle c3 500 3000 250
+circle c2 375 3000 125
+circle c1 625 3000 125
+cirtang result c1 c2 c3
+
+set info1 [length $result_1]
+set info2 [length $result_2]
+set info3 [length $result_3]
+set info4 [length $result_4]
+set info5 [length $result_5]
+
+regexp {The length result_1 is +([-0-9.+eE]+)} $info1 full len1
+regexp {The length result_2 is +([-0-9.+eE]+)} $info2 full len2
+regexp {The length result_3 is +([-0-9.+eE]+)} $info3 full len3
+regexp {The length result_4 is +([-0-9.+eE]+)} $info4 full len4
+regexp {The length result_5 is +([-0-9.+eE]+)} $info5 full len5
+
+set len_int1 [expr int($len1)]
+set len_int2 [expr int($len2)]
+set len_int3 [expr int($len3)]
+set len_int4 [expr int($len4)]
+set len_int5 [expr int($len5)]
+
+if { ${len_int1} != ${len_ch1}
+ || ${len_int2} != ${len_ch2}
+ || ${len_int3} != ${len_ch3}
+ || ${len_int4} != ${len_ch4}
+ || ${len_int5} != ${len_ch5} } {
+ puts "Error : Length is invalid"
+}
+
--- /dev/null
+puts "========================"
+puts "BUC60623"
+puts "========================"
+
+restore [locate_data_file buc60623a.brep] a
+puts [checkshape a]
+restore [locate_data_file buc60623b.brep] b
+puts [checkshape b]
+
+mksurface S1 a
+mksurface S2 b
+
+intersect I1 S1 S2
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection I1] full cs2
+if { $cs2 != 0 } {
+ puts " Faulty : Intersection is not correct"
+} else {
+ puts "Intersection of S1 and S2 is correct"
+}
+
+intersect I2 S2 S1
+regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection I2] full cs2
+if { $cs2 != 0 } {
+ puts " Faulty : Intersection is not correct"
+} else {
+ puts "Intersection of S2 and S1 is correct"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "=================================="
+puts "BUC60654"
+puts "=================================="
+puts ""
+##########################################################
+## Raises exception in GCPnts_AbscissaPoint on a Geom2d_OffsetCurve
+##########################################################
+
+set len_ch 4.0000000000000001e+100
+
+line line_2d 0 0 1 1
+
+offset result line_2d 10 1 0
+
+set info [length $result]
+regexp {The length result is +([-0-9.+eE]+)} $info full len
+
+if { ${len} != ${len_ch} } {
+ puts "Error : length is invalid"
+}
+
--- /dev/null
+puts "========================"
+puts "BUC60792"
+puts "========================"
+
+pload QAcommands
+
+vinit
+BUC60792
+
+set 2dviewer 0
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty BUC60815: NO EXCEPTION."
+puts "=========="
+puts "BUC60815"
+puts "=========="
+
+plane p1 1 0 0
+plane p2 0 0 0 1 0 0
+trim p1 p1 -50 50 -50 50
+trim p2 p2 -75 75 -75 75
+intersect r2 p1 p2
+extsurf e1 r2 10 10 10
+extsurf e3 r2 10 10 10
+
+if [catch { intersect result e1 e3 } catch_result] {
+ puts "Faulty BUC60815: NO EXCEPTION."
+ puts "INTERSECTION BETWEEN TWO SURFACES LYING ON THE SAME PLANE UNDEFINED"
+} else {
+ puts "BUC60815 OK: suitable except"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========"
+puts "BUC60843"
+puts "========"
+puts ""
+####################################################################
+## code throws an exception as: .. The exception is:0x5feff388 : StdFail_NotDone: 2d lin = lintan.
+## ThisSolution(); is not right.( the line is not tangent to circle and ellipse )
+####################################################################
+
+pload QAcommands
+
+set len_ch 4.0000000000000001e+100
+
+circle test_circle 0 0 50
+ellipse test_ellipse 460 0 150 100
+
+BUC60843 result test_circle test_ellipse 0.1
+
+set info [length $result]
+regexp {The length result is +([-0-9.+eE]+)} $info full len
+
+if { ${len} != ${len_ch} } {
+ puts "Error : length is invalid"
+}
--- /dev/null
+puts "========"
+puts "BUC60843"
+puts "========"
+puts ""
+####################################################################
+## code throws an exception as: .. The exception is:0x5feff388 : StdFail_NotDone: 2d lin = lintan.
+## ThisSolution(); is not right.( the line is not tangent to circle and ellipse )
+####################################################################
+
+pload QAcommands
+
+set len_ch 4.0000000000000001e+100
+
+ellipse test_ellipse_1 0 0 50 50
+ellipse test_ellipse_2 460 0 150 100
+
+BUC60843 result test_ellipse_1 test_ellipse_2 1.0 1.0
+
+set info [length $result]
+regexp {The length result is +([-0-9.+eE]+)} $info full len
+
+if { ${len} != ${len_ch} } {
+ puts "Error : length is invalid"
+}
+
--- /dev/null
+puts "========"
+puts "BUC60890"
+puts "========"
+puts ""
+#####################################################
+## The Extrema raises when the number of C2 intervals is greater that 16.
+#####################################################
+
+set poles { { 0 0 1 } { 1 0 1 } { 1.3 1 1 } { 2 1 1 } { 2 0 1 } { 3 0 1} { 3.5 1 1 } { 4 1 1 } { 4 0 1 } { 5 0 1 } { 5 1 1 } { 6 1 1 } { 6 0 1 } { 7 0 1 } { 7 1 1 } { 8 1 1 } { 8 0 1 } { 9 0 1 } }
+set knots { { 0 2 } { 1 1 } { 2 1 } { 3 1 } { 4 1 } { 5 1 } { 6 1 } { 7 1 } { 8 1 } { 9 1 } { 10 1 } { 11 1 } { 12 1 } { 13 1 } { 14 1 } { 15 1 } { 16 1 } {17 2 } }
+
+eval 2dbsplinecurve curve_1 1 [ llength $knots] [ join $knots ] [ join $poles ]
+
+circle curve_2 5.3 -0.5 2
+
+set err [llength [2dextrema curve_1 curve_2]]
+
+if {$err == 16} {
+ puts "BUC60890 OK: Function 2dextrema works properly."
+} else {
+ puts "Faulty BUC60890 : Function 2dextrema works wrongly."
+}
--- /dev/null
+puts "========"
+puts "BUC60902"
+puts "========"
+
+pload QAcommands
+
+set info [BUC60902]
+
+if { [regexp "First tangent is OK" $info] != 1 && [regexp "Last tangent is OK" $info] != 1 } {
+ puts "Error : Result is invalid"
+}
+
+
+
--- /dev/null
+puts "========"
+puts "BUC60941"
+puts "========"
+puts ""
+############################################################
+## When try to use Geom2dGcc_Circ2d2TanRad with two curves it rise exception.
+############################################################
+
+circle curve_1 1.79356127430613 -11.9148900515605 12.0491272292007
+
+set poles { { 0 0 1 } { -2.14533906935467 4.92056269221697 1 } { -0.537398638327716 10.0937503357781 1 } { 10.3564232507092 8.73929826869582 1 } { 16.6366922939454 3.11858911810943 1 } { 16.39 -0.262 1 } }
+set knots { { 0 4 } { 8.6971225126475 1 } { 16.903955884905 1 } { 28.0087167558108 4 } }
+
+eval 2dbsplinecurve curve_2 3 [ llength $knots ] [ join $knots ] [ join $poles ]
+
+if [catch {cirtang result curve_1 curve_2 2} catch_result] {
+ puts "Faulty BUC60941: function cirtang works wrongly"
+} else {
+ puts "BUC60941 OK: function cirtang works properly"
+}
--- /dev/null
+puts "================"
+puts "OCC119"
+puts "================"
+puts ""
+
+box a 100 100 100
+explode a e
+
+set mistake 0
+if [catch {blend result_1 a 50 a_10 50 a_5 50 a_12 50 a_3 } catch_result] {
+ set mistake 1
+} else {
+ set mistake 0
+}
+
+if { ${mistake} == 1} {
+ puts " 1) OCC119 OK: BLEND was NOT created and suitable except was given."
+} else {
+ puts "1) OCC119 OK: function BLEND works without suitable except"
+ puts [checkshape result_1]
+ explode result_1 e
+
+ if { [catch {blend result_2 result_1 50 result_1_20 50 result_1_22 50 result_1_10} catch_result] } {
+ puts "2) Faulty OCC119: BLEND was NOT created"
+ } else {
+ puts "2) BLEND OCC199 OK: BLEND was created"
+ puts [checkshape result_2]
+ }
+
+ set che [checkshape result_2 r]
+ if { [regexp {OK} $che] != 1 } {
+ puts "Faulty : mistakes are found in shape by checkshape command after BLEND command"
+ puts " Body of the scripts was not executed !"
+ } else {
+ puts "Checking by checkshape - OK"
+
+ vinit
+ vdisplay result_2
+ vsetdispmode result_2 1
+ vfit
+
+ explode result_2 e
+ blend result result_2 50 result_2_20 50 result_2_22 50 result_2_10
+ set only_screen 1
+ }
+}
--- /dev/null
+puts "================"
+puts "OCC139"
+puts "================"
+puts ""
+#######################################
+## The intersection must be closed . So the curve is wrong.
+#######################################
+
+restore [locate_data_file OCC139-1.draw] sh1
+restore [locate_data_file OCC139-2.draw] sh2
+
+if { ![catch {intersect result sh1 sh2} catch_result] } {
+ puts "OCC139 OK : intersection found"
+ regexp { nb alone Vertices : +([-0-9.+eE]+)} [checksection result] full num
+ if { $num != 0 } {
+ puts "Faulty OCC139: Intersection was made WRONGLY. The curve must be closed ."
+ } else {
+ puts "OCC139 OK : Intersection command works properly. The curve is closed"
+ }
+} else {
+ puts "Faulty OCC139 : NO intersection found"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "================"
+puts "BUC60654"
+puts "OCC143"
+puts "================"
+puts ""
+######################################################################
+## Raises exception "Standard_NotImplemented3" in GCPnts_AbscissaPoint on a Geom2d_OffsetCurve
+######################################################################
+
+set len_ch 4.0000000000000001e+100
+line line_2d 0 0 1 1
+
+offset result line_2d 10 1 0
+
+set info [length $result]
+regexp {The length result is +([-0-9.+eE]+)} $info full len
+
+if { ${len} != ${len_ch} } {
+ puts "Error : Length is invalid"
+}
--- /dev/null
+puts "========"
+puts "OCC231"
+puts "========"
+puts ""
+
+#############################################
+##Uncorrect work DRAW command "proj" in version dev
+## and receive such result:
+## in dev : ext_1 ext_2 ext_3
+## in C40 : ext_1 ext_2 ext_3 ext_4
+#############################################
+
+restore [locate_data_file OCC231.draw] result
+
+set str [proj result 1751.38 614.152 -180.331]
+set err [llength $str]
+
+if { $err < 4 } {
+ puts "Faulty OCC231: Projection was made wrongly"
+} else {
+ puts "OCC231 OK: Projection was made properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "================"
+puts "OCC235"
+puts "================"
+puts ""
+#######################################################
+## Intersection algorithm finds two intersection curves. One curve is closed while
+## second is not (the distance between first and last points is 2e-5).
+#######################################################
+
+restore [locate_data_file OCC235a.rle] su1
+############### checkshape su1 # is not a topological shape
+restore [locate_data_file OCC235b.rle] su2
+############### checkshape su2 # is not a topological shape
+
+intersect result su1 su2
+
+set dir [directory]
+set nb_result [regexp -all {result} $dir]
+if { $nb_result != 2 } {
+ puts "Faulty OCC235 (first checking): Intersection was made WRONGLY"
+} else {
+ puts "OCC235 OK (first checking) : Intersection command works properly"
+
+ regexp {nb +alone +Vertices +: +([-0-9.+eE]+)} [checksection result_1] full num_1
+ if { $num_1 != 0 } {
+ puts " Faulty OCC235 (second checking): Result result_1 is UNclosed !!! "
+ } else {
+ puts " OCC235 OK (second checking): Result result_1 is closed !!! "
+ }
+
+ regexp {nb +alone +Vertices +: +([-0-9.+eE]+)} [checksection result_2] full num_2
+ if { $num_2 != 0 } {
+ puts " Faulty OCC235 (second checking): Result result_2 is UNclosed !!! "
+ } else {
+ puts " OCC235 OK (second checking): Result result_2 is closed !!! "
+ }
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC236"
+
+puts "================"
+puts "OCC236"
+puts "================"
+puts ""
+#######################################################
+##Result of intersection of two surfaces of linear extrusion is incorrect.
+#######################################################
+
+restore [locate_data_file OCC236a.rle] su1
+############### checkshape su1 # is not a topological shape
+restore [locate_data_file OCC236b.rle] su2
+############### checkshape su2 # is not a topological shape
+
+intersect result su1 su2
+
+set che [directory]
+set err [lindex $che [expr [llength $che] - 1]]
+if { $err != "result_2"} {
+ puts "Faulty OCC236"
+} else {
+ puts "OCC236 OK (first checking) : Intersection command works properly"
+ regexp {nb +alone +Vertices +: +([-0-9.+eE]+)} [checksection result_1] full num
+ if { $num != 0 } {
+ puts " Faulty OCC236 (second checking): Result result_1 is UNclosed !!! "
+ } else {
+ puts " OCC236 OK (second checking): Result result_1 is closed !!! "
+ puts ""
+ }
+ regexp {nb +alone +Vertices +: +([-0-9.+eE]+)} [checksection result_2] full num
+ if { $num != 0 } {
+ puts " Faulty OCC236 (second checking): Result result_2 is UNclosed !!! "
+ } else {
+ puts " OCC236 OK (second checking): Result result_2 is closed !!! "
+ }
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "================"
+puts "OCC237"
+puts "================"
+puts ""
+#######################################################
+## Hang-ups during the intersection of attached surfaces
+#######################################################
+
+restore [locate_data_file OCC236b.rle] su1
+############### checkshape su1 # is not a topological shape
+restore [locate_data_file OCC237b.rle] su2
+############### checkshape su2 # is not a topological shape
+
+if [catch {intersect result su1 su2 }] {
+ set mistake 1
+} else {
+ set mistake 0
+}
+
+if { $mistake != 0} {
+ puts "Faulty OCC237: Intersection was made WRONGLY"
+} else {
+ puts "OCC237 OK : Intersection command works properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "================"
+puts "OCC25"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC25-1.brep] sh1
+
+decho off
+set che [checkshape sh1]
+decho on
+
+if { [regexp {Faulty} $che ] == 1 } {
+ puts "Faulty OCC25 (case 1): Checkshape says that the wire on face has bad orientation, but it is not truth"
+} else {
+ puts "OCC25 OK (case 1): Checkshape works properly"
+}
+
+# ================================================
+restore [locate_data_file OCC25-2.brep] sh2
+
+decho off
+set che [checkshape sh2]
+decho on
+
+if { [regexp {BRepCheck_BadOrientationOfSubshape} $che] && [regexp {BRepCheck_UnorientableShape} $che]} {
+ puts " OCC25 (case 2) OK: Checkshape works properly"
+} else {
+ puts "Faulty OCC25 (case 2): Checkshape works wrongly"
+}
+
+compound sh1 sh2 result
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "========"
+puts "OCC253"
+puts "========"
+
+######################################################
+## Exception while segment operation on periodic BSpline curve.
+## More over it seems that command segment in Draw doesnot work.
+######################################################
+
+restore [locate_data_file OCC253.draw] result
+############### checkshape c1 # is not a topological shape
+
+smallview -2D-
+
+#store dump of initial curve
+set init_dump [dump result]
+
+set ufirst 0.500000000000006
+set ulast 1.00000000015925
+catch { segment result $ufirst $ulast }
+
+#compare dump of initial curve and dump of result one
+set result_dump [dump result]
+if { $init_dump == $result_dump} {
+ puts "Faulty OCC253: command segment does NOT do anything"
+}
+
+#retrieve amount of knots of result curve from dump
+regexp { +Degree +[-0-9.+eE]+, +[-0-9.+eE]+ +Poles, +([-0-9.+eE]+) +KnotsPoles +:} $result_dump full KnotsNumber
+#create string to be found in result dump
+set trueLastKnot "$KnotsNumber : 1.00000000015925 "
+
+#verify parametrization of result curve
+if { [regexp "1 : 0.500000000000006 " $result_dump] && [regexp $trueLastKnot $result_dump]} {
+ puts " OCC253 is OK: command segment works properly"
+} else {
+ puts "Faulty OCC253: parametrization of result curve is wrong"
+}
+
+2dfit
+set 2dviewer 0
+
+
--- /dev/null
+puts "========"
+puts "OCC265"
+puts "========"
+puts ""
+###############################################
+##Exception while projecting hyperbola on plane.
+###############################################
+
+restore [locate_data_file OCC265-hyperbola.draw] hyperbola
+restore [locate_data_file OCC265-plane.draw] plane
+
+projonplane result hyperbola plane
+
+set 2dviewer 0
+
+
--- /dev/null
+
+puts "========================"
+puts " OCC271 "
+puts "========================"
+puts ""
+
+restore [locate_data_file OCC271a.rle] su1
+restore [locate_data_file OCC271b.rle] su2
+
+set U1 2.315721254379057e-16
+set U2 0.01131870392278708
+set V1 226.9760100729095
+set V2 203.7283534809051
+
+intersect result su1 su2 $U1 $V1 $U2 $V2
+
+set che [whatis result]
+
+if { ![regexp {3d} $che] || ![regexp {curve} $che]} {
+ puts "Faulty OCC271: command INTERSECT works wrongly"
+} else {
+ puts "OCC271 OK : command INTERSECT works properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========"
+puts "OCC284"
+puts "========"
+
+#########################################################
+## Command "checkshape" "gives" exception during attempt to check attached shape.
+#########################################################
+
+restore [locate_data_file OCC284.brep] result
+
+decho off
+if [catch { checkshape result } catch_result] {
+ set mistake 1
+} else {
+ set mistake 0
+}
+decho on
+
+if { $mistake != 0} {
+ puts "Faulty OCC284 : here is problem in checkshape function"
+} else {
+ puts "OCC284 OK: function checkshape works properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty OCC286: Attempt to project the point on surface gives wrong result."
+puts "========================"
+puts " OCC286 "
+puts "========================"
+puts ""
+
+restore [locate_data_file OCC286a.draw] a
+restore [locate_data_file OCC286b.draw] b
+
+intersect i a b
+cvalue i 0.31 x y z
+point p x y z
+proj b x y z
+
+set err1 ""
+set err2 ""
+set err3 ""
+regexp {Point +: +([-0-9.+eE]+, +[-0-9.+eE]+, +[-0-9.+eE]+)} [dump ext_1] full err1
+regexp {Point +: +([-0-9.+eE]+, +[-0-9.+eE]+, +[-0-9.+eE]+)} [dump ext_2] full err2
+regexp {Point +: +([-0-9.+eE]+, +[-0-9.+eE]+, +[-0-9.+eE]+)} [dump ext_3] full err3
+
+if { $err1 == $err2 || $err1 == $err3 || $err2 == $err3 } {
+ puts "Faulty OCC286: Attempt to project the point on surface gives wrong result."
+} else {
+ puts "OCC286 OK : Attempt to project the point on surface gives correct result"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts " OCC303 "
+puts "(case 1)"
+puts "========================"
+puts ""
+#################################################################
+## Exception while segment operation.
+#################################################################
+
+restore [locate_data_file OCC303a.brep] sh1
+
+explode sh1 e
+
+mkcurve c5 sh1_5
+trim result c5
+
+if [catch {segment result 22.07126804854423 23.6320483505636} catch_result] {
+ puts "Faulty OCC303 (case 1): function SEGMENT works wrongly"
+} else {
+ puts "OCC303 OK (case 1): function SEGMENT works properly"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts " OCC303 "
+puts "(case 2)"
+puts "========================"
+puts ""
+#################################################################
+## Exception while segment operation.
+#################################################################
+
+restore [locate_data_file OCC303b.brep] sh1
+
+explode sh1 e
+
+mkcurve c1 sh1_1
+trim result c1
+
+if [catch {segment result 23.09944997429109 23.6320483505636} catch_result] {
+ puts "Faulty OCC303 (case 2): function SEGMENT works wrongly"
+} else {
+ puts "OCC303 OK (case 2): function SEGMENT works properly"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "==========="
+puts " OCC308 "
+puts "==========="
+puts ""
+#################################################################
+## Can not project 3D-curve on surface.
+#################################################################
+
+restore [locate_data_file OCC308a.draw] a
+restore [locate_data_file OCC308b.draw] b
+
+if [catch {project result a b} catch_result] {
+ set mistake 1
+} else {
+ set mistake 0
+}
+
+if { $mistake == 0} {
+ puts "Faulty OCC308 : function PROJECT works wrongly"
+} else {
+ puts "OCC308 OK : function PROJECT works properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========"
+puts "OCC311"
+puts "========"
+
+restore [locate_data_file OCC311.draw] c
+#### checkshape c # - not a topological shape
+
+set ufirst 1e-7
+set ulast 6.2831854071795901
+
+segment c ${ufirst} ${ulast}
+
+set dumpc [dump c]
+
+set list [split ${dumpc} "\n\t"]
+set listLength [llength ${list}]
+if { ${listLength} < 25 } {
+ puts "OCC311 - Error : listLength= ${listLength}"
+}
+
+regexp { +Degree +([-0-9.+eE]+), +([-0-9.+eE]+) +Poles, +([-0-9.+eE]+) +Knots} $dumpc full DegreeNumber PolesNumber KnotsNumber
+
+set Knots [regexp -all -inline { +([-0-9.+eE]+ +: +[-0-9.+eE]+ +[-0-9.+eE]+)} $dumpc]
+regexp { *[-0-9.+eE]+ +: +([-0-9.+eE]+) +[-0-9.+eE]+} [lindex $Knots 1] full FirstKnot
+regexp { *[-0-9.+eE]+ +: +([-0-9.+eE]+) +[-0-9.+eE]+} [lindex $Knots [llength $Knots]-1] full LastKnot
+
+set delta_first [expr abs(${FirstKnot} - ${ufirst}) / ${ufirst} * 100]
+set delta_last [expr abs(${LastKnot} - ${ulast}) / ${ulast} * 100]
+
+set maxdelta 0.01
+
+puts "FirstKnot = ${FirstKnot}"
+puts "LastKnot = ${LastKnot}"
+
+if { ${delta_first} > ${maxdelta} } {
+ puts "OCC311 - Error : delta_first = ${delta_first}"
+}
+if { ${delta_last} > ${maxdelta} } {
+ puts "OCC311 - Error : delta_last = ${delta_last}"
+}
+
+if { ${delta_first} <= ${maxdelta} && ${delta_last} <= ${maxdelta} } {
+ puts "OCC311: OK"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========"
+puts "OCC311"
+puts "========"
+
+restore [locate_data_file OCC311.draw] c
+#### checkshape c # - not a topological shape
+
+set ufirst 1e-7
+set ulast 6.2831854071795897
+
+segment c ${ufirst} ${ulast}
+
+set dumpc [dump c]
+
+set list [split ${dumpc} "\n\t"]
+set listLength [llength ${list}]
+if { ${listLength} < 25 } {
+ puts "OCC311 - Error : listLength= ${listLength}"
+}
+
+regexp { +Degree +([-0-9.+eE]+), +([-0-9.+eE]+) +Poles, +([-0-9.+eE]+) +Knots} $dumpc full DegreeNumber PolesNumber KnotsNumber
+
+set Knots [regexp -all -inline { +([-0-9.+eE]+ +: +[-0-9.+eE]+ +[-0-9.+eE]+)} $dumpc]
+regexp { *[-0-9.+eE]+ +: +([-0-9.+eE]+) +[-0-9.+eE]+} [lindex $Knots 1] full FirstKnot
+regexp { *[-0-9.+eE]+ +: +([-0-9.+eE]+) +[-0-9.+eE]+} [lindex $Knots [llength $Knots]-1] full LastKnot
+
+set delta_first [expr abs(${FirstKnot} - ${ufirst}) / ${ufirst} * 100]
+set delta_last [expr abs(${LastKnot} - ${ulast}) / ${ulast} * 100]
+
+set maxdelta 0.01
+
+puts "FirstKnot = ${FirstKnot}"
+puts "LastKnot = ${LastKnot}"
+
+if { ${delta_first} > ${maxdelta} } {
+ puts "OCC311 - Error : delta_first = ${delta_first}"
+}
+if { ${delta_last} > ${maxdelta} } {
+ puts "OCC311 - Error : delta_last = ${delta_last}"
+}
+
+if { ${delta_first} <= ${maxdelta} && ${delta_last} <= ${maxdelta} } {
+ puts "OCC311: OK"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========================"
+puts " OCC324 "
+puts "========================"
+puts ""
+#################################################################
+## The command "intersect" applied to the given arguments "s1" (plane) and "s2" (cylinder) leads
+## to the program hang-up.
+#################################################################
+
+restore [locate_data_file OCC324a.draw] s1
+restore [locate_data_file OCC324b.draw] s2
+
+if [catch {intersect result s1 s2} catch_result] {
+ puts "Faulty OCC324: function INTERSECT works wrongly"
+} else {
+ puts "OCC324 OK: function INTERSECT works properly"
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts " OCC325 "
+puts "========================"
+puts ""
+##################################################
+## Checkshape does not recognize an error in a bad face
+##################################################
+
+restore [locate_data_file OCC325.brep] result
+
+decho off
+set che [checkshape result]
+decho on
+
+if { [regexp {Faulty} $che ] != 1} {
+ puts "Faulty OCC325: Checkshape command works wrongly"
+} else {
+ puts "OCC325 OK : Checkshape command works properly"
+}
+
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "OCC326"
+puts "================"
+puts ""
+###########################################################
+## Exception is raised in sewing on internal edges on attached shape
+###########################################################
+
+restore [locate_data_file OCC326.brep] a
+
+if [catch { sewing result a } catch_result] {
+ puts "Faulty OCC326: here is sewing problem"
+} else {
+ puts "OCC326 OK: Sewing is ok, there is no except"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "================"
+puts "OCC332"
+puts "================"
+puts ""
+
+pload QAcommands
+
+set wall_thickness 10
+set dia1 30
+set dia2 50
+set length 100
+set major_radius 200
+
+OCC332 ${wall_thickness} ${dia1} ${dia2} ${length} ${major_radius}
+
+puts [checkshape wallSolid_]
+puts [checkshape gasSolid_]
+
+
+vinit
+vdisplay wallSolid_
+vdisplay gasSolid_
+QAvzfit
+
+
+explode wallSolid_ w
+
+vdisplay wallSolid__3
+vdisplay wallSolid__4
+vdisplay wallSolid__5
+vdisplay wallSolid__6
+
+set props_3 [lprops wallSolid__3]
+set props_4 [lprops wallSolid__4]
+set props_5 [lprops wallSolid__5]
+set props_6 [lprops wallSolid__6]
+
+#wire wallSolid__3
+set list [split ${props_3} "\n\t"]
+set listLength [llength ${list}]
+if { ${listLength} < 20 } {
+ puts "OCC332 - Error : listLength= ${listLength}"
+}
+
+regexp {Mass +: +([-0-9.+eE]+)} $props_3 full CircleLength_3
+
+#wire wallSolid__4
+set list [split ${props_4} "\n\t"]
+set listLength [llength ${list}]
+if { ${listLength} < 20 } {
+ puts "OCC332 - Error : listLength= ${listLength}"
+}
+
+regexp {Mass +: +([-0-9.+eE]+)} $props_4 full CircleLength_4
+
+#wire wallSolid__5
+set list [split ${props_5} "\n\t"]
+set listLength [llength ${list}]
+if { ${listLength} < 20 } {
+ puts "OCC332 - Error : listLength= ${listLength}"
+}
+
+regexp {Mass +: +([-0-9.+eE]+)} $props_5 full CircleLength_5
+
+#wire wallSolid__6
+set list [split ${props_6} "\n\t"]
+set listLength [llength ${list}]
+if { ${listLength} < 20 } {
+ puts "OCC332 - Error : listLength= ${listLength}"
+}
+
+regexp {Mass +: +([-0-9.+eE]+)} $props_6 full CircleLength_6
+
+# Calculation
+set pi [expr 2. * asin(1.0)]
+set TheoryCircleLength_4 [expr ${pi} * ${dia1}]
+set TheoryCircleLength_3 [expr ${pi} * (${dia1} + 2 * ${wall_thickness}) ]
+set TheoryCircleLength_6 [expr ${pi} * ${dia2}]
+set TheoryCircleLength_5 [expr ${pi} * (${dia2} + 2 * ${wall_thickness}) ]
+
+set delta_3 [expr abs(${CircleLength_3} - ${TheoryCircleLength_3}) / ${TheoryCircleLength_3} * 100]
+set delta_4 [expr abs(${CircleLength_4} - ${TheoryCircleLength_4}) / ${TheoryCircleLength_4} * 100]
+set delta_5 [expr abs(${CircleLength_5} - ${TheoryCircleLength_5}) / ${TheoryCircleLength_5} * 100]
+set delta_6 [expr abs(${CircleLength_6} - ${TheoryCircleLength_6}) / ${TheoryCircleLength_6} * 100]
+
+set maxdelta 0.1
+
+if { ${delta_3} > ${maxdelta} } then {puts "OCC332 - Error : delta_3= ${delta_3}"}
+if { ${delta_4} > ${maxdelta} } then {puts "OCC332 - Error : delta_4= ${delta_4}"}
+if { ${delta_5} > ${maxdelta} } then {puts "OCC332 - Error : delta_5= ${delta_5}"}
+if { ${delta_6} > ${maxdelta} } then {puts "OCC332 - Error : delta_6= ${delta_6}"}
+
+if { ${delta_3} <= ${maxdelta} && ${delta_4} <= ${maxdelta} && ${delta_5} <= ${maxdelta} && ${delta_6} <= ${maxdelta} } then {
+ puts "OCC332: OK"
+}
+puts "CircleLength_3 = ${CircleLength_3}"
+puts "CircleLength_4 = ${CircleLength_4}"
+puts "CircleLength_5 = ${CircleLength_5}"
+puts "CircleLength_6 = ${CircleLength_6}"
+
+set only_screen 1
+
+
+
--- /dev/null
+puts "================"
+puts "OCC333"
+puts "================"
+puts ""
+#######################################################
+## Superimposed curves during intersection two surfaces
+#######################################################
+
+pload QAcommands
+
+restore [locate_data_file OCC333a.draw] s12
+############### checkshape su12 # is not a topological shape
+restore [locate_data_file OCC333b.draw] s11
+############### checkshape su11 # is not a topological shape
+intersect result s12 s11
+explode result e
+clknots result_3
+clknots result_13
+
+mkedge e_1 result_3
+mkedge e_2 result_13
+
+set status [OCC333 e_1 e_2]
+if {[llength ${status}] < 1} {
+ puts "OCC333 ERROR"
+} else {
+ regexp {([-0-9.+eE]+)} ${status} full code
+ if { ${code} == 3 || ${code} == 2} {
+ puts "OCC333 OK : Intersection command works properly"
+ } else {
+ puts "Faulty OCC333 : Intersection was made WRONGLY"
+ }
+}
+
+donly i_3 i_13
+
+set 2dviewer 0
--- /dev/null
+puts "================"
+puts "BUC61039"
+puts "OCC343"
+puts "================"
+puts ""
+
+cpulimit 9000
+pload XDE
+if [catch {igesbrep [locate_data_file lh3d_px1.igs] a *} catch_result] {
+ puts "Faulty OCC343: here is reading problem"
+} else {
+ puts "Reading OCC343 OK"
+ tpcompound a
+ #
+ # First sewing
+ #
+ sewing result1 100. a
+
+ set FaceList [explode result1 f]
+ set FaceListLength [llength ${FaceList}]
+ if { ${FaceListLength} < 1 } {
+ puts "OCC343 - Error : FaceListLength= ${FaceListLength}"
+ }
+
+ set X_List1 [list]
+ set Y_List1 [list]
+ set Z_List1 [list]
+ for {set i 1} {${i} <= ${FaceListLength}} {incr i} {
+ set props [sprops result1_${i}]
+ set list [split ${props} "\n\t"]
+ set listLength [llength ${list}]
+ if { ${listLength} < 20 } {
+ puts "OCC343 - Error : listLength= ${listLength}"
+ }
+ set Center_Gravity_X [lindex ${list} 5]
+ set Center_Gravity_Y [lindex ${list} 6]
+ set Center_Gravity_Z [lindex ${list} 7]
+
+ set Center_Gravity_X [lindex [split ${Center_Gravity_X}] [expr [llength [split ${Center_Gravity_X}] ] - 1] ]
+ set Center_Gravity_Y [lindex [split ${Center_Gravity_Y}] [expr [llength [split ${Center_Gravity_Y}] ] - 1] ]
+ set Center_Gravity_Z [lindex [split ${Center_Gravity_Z}] [expr [llength [split ${Center_Gravity_Z}] ] - 1] ]
+
+ lappend X_List1 ${Center_Gravity_X}
+ lappend Y_List1 ${Center_Gravity_Y}
+ lappend Z_List1 ${Center_Gravity_Z}
+ }
+
+ vinit
+ vdisplay result1
+ vfit
+
+ set CycleNumber 10
+ for {set j 1} {${j} <= ${CycleNumber}} {incr j} {
+ veraseall
+ #
+ # Second sewing
+ #
+
+ if [catch {igesbrep [locate_data_file lh3d_px1.igs] a *} catch_result] {
+ puts "Faulty OCC343: here is reading problem"
+ } else {
+ puts "Reading OCC343 OK"
+ }
+
+ tpcompound a
+ sewing result2 100. a
+
+ set FaceList [explode result2 f]
+ set FaceListLength [llength ${FaceList}]
+ if { ${FaceListLength} < 1 } then {puts "OCC343 - Error : FaceListLength= ${FaceListLength}"}
+
+ set X_List2 [list]
+ set Y_List2 [list]
+ set Z_List2 [list]
+ for {set i 1} {${i} <= ${FaceListLength}} {incr i} {
+ set props [sprops result2_${i}]
+ set list [split ${props} "\n\t"]
+ set listLength [llength ${list}]
+ if { ${listLength} < 20 } {
+ puts "OCC343 - Error : listLength= ${listLength}"
+ }
+
+ set Center_Gravity_X [lindex ${list} 5]
+ set Center_Gravity_Y [lindex ${list} 6]
+ set Center_Gravity_Z [lindex ${list} 7]
+
+ set Center_Gravity_X [lindex [split ${Center_Gravity_X}] [expr [llength [split ${Center_Gravity_X}] ] - 1] ]
+ set Center_Gravity_Y [lindex [split ${Center_Gravity_Y}] [expr [llength [split ${Center_Gravity_Y}] ] - 1] ]
+ set Center_Gravity_Z [lindex [split ${Center_Gravity_Z}] [expr [llength [split ${Center_Gravity_Z}] ] - 1] ]
+
+ lappend X_List2 ${Center_Gravity_X}
+ lappend Y_List2 ${Center_Gravity_Y}
+ lappend Z_List2 ${Center_Gravity_Z}
+ }
+
+ set ListLength [llength ${X_List1}]
+ if { ${ListLength} != [llength ${Y_List1}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
+ if { ${ListLength} != [llength ${Z_List1}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
+ if { ${ListLength} != [llength ${X_List2}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
+ if { ${ListLength} != [llength ${Y_List2}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
+ if { ${ListLength} != [llength ${Z_List2}] } then {puts "OCC343 - Error : ListLength= ${ListLength}"}
+
+ for {set i 0} {${i} < ${ListLength}} {incr i} {
+ set X1 [lindex ${X_List1} ${i}]
+ set X2 [lindex ${X_List2} ${i}]
+ if { ${X1} != ${X2} } {
+ puts "OCC343 - Error : X1= ${X1} X2= ${X2}"
+ }
+ set Y1 [lindex ${Y_List1} ${i}]
+ set Y2 [lindex ${Y_List2} ${i}]
+ if { ${Y1} != ${Y2} } {
+ puts "OCC343 - Error : Y1= ${Y1} Y2= ${Y2}"
+ }
+ set Z1 [lindex ${Z_List1} ${i}]
+ set Z2 [lindex ${Z_List2} ${i}]
+ if { ${Z1} != ${Z2} } {
+ puts "OCC343 - Error : Z1= ${Z1} Z2= ${Z2}"
+ }
+ }
+
+ tclean result1
+ vdisplay result1
+ vfit
+ }
+}
+
+set only_screen 1
+
+
+
+
--- /dev/null
+puts "========"
+puts "OCC36"
+puts "========"
+
+pload XDE
+
+if [catch { igesbrep [locate_data_file OCC36.igs] a * } res] {
+ puts "Warning OCC36: here is reading problem"
+} else {
+ puts "Reading OCC36 OK"
+
+ tpcompound r
+ dchrono h2 reset
+ dchrono h2 start
+ sewing result 1.e-7 r
+ dchrono h2 stop
+ set q2 [ dchrono h2 show ]
+ regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+ puts "$z2"
+ if { $z2 > 30 } {
+ puts "Elapsed time is more then 30 seconds - Faulty"
+ } else {
+ puts "Elapsed time is less then 30 seconds - OK"
+ }
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts " BUC60980 "
+puts " OCC360"
+puts "========================"
+puts ""
+##################################################################
+## Can not find a projection the circle on the sphere.
+##################################################################
+
+restore [locate_data_file OCC360a.draw] c
+restore [locate_data_file OCC360b.draw] cf
+
+set che [project result c cf]
+puts $che
+
+if { [regexp {Projection} $che] && [regexp {Failed} $che] } {
+ puts "Faulty OCC360: command PROJECT works wrongly"
+} else {
+ puts " OCC360 OK : command PROJECT works properly"
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts "BUC61033"
+puts " OCC370 "
+puts "========================"
+puts ""
+#################################################################
+##Intersection between a sphere and trimmed plane, using IntPatch_Intersection, lead to infinite cycle.
+#################################################################
+
+sphere gs1 1
+plane gs2 0 0 0 1 0 0
+trim trgs2 gs2 0 1.000001 -1 0.000001
+
+intersect result gs1 trgs2
+
+cpulimit 300
+
+puts "OCC370 OK: function INTERSECT works properly"
+
+erase gs2
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts "BUC61058"
+puts " OCC378 "
+puts "========================"
+puts ""
+########################################################################
+##Regression on KAS:dev:ros. Draw hangs after try to load 6381.brep shape to 3D Viewer. Case : cgg/004/S2
+########################################################################
+
+restore [locate_data_file OCC378.brep] result
+
+tclean result
+vinit
+
+if [catch {vdisplay result } catch_result] {
+ puts "Faulty OCC378: function VDISPLAY works wrongly"
+} else {
+ puts " OCC378 OK : function VDISPLAY works properly"
+}
+
+set 3dviewer 1
+
+
--- /dev/null
+puts "========================"
+puts " OCC408 "
+puts "========================"
+puts ""
+
+box b1 0 0 0 1 1 1
+nurbsconvert b1 b1
+box b2 0 -0.5 0 1.5 0.5 0.5
+
+bcommon result b1 b2
+puts [checkshape -top result]
+
+
+
--- /dev/null
+puts "========"
+puts "OCC428"
+puts "SAM1414"
+puts "========"
+
+################################################
+## Exception during vizualization on attached shape in application.
+## Exception is raised in the package StdPrs.
+################################################
+
+restore [locate_data_file OCC428.brep] result
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+vclear
+
+isos result 0
+triangles result
+vfit
+
+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 == 5496 && $nod == 5406 } {
+ puts "Warning OCC428: here is shading problem, but source shape is invalid"
+} else {
+ puts "Warning OCC428: Shading of OCC428 was made, source shape is invalid"
+}
+
+set 3dviewer 1
+
--- /dev/null
+puts "========================"
+puts " OCC429 "
+puts "========================"
+puts ""
+#######################################
+## Projection for a point on a surface works wrong
+#######################################
+
+restore [locate_data_file OCC429a.draw] a
+restore [locate_data_file OCC429b.draw] b
+
+intersect i a b
+
+cvalue i_2 0.43213918 x y z
+point p x y z
+proj b x y z
+
+set err1 [string range [dump ext_1] 55 64]
+set err2 [string range [dump ext_2] 55 64]
+set err3 [string range [dump ext_3] 55 64]
+set err4 [string range [dump ext_4] 55 64]
+set err5 [string range [dump ext_5] 55 64]
+set err6 [string range [dump ext_6] 55 64]
+
+if { $err1 != "Parameters" || $err2 != "Parameters" || $err3 != "Parameters" || $err4 != "Parameters" || $err5 != "Parameters" || $err6 != "Parameters" } {
+ puts " OCC286 OK : Projection for a point on a surface works properly"
+} else {
+ puts "Faulty OCC429 : Attempt to project the point on surface gives incorrect result"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========================"
+puts " OCC430 "
+puts "========================"
+puts ""
+################################################################
+## Exception when projecting a point on planar surface of linear extrusion oriented along Y axis
+################################################################
+
+restore [locate_data_file OCC430.rle] result
+
+if [catch {proj result 49.86391363636364 440.7894090909091 127.05 } catch_result] {
+ puts "Faulty OCC430: Projection was made wrongly."
+} else {
+ puts "OK OCC348: function PROJECT works properly"
+}
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "========================"
+puts " OCC431 "
+puts "========================"
+puts ""
+#####################################
+## Intersection of two surfaces is not compleate curve.
+#####################################
+
+restore [locate_data_file OCC431a.draw] su1
+restore [locate_data_file OCC431b.draw] su2
+
+intersect result su1 su2
+
+set che [whatis result]
+
+if { ![regexp {curve} $che] || ![regexp {3d} $che]} {
+ puts "Faulty OCC431 : Command INTERSECT works WRONGLY"
+} else {
+ puts "OCC431 OK : Command INTERSECT works properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========================"
+puts " OCC433 "
+puts "========================"
+puts ""
+#########################################################
+## The attached face gives no errors in checkshape command in dev. However, it looks bad
+#########################################################
+
+restore [locate_data_file OCC433.brep] result
+
+decho off
+set err [checkshape result r]
+decho on
+
+if { [regexp {OK} $err] == 1} {
+ puts " Faulty OCC433: function CHECKSHAPE works wrongly"
+} else {
+ puts " OCC433 OK: function CHECKSHAPE works properly"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========"
+puts "OCC438"
+puts " (case 1)"
+puts "========"
+
+####################################
+## Exception during checking of shape from OCC428
+####################################
+
+restore [locate_data_file OCC428.brep] result
+
+decho off
+if [catch { checkshape result } catch_result] {
+ set mistake 1
+} else {
+ set mistake 0
+}
+decho on
+
+if { $mistake != 0} {
+ puts "Faulty OCC438 (case 1): here is checking problem"
+} else {
+ puts "OCC438 (case 1) OK"
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========================"
+puts " OCC441 "
+puts "(case 1)"
+puts "========================"
+puts ""
+###############################
+## Instability of BRepCheck check status.
+###############################
+
+restore [locate_data_file OCC441a.brep] result
+
+decho off
+set err [checkshape result r]
+decho on
+
+set j 1
+repeat 25 {
+ restore [locate_data_file OCC441a.brep] result
+ decho off
+ set err1 [checkshape result r]
+ decho on
+ if { $err != $err1 } {
+ puts [format " Faulty OCC441: function CHECKSHAPE works wrongly on %s time" $j]
+ break
+ } else {
+ puts [format " OCC441 OK: function CHECKSHAPE works properly %s time" $j]
+ }
+ incr j
+}
+
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts " OCC441 "
+puts "(case 2)"
+puts "========================"
+puts ""
+###############################
+## Instability of BRepCheck check status.
+###############################
+
+restore [locate_data_file OCC441b.brep] result
+
+decho off
+set err [checkshape result r]
+decho on
+
+set j 1
+repeat 25 {
+ restore [locate_data_file OCC441b.brep] result
+ decho off
+ set err1 [checkshape result r]
+ decho on
+ if { $err != $err1 } {
+ puts [format " Faulty OCC441: function CHECKSHAPE works wrongly on %s time" $j]
+ break
+ } else {
+ puts [format " OCC441 OK: function CHECKSHAPE works properly %s time" $j]
+ }
+ incr j
+}
+
+set 2dviewer 0
--- /dev/null
+puts "========================"
+puts " OCC441 "
+puts "(case 3)"
+puts "========================"
+puts ""
+###############################
+## Instability of BRepCheck check status.
+###############################
+
+restore [locate_data_file OCC441c.brep] result
+
+decho off
+set err [checkshape result r]
+decho on
+
+set j 1
+repeat 25 {
+ restore [locate_data_file OCC441c.brep] result
+ decho off
+ set err1 [checkshape result r]
+ decho on
+ if { $err != $err1 } {
+ puts [format " Faulty OCC441: function CHECKSHAPE works wrongly on %s time" $j]
+ break
+ } else {
+ puts [format " OCC441 OK: function CHECKSHAPE works properly %s time" $j]
+ }
+ incr j
+}
+
+set 2dviewer 0
--- /dev/null
+puts "========"
+puts "OCC453"
+puts "(case 3)"
+puts "========"
+puts ""
+
+dchrono h2 reset
+dchrono h2 start
+
+set make_print_out 0
+
+dset SCALE 1000.
+dset SCALE1 5
+tolblend 0.01 1e-04 1e-05 1e-03
+
+restore [locate_data_file shading_137.brep] s
+tscale s 0 0 0 SCALE1
+explode s E
+
+blend result s 5.5*SCALE1 s_2 4*SCALE1 s_1 6*SCALE1 s_6 5*SCALE1 s_8 6*SCALE1 s_10 6.5*SCALE1 s_14 7*SCALE1 s_4 5.5*SCALE1 s_5 7*SCALE1 s_16 6*SCALE1 s_11 5*SCALE1 s_19 6.5*SCALE1 s_13
+explode result So
+tcopy result_1 result
+
+dchrono h2 stop
+set q2 [ dchrono h2 show ]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
+puts "$z2"
+if { $z2 > 85 } {
+ puts "Elapsed time is more then 85 seconds - Faulty"
+} else {
+ puts "Elapsed time is less then 85 seconds - OK"
+}
+
+set 2dviewer 1
+
--- /dev/null
+puts "========="
+puts " OCC496 "
+puts "========="
+puts ""
+##############################
+## Exception occurs during fuse operation
+##############################
+
+restore [locate_data_file OCC496a.brep] a_1
+puts [checkshape a_1]
+
+restore [locate_data_file OCC496b.brep] a_2
+puts [checkshape a_2]
+
+bfuse result a_1 a_2
+
+set check_square 1
+set square 4949.79
+set 2dviewer 0
--- /dev/null
+puts "========="
+puts " OCC503 "
+puts "========="
+puts ""
+###############################
+## Draw hangs up during sprops operation
+###############################
+
+#cpulimit 9000
+
+restore [locate_data_file OCC503.brep] result
+
+if [catch {sprops result 0.001 } catch_result] {
+ set mistake 1
+} else {
+ set mistake 0
+}
+
+if { $mistake != 0} {
+ puts "Faulty OCC503 : Draw hangs up during sprops operation "
+} else {
+ puts "OCC503 OK: function SPROPS works without hangs up "
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "========="
+puts " OCC504 "
+puts "========="
+puts ""
+###############################
+## AllocMemory while intersection command
+###############################
+
+restore [locate_data_file OCC504a.draw] su1
+# checkshape su1
+
+restore [locate_data_file OCC504b.draw] su2
+# checkshape su2
+
+if [catch {intersect result su1 su2} catch_result] {
+ puts "Faulty OCC504 : A solution takes all memory and crach with AllocMemory"
+} else {
+ puts "OCC504 OK: function intersection works ok"
+}
+
+if { [regexp {curve} [whatis result_1]] && [regexp {curve} [whatis result_2]] } {
+ puts "OCC504 OK : Result shape is CORRECT !!! "
+} else {
+ puts " Faulty OCC504: Result shape is INcorrect !!! "
+}
+
+set 2dviewer 0
+
--- /dev/null
+puts "==========="
+puts "GER61235"
+puts "==========="
+
+restore [locate_data_file ger61235a.brep] tool
+puts [checkshape tool]
+restore [locate_data_file ger61235b.brep] object
+puts [checkshape object]
+
+bsection result object tool
+
+puts "Result of section :"
+puts [checkshape result]
+#To check geometry part
+mksurface s1 tool
+mksurface s2 object
+
+puts "Result of intersect :"
+intersect result s1 s2
+puts [checksection result]
+
+set 2dviewer 0
+
+
--- /dev/null
+puts "=========="
+puts "PRO19422"
+puts "GER60462"
+puts "=========="
+puts ""
+#############################################################
+## Errors when cutting, 2 cases in /dp_25/IBug/pro/19422 files o1 t1 and o2 t2, restore.
+## cut c1 o1 t1 fails. cut c2 o2 t2 fails
+#############################################################
+
+restore [locate_data_file pro19422a.brep] shape
+puts [checkshape shape]
+restore [locate_data_file pro19422b.brep] tool
+puts [checkshape tool]
+
+bcut result shape tool
+
+set check_square 1
+set square 3166.93
+set 2dviewer 0
+
--- /dev/null
+puts "=========="
+puts "PRO19422"
+puts "=========="
+puts ""
+#############################################################
+## Errors when cutting, 2 cases in /dp_25/IBug/pro/19422 files o1 t1 and o2 t2, restore.
+## cut c1 o1 t1 fails. cut c2 o2 t2 fails
+#############################################################
+
+restore [locate_data_file pro19422c.brep] shape
+puts [checkshape shape]
+restore [locate_data_file pro19422d.brep] tool
+puts [checkshape tool]
+
+bcut result shape tool
+
+set check_square 1
+set square 2369.43
+set 2dviewer 0
--- /dev/null
+pload QAcommands
+
+
--- /dev/null
+puts "========"
+puts "BUC60956"
+puts "OCC112"
+puts "========"
+puts ""
+###############################################################
+## When restoring a TopoDS_Shape containing a valid Meshing (computed for display) the
+## meshing is computed again when displaying it.
+###############################################################
+
+set rd_ch 78039
+set gr_ch 55294
+set bl_ch 9411
+
+restore [locate_data_file OCC20.brep] result
+tclean result
+vinit
+vdisplay result
+vfit
+vsetdispmode result 1
+QAUpdateLights
+
+set color [QAGetPixelColor 140 115]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+}
+
+set only_screen 1
+
+
+
--- /dev/null
+puts "========================"
+puts " BUC60956 "
+puts " OCC112 "
+puts "========================"
+
+restore [locate_data_file OCC20.brep] res
+puts [checkshape res]
+
+set first [trinfo res]
+tclean res
+
+######################################################################
+catch {exec rm ${imagedir}/vrem.brep}
+save res ${imagedir}/vrem.brep
+
+vinit
+restore ${imagedir}/vrem.brep result
+vdisplay result
+vsetdispmode result 1
+
+set second [trinfo result]
+
+if {$first == $second} {
+ puts "Faulty OCC112 : Mesh for shading was recalculated !!!"
+}
+
+set 3dviewer 0
--- /dev/null
+puts "================"
+puts "OCC128"
+puts "================"
+###############################################################
+## The shading is false: objects seem to be situated in front of the others while they are behind.
+###############################################################
+
+set rd_ch 43137
+set gr_ch 48235
+set bl_ch 54509
+
+vinit
+OCC128
+QASetViewCharac 4.9487928 89.23589 4.1505 0.7329295 0.59461397 0.33052679 -0.536849 0.2071041 0.81786 71.971878 -17.250309 33.509651
+QAUpdateLights
+set color [QAGetPixelColor 171 171]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : The shading is false. Colors are not equal"
+}
+
+set only_screen 1
--- /dev/null
+puts "TODO OCC12345 ALL: Error : colors are not equal"
+puts "TODO OCC12345 ALL: Error : 3D Viewer is empty"
+
+puts "================"
+puts "OCC136"
+puts "================"
+
+vinit
+OCC136
+vfit
+set rd_ch 0.8
+set gr_ch 0.8
+set bl_ch 0.8
+
+set color [QAGetPixelColor 211 215]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != ${rd_ch} || ${gr} != ${gr_ch} || ${bl} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : 3D Viewer is empty"
+}
+
+set only_screen 1
+
--- /dev/null
+
+puts "========"
+puts "OCC138"
+puts "========"
+puts ""
+#######################################
+## Viewer problem: Selection of objects on global context
+#######################################
+vinit
+set info [OCC138]
+
+set length [llength ${info}]
+if {${length} < 5 } {
+ puts "OCC138: Error (case 1)"
+} else {
+ regexp {No of currents += +([-0-9.+eE]+)} $info full NbCurrents
+ if {${NbCurrents} != 3 } {
+ puts "OCC138: Error (case 2)"
+ }
+}
+
+vfit
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC138"
+puts "========"
+
+vinit
+set info [OCC138LC]
+
+set length [llength ${info}]
+if {${length} < 5 } {
+ puts "OCC138: Error (case 1)"
+} else {
+ regexp {No of selected += +([-0-9.+eE]+)} $info full NbCurrents
+ if {${NbCurrents} != 3 } {
+ puts "OCC138: Error (case 2)"
+ }
+}
+
+vfit
+set only_screen 1
--- /dev/null
+
+puts "================"
+puts "OCC146"
+puts "================"
+############################################################################
+##The first click on shape selects it - it is right. But the second one deselects it and the following clicks have no effect.
+############################################################################
+
+v2dinit
+box b_b 10 15 20
+trotate b_b 0 0 0 1 1 1 45
+v2ddisplay b_b
+v2dfit
+
+QASelect2d 155 180
+QASelect2d 155 180
+QASelect2d 155 180
+
+set rd_ch 80000
+set gr_ch 80000
+set bl_ch 80000
+
+set color [QAAISGetPixelColor2d 155 177]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : The second selection of selected object deselects it and the following clicks have no effect"
+}
+
+set only_screen2d 1
--- /dev/null
+
+puts "========================"
+puts "OCC153"
+puts "========================"
+
+##########################################
+####### Draw command v2dsetbg hangs up the application
+##########################################
+
+v2dinit
+set j 1
+repeat 23 {
+ if [catch { v2dsetbg [locate_data_file OCC153.gif] } res] {
+ puts [format "%s ) Faulty OCC153: here is problem with v2dsetbg command" $j]
+ } else {
+ puts [format "%s ) : OCC153 OK" $j]
+ }
+ incr j}
--- /dev/null
+puts "========"
+puts "OCC154"
+puts "========"
+puts ""
+##############################################################
+##puts "Checking of functions V2DERASEALL and V2DDISPLAYALL "
+##puts "(visual checking for this case is desirable)"
+##############################################################
+v2dinit
+
+box b 1 1 1
+box b1 10 10 10 1 1 1
+v2ddisplay b
+v2ddisplay b1
+v2dfit
+
+v2deraseall
+
+set color1 [QAAISGetPixelColor2d 370 37]
+regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
+regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
+regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
+
+if { ${rd1} != 0 || ${gr1} != 0 || ${bl1} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : Object was not erased"
+}
+
+v2ddisplayall
+
+set color2 [QAAISGetPixelColor2d 370 37]
+regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
+regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
+regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
+
+if { ${rd2} != 1 || ${gr2} != 1 || ${bl1} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : Object was not displayed"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC154"
+puts "========"
+puts ""
+#####################################################
+##puts "Checking of function V2DERASE "
+##puts "(visual checking for this case is desirable)"
+#####################################################
+
+v2dinit
+
+box b 1 1 1
+v2ddisplay b
+box b1 10 10 10 1 1 1
+v2ddisplay b1
+v2dfit
+
+v2derase b1
+
+set color [QAAISGetPixelColor2d 370 37]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 0 || ${gr} != 0 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Object was not erased"
+}
+
+set only_screen2d 1
+
--- /dev/null
+puts "========"
+puts "OCC155"
+puts "OCC190"
+puts "========"
+puts ""
+#####################################
+##puts "Creating of Vertexes 2D"
+##puts "(visual checking for this case is desirable)"
+#####################################
+v2dinit
+
+vertex v_v 0 0 0
+vertex v_v1 100 100 0
+v2ddisplay v_v
+v2ddisplay v_v1
+v2dfit
+
+set color [QAAISGetPixelColor2d 405 7]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : Vertexes 2D were NOT LOADED properly"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC155"
+puts "OCC191"
+puts "========"
+puts ""
+#####################################
+##puts "Creating of pCone 2D"
+##puts "(visual checking for this case is desirable)"
+#####################################
+
+v2dinit
+
+pcone c_o 15 0 50 360
+v2ddisplay c_o
+v2dfit
+
+set color [QAAISGetPixelColor2d 338 77]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : pCone 2D was NOT LOADED properly into viewer"
+}
+
+set only_screen2d 1
+
--- /dev/null
+puts "========"
+puts "OCC155"
+puts "========"
+puts ""
+###################################################
+##puts "Creating of pCylinder 2D"
+##puts "(visual checking for this case is desirable)"
+###################################################
+
+v2dinit
+
+pcylinder c_y 5 10
+v2ddisplay c_y
+v2dfit
+
+set color [QAAISGetPixelColor2d 338 75]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : pCylinder 2D was NOT LOADED properly into viewer"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "========"
+puts "OCC173"
+puts "(case 1)"
+puts "========"
+puts ""
+###########################################################
+## Impossible to change the material or the transparency of the attached BREP shape.
+###########################################################
+
+restore [locate_data_file OCC173.brep] result
+puts [checkshape result]
+
+vinit result
+tclean
+vdisplay result
+vfit
+vsetdispmode result 1
+
+set rd_ch 100000
+set gr_ch 75686
+set bl_ch 15294
+
+QAUpdateLights
+set color1 [QAGetPixelColor 175 195]
+regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
+regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
+regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
+
+set rd_int [expr int($rd1 * 1.e+05)]
+set gr_int [expr int($gr1 * 1.e+05)]
+set bl_int [expr int($bl1 * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : Shading is missing in 3D Viewer"
+}
+
+########################################################
+vsetmaterial result COPPER
+
+QAUpdateLights
+set color2 [QAGetPixelColor 175 195]
+regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
+regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
+regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
+
+if { ${rd2} == ${rd1} || ${gr2} == ${gr1} || ${bl2} == ${bl1} } {
+ puts "Error : material of shape was NOT changed"
+}
+
+set only_screen 1
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "========"
+puts "OCC173"
+puts "(case 2)"
+puts "========"
+puts ""
+###########################################################
+## Impossible to change the material or the transparency of the attached BREP shape.
+###########################################################
+
+restore [locate_data_file OCC173.brep] result
+puts [checkshape result]
+
+vinit
+tclean result
+vdisplay result
+vfit
+vsetdispmode result 1
+
+set color1 [QAGetPixelColor 175 195]
+regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
+regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
+regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
+
+vsetmaterial result ALUMINIUM
+
+QAUpdateLights
+set color2 [QAGetPixelColor 175 195]
+regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
+regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
+regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
+
+if { ${rd2} == ${rd1} || ${gr2} == ${gr1} || ${bl2} == ${bl1} } {
+ puts "Error : material of the shape was NOT changed"
+}
+
+set only_screen 1
--- /dev/null
+puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
+puts "========"
+puts "OCC173"
+puts "(case 3)"
+puts "========"
+puts ""
+###########################################################
+## Impossible to change the material or the transparency of the attached BREP shape.
+###########################################################
+
+restore [locate_data_file OCC173.brep] result
+
+puts [checkshape result]
+
+vinit
+tclean result
+vdisplay result
+vfit
+vsetdispmode result 1
+
+set color1 [QAGetPixelColor 175 195]
+regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
+regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
+regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
+
+########################################################
+vsettransparency result 0.5
+
+QAUpdateLights
+set color2 [QAGetPixelColor 175 195]
+regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
+regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
+regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
+
+if { ${rd2} == ${rd1} || ${gr2} == ${gr1} || ${bl2} == ${bl1} } {
+ puts "Error : vsettransparency of shape was NOT made"
+}
+
+set only_screen 1
+
--- /dev/null
+puts "========"
+puts "OCC185"
+puts "========"
+
+pload XDE
+
+igesbrep [locate_data_file OCC185.igs] a *
+
+tpcompound result
+tclean result
+
+vinit
+vdisplay result
+vfit
+
+set rd_ch 78039
+set gr_ch 55294
+set bl_ch 9411
+
+vsetdispmode result 1
+QAUpdateLights
+set color [QAGetPixelColor 235 214]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : Shading is OFF, but should be ON"
+}
+
+vsetdispmode result 0
+
+QAUpdateLights
+set color0 [QAGetPixelColor 235 214]
+regexp {RED +: +([-0-9.+eE]+)} $color0 full rd0
+regexp {GREEN +: +([-0-9.+eE]+)} $color0 full gr0
+regexp {BLUE +: +([-0-9.+eE]+)} $color0 full bl0
+
+if { ${rd0} != 0 || ${gr0} != 1 || ${bl0} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : Shading is ON, but should be OFF"
+}
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC192"
+puts "========"
+puts ""
+#########################################################
+##puts "Selection of NODE of ROTATED 2D Circular Grid WITHOUT Lines"
+##puts "(visual checking for this case is desirable)"
+#########################################################
+
+v2dinit
+
+v2dgrid Circ 500 500 250 12 30 Points
+
+set rd_ch 70196
+set gr_ch 70196
+set bl_ch 70196
+
+set Position_X -862.436
+set Position_Y -598.303
+
+set color [QAAISGetPixelColor2d 28 326]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : Objects was not displayed"
+}
+
+v2dpickgrid 28 326 x_coord y_coord
+
+if { ${x_coord} != ${Position_X} || ${y_coord} != ${Position_Y} } {
+ puts "Error : Function v2dpickgrid works wrongly"
+}
+
+set only_screen2d 1
+
--- /dev/null
+
+puts "========"
+puts "OCC193"
+puts "========"
+puts ""
+##################################################
+##puts "Selection of NODE of ROTATED 2D Circular Grid WITH Lines"
+##puts "(visual checking for this case is desirable)"
+##################################################
+
+v2dinit
+v2dgrid Circ 500 500 250 12 30 Lines
+
+set Position_X -667.802
+set Position_Y -441.402
+
+set rd_ch 49803
+set gr_ch 49803
+set bl_ch 49803
+
+set color [QAAISGetPixelColor2d 67 295]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : Objects was not displayed"
+}
+
+v2dpickgrid 67 295 x_coord y_coord
+
+if { ${x_coord} != ${Position_X} || ${y_coord} != ${Position_Y} } {
+ puts "Error : Function v2dpickgrid works wrongly"
+}
+
+set only_screen2d 1
--- /dev/null
+
+puts "========"
+puts "OCC194"
+puts "(case 1)"
+puts "========"
+puts ""
+###############################################
+##puts "Creating of 2D Rectangular ROTATED Grid WITH Lines"
+##puts "(visual checking for this case is desirable)"
+###############################################
+
+v2dinit
+v2dgrid Rect 500 500 200 200 45 Lines
+
+set rd_ch 49803
+set gr_ch 49803
+set bl_ch 49803
+
+set color [QAAISGetPixelColor2d 25 361]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : 2D Rectangular ROTATED Grid WITH Lines was NOT CREATED properly"
+}
+
+set only_screen2d 1
--- /dev/null
+
+puts "========"
+puts "OCC194"
+puts "(case 2)"
+puts "========"
+puts ""
+###############################################
+##puts "Creating of 2D Rectangular ROTATED Grid WITHOUT Lines"
+##puts "(visual checking for this case is desirable)"
+###############################################
+
+v2dinit
+v2dgrid Rect 500 500 200 200 45 Points
+
+set rd_ch 70196
+set gr_ch 70196
+set bl_ch 70196
+
+set color [QAAISGetPixelColor2d 20 21]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : 2D Rectangular ROTATED Grid WITHOUT Lines was NOT CREATED properly"
+}
+
+set only_screen2d 1
--- /dev/null
+
+puts "========"
+puts "OCC195"
+puts "========"
+puts ""
+######################################################
+##puts "Scaling of text font number 23"
+##puts "(visual checking for this case is desirable)"
+######################################################
+
+v2dinit
+
+set Angle 0
+set Font_ind 23
+set k 0
+set i 0
+repeat 5 {
+ set Position_X [expr $i*20]
+ set Position_Y [expr $i*20]
+ set k [expr $k+.5]
+ set Scale $k
+ v2dtext Scale_[string range $k 0 2] $Position_X $Position_Y $Angle $Scale $Font_ind
+ puts "=======> Scale Factor = [string range $k 0 2] Position_X= $Position_Y Position_Y= $Position_Y"
+ puts " "
+ incr i
+}
+
+set color [QAAISGetPixelColor2d 190 105]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 1 } {
+ puts "Error : colors are not equal"
+ puts "Error : Scaling of text font number 23 was NOT MADE properly"
+}
+
+set only_screen2d 1
--- /dev/null
+
+puts "========"
+puts "OCC196"
+puts "========"
+puts ""
+################################################
+##puts "Rotation of text font number 23"
+##puts "(visual checking for this case is desirable)"
+################################################
+
+v2dinit
+
+set Scale 1
+set Font_ind 23
+set k -.2
+set j 0
+repeat 10 {
+ set Position_X [expr $j*15]
+ set Position_Y [expr $j*-15]
+ set k [expr $k+.2]
+ set Angle $k
+ v2dtext Angle_[string range $k 0 2] $Position_X $Position_Y $Angle $Scale $Font_ind
+ puts "=======> Angle = [string range $k 0 4] Position_X= $Position_Y Position_Y= $Position_Y"
+ puts " "
+ incr j
+}
+
+set color [QAAISGetPixelColor2d 336 347]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 1 } {
+ puts "Error : colors are not equal"
+ puts "Error : Rotation of text font number 23 was NOT MADE properly"
+}
+
+set only_screen2d 1
--- /dev/null
+
+puts "========="
+puts "PRO19619"
+puts "=========="
+
+##################################################
+## Regression in C30. Can not display restored shape in axonometric view.
+##################################################
+
+#restore pro19619a.rle res (small/brep)
+restore [locate_data_file shading_116.brep] res
+checkshape res
+
+axo
+fit
+
+delete
\ No newline at end of file
--- /dev/null
+puts "========"
+puts "OCC197"
+puts "(case 1)"
+puts "========"
+puts ""
+#############################################################
+##puts "Multiple Selection: Choosing of viewer MODA for selection of PRIMITIVE"
+##puts "(visual checking for this case is desirable)"
+#############################################################
+# Selection Modes Activation:
+# 0 - OBJECT, 1 - PRIMITIVE, 2 - ELEMENT, 3 - VERTEX, 4 - NONE
+
+v2dinit
+
+box b_b 10 15 20
+v2ddisplay b_b 0 0 0 1 1 1 1 0 0
+v2dfit
+
+QAv2dSetHighlightMode 1
+
+set Position_X1 169
+set Position_Y1 148
+set Position_X2 184
+set Position_Y2 180
+
+set rd_ch 80000
+set gr_ch 80000
+set bl_ch 80000
+
+QASelect2d $Position_X1 $Position_Y1
+QAMoveTo2d 0 0
+QAShiftSelect2d $Position_X2 $Position_Y2
+
+set j 1
+repeat 2 {
+ set Position_X [set Position_X$j]
+ set Position_Y [set Position_Y$j]
+ puts " Position_X$j= $Position_X Position_Y$j= $Position_Y"
+
+ set color [QAAISGetPixelColor2d ${Position_X} ${Position_Y} ]
+ regexp {RED +: +([-0-9.+eE]+)} $color full rd
+ regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+ regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+ set rd_int [expr int($rd * 1.e+05)]
+ set gr_int [expr int($gr * 1.e+05)]
+ set bl_int [expr int($bl * 1.e+05)]
+
+ if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : (PRIMITIVE number $j) Multiple Selection: Choosing of viewer MOD for selection of PRIMITIVE was NOT MADE properly"
+ }
+
+ incr j
+}
+
+set only_screen2d 1
+
+
--- /dev/null
+puts "========"
+puts "OCC197"
+puts "(case 2)"
+puts "========"
+puts ""
+puts "====================="
+puts "Multiple Selection: Choosing of viewer MODA for selection of ELEMENT"
+puts "(visual checking for this case is desirable)"
+puts "====================="
+# Selection Modes Activation:
+# 0 - OBJECT, 1 - PRIMITIVE, 2 - ELEMENT, 3 - VERTEX, 4 - NONE
+
+v2dinit
+box b_b 10 15 20
+v2ddisplay b_b 0 0 0 1 1 1 1 0 0
+v2dfit
+QAv2dSetHighlightMode 2
+
+set Position_X1 296
+set Position_Y1 160
+set Position_X2 76
+set Position_Y2 290
+
+set rd_ch 80000
+set gr_ch 80000
+set bl_ch 80000
+
+QASelect2d $Position_X1 $Position_Y1
+QAMoveTo2d 0 0
+QAShiftSelect2d $Position_X2 $Position_Y2
+set j 1
+repeat 2 {
+ set Position_X [set Position_X$j]
+ set Position_Y [set Position_Y$j]
+ puts " Position_X$j= $Position_X Position_Y$j= $Position_Y"
+
+ set color [QAAISGetPixelColor2d ${Position_X} ${Position_Y}]
+ regexp {RED +: +([-0-9.+eE]+)} $color full rd
+ regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+ regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+ set rd_int [expr int($rd * 1.e+05)]
+ set gr_int [expr int($gr * 1.e+05)]
+ set bl_int [expr int($bl * 1.e+05)]
+
+ if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : (ELEMENT number $j) Multiple Selection: Choosing of viewer MOD for selection of ELEMENT was NOT MADE properly"
+ }
+ incr j
+}
+
+set only_screen2d 1
+
--- /dev/null
+puts "========"
+puts "OCC198"
+puts "========"
+puts ""
+#######################################################
+##puts "Changing of index of text fonts"
+#######################################################
+
+v2dinit
+
+set mistake 0
+set Angle 0
+set Scale 1
+set k -1
+set j 0
+repeat 10 {
+ set i 0
+ repeat 4 {
+ set Position_X [expr $i*70]
+ set Position_Y [expr $j*15]
+ set k [expr $k+1]
+ if [catch {Font_ind $k } ] {
+ set mistake 1
+ }
+ incr i
+ }
+ incr j
+}
+
+if {$mistake == 0} {
+ puts "Faulty : Changing of text fonts was NOT MADE properly"
+} else {
+ puts "Changing of text fonts was made properly"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC198"
+puts "========"
+puts ""
+#######################################################
+##puts "Choosing of the font index color for font number 23"
+#######################################################
+
+v2dinit
+
+v2dsetbgcolor BLUE3
+set Angle 0
+set Font_ind 23
+set Scale 1
+set k -1
+set j 0
+repeat 5 {
+ set i 0
+ repeat 4 {
+ set Position_X [expr $i*50]
+ set Position_Y [expr $j*20]
+ set k [expr $k+1]
+ if [catch {v2dsettextcolor $a $k} ] {
+ set mistake 1
+ }
+ incr i
+ }
+ incr j
+}
+
+if {$mistake == 0} {
+ puts "Faulty : Changing of text index color was NOT MADE properly"
+} else {
+ puts "Changing of text index color was made properly"
+}
+
+set only_screen2d 1
+
+
--- /dev/null
+puts "================"
+puts "OCC19"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC19.brep] result
+puts [checkshape result]
+
+tclean result
+incmesh result .9
+triangles result
+
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+
+if { $tri != 88 && $nod != 90 } {
+ puts "Faulty OCC19: here is shading problem"
+}
+
+set 3dviewer 0
+
--- /dev/null
+puts "================"
+puts "OCC19"
+puts "================"
+puts ""
+
+restore [locate_data_file OCC19.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+isos result 0
+triangles result
+
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+
+#$tri/$nod:122/124aki251103
+
+if { $tri != 83 && $nod != 85 } {
+ puts "Shady OCC19: shading problem may be, nb tri & nod were changed"
+}
+
+set 3dviewer 0
+
+
--- /dev/null
+puts "TODO OCC12345 ALL: Error : colors are not equal"
+puts "TODO OCC12345 ALL: Error : 3 boxes missing in the viewer!"
+
+puts "========"
+puts "OCC204"
+puts "========"
+
+vinit
+OCC204 0
+vfit
+
+set rd_ch 80000
+set gr_ch 80000
+set bl_ch 80000
+
+set color [QAGetPixelColor 150 200]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : 3 boxes missing in the viewer!"
+}
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC204"
+puts "========"
+
+vinit
+OCC204 1
+vfit
+
+set rd_ch 80000
+set gr_ch 80000
+set bl_ch 80000
+
+set color [QAGetPixelColor 150 200]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} == ${rd_ch} || ${gr_int} == ${gr_ch} || ${bl_int} == ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : There are 3 boxes in the viewer!"
+}
+
+set only_screen 1
--- /dev/null
+
+puts "========"
+puts "OCC215"
+puts "========"
+
+restore [locate_data_file OCC215.brep] result
+checkshape result
+
+tclean result
+vinit
+vdisplay result
+vfit
+
+set scale 6.29714883567995
+set center_X 70.7106779835678
+set center_Y 41.2330922040446
+set proj_X 0.344812899827957
+set proj_Y -0.830477952957153
+set proj_Z 0.43750473856926
+set up_X -0.368759274482727
+set up_Y 0.308769434690475
+set up_Z 0.876742839813232
+set at_X -5.88607025146484
+set at_Y 28.6973209381104
+set at_Z -12.5332689285278
+
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+QAGetPixelColor 229 94 1 1 0
+set only_screen 1
--- /dev/null
+puts "================"
+puts "OCC218"
+puts "================"
+puts ""
+
+vinit
+box b 10 10 10
+explode b f
+vdisplay b_1
+vfit
+
+set scale 7674.87317785833
+set center_X -2.16918246707847
+set center_Y 9.87290703657064
+set proj_X 0.966540098190308
+set proj_Y -0.24304473400116
+set proj_Z 0.0820330902934074
+set up_X -0.0460147373378277
+set up_Y 0.150333747267723
+set up_Z 0.987563848495483
+set at_X 1.04834496974945
+set at_Y 0.741619229316711
+set at_Z -0.0881031528115273
+
+set rd_ch 97647
+set gr_ch 97647
+set bl_ch 0
+
+set BLACK_R 0
+set BLACK_G 0
+set BLACK_B 0
+
+set x1 381
+set y1 27
+
+QASetViewCharac ${scale} ${center_X} ${center_Y} ${proj_X} ${proj_Y} ${proj_Z} ${up_X} ${up_Y} ${up_Z} ${at_X} ${at_Y} ${at_Z}
+
+OCC218 trihedron1 b_1 X Y
+QAUpdateLights
+QAGetPixelColor ${x1} ${y1} ${BLACK_R} ${BLACK_G} ${BLACK_B}
+
+OCC218 trihedron1 b_1 my___axis___1 my___axis2
+QAUpdateLights
+
+set color [QAGetPixelColor ${x1} ${y1}]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "There is no messages near axes"
+}
+
+set only_screen 1
--- /dev/null
+puts "========================"
+puts " OCC224 "
+puts "========================"
+puts ""
+#################################################
+##puts "Checking of function V2DUNSETWIDTH for shapes "
+##puts "(visual checking for this case is desirable)"
+#################################################
+
+v2dinit
+
+psphere s_p 100 360
+set mistake1 0
+v2ddisplay s_p 0 0 0 1 1 1 1 0 0
+v2dfit
+v2dsetwidth s_p VERYTHICK
+set Color_R 1
+set Color_G 1
+set Color_B 0
+
+set color [QAAISGetPixelColor2d 393 210]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : New widht was NOT assigned"
+}
+
+v2dunsetwidth s_p
+
+set color [QAAISGetPixelColor2d 393 210]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 0 || ${gr} != 0 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : Function V2DUNSETWIDTH for shapes does NOT WORK properly"
+}
+
+set only_screen2d 1
+
--- /dev/null
+
+puts "========================"
+puts " OCC225 "
+puts "========================"
+puts ""
+#################################################
+##puts "Checking of function V2DUNSETCOLOR for BOX "
+##puts "(visual checking for this case is desirable)"
+#################################################
+
+v2dinit
+
+box b_b 10 15 20
+v2ddisplay b_b 0 0 0 1 1 1 1 0 0
+v2dfit
+v2dsetcolor b_b BLUE3
+wait 5
+v2dunsetcolor b_b
+
+set color [QAAISGetPixelColor2d 22 230]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+if { ${rd} != 1 || ${gr} != 1 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+ puts "Error : function V2DUNSETCOLOR for BOX 2D does NOT WORK properly"
+}
+
+set only_screen2d 1
--- /dev/null
+puts "========"
+puts "OCC232"
+puts "Pick filter does NOT work for TopAbs_COMPSOLID topology"
+puts "========"
+
+vinit
+OCC232
+vfit
+
+# selected point of first CompSolid
+set x1 69
+set y1 204
+
+set x2 116
+set y2 231
+
+#set x3 160; set y3 257 - it's bad for lin,aki.
+set x3 159
+set y3 256
+
+# selected point of second CompSolid
+set x4 298
+set y4 76
+
+set x5 339
+set y5 100
+
+set x6 381
+set y6 124
+
+set Cyan_R 0
+set Cyan_G 1
+set Cyan_B 1
+
+set Yellow_R 1
+set Yellow_G 1
+set Yellow_B 0
+
+# There is not selection
+puts "There is not selection"
+catch {QAGetPixelColor $x1 $y1 $Yellow_R $Yellow_G $Yellow_B} result11
+catch {QAGetPixelColor $x2 $y2 $Yellow_R $Yellow_G $Yellow_B} result12
+catch {QAGetPixelColor $x3 $y3 $Yellow_R $Yellow_G $Yellow_B} result13
+catch {QAGetPixelColor $x4 $y4 $Yellow_R $Yellow_G $Yellow_B} result14
+catch {QAGetPixelColor $x5 $y5 $Yellow_R $Yellow_G $Yellow_B} result15
+catch {QAGetPixelColor $x6 $y6 $Yellow_R $Yellow_G $Yellow_B} result16
+
+# Move a mouse
+puts "Move a mouse"
+QAMoveTo $x2 $y2
+QAMoveTo $x2 $y2
+
+# Second box of first CompSolid is selected
+puts "Second box of first CompSolid is selected"
+catch {QAGetPixelColor $x1 $y1 $Yellow_R $Yellow_G $Yellow_B} result21
+catch {QAGetPixelColor $x3 $y3 $Yellow_R $Yellow_G $Yellow_B} result22
+catch {QAGetPixelColor $x4 $y4 $Yellow_R $Yellow_G $Yellow_B} result23
+catch {QAGetPixelColor $x5 $y5 $Yellow_R $Yellow_G $Yellow_B} result24
+catch {QAGetPixelColor $x6 $y6 $Yellow_R $Yellow_G $Yellow_B} result25
+
+QAUpdateLights
+catch {QAGetPixelColor $x2 $y2 $Cyan_R $Cyan_G $Cyan_B} result31
+
+set IsFaulty 0
+if { [regexp "Faulty" $result11] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result12] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result13] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result14] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result15] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result16] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result21] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result22] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result23] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result24] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result25] == 1 } {
+ set IsFaulty 1
+}
+if { [regexp "Faulty" $result31] == 1 } {
+ set IsFaulty 1
+}
+
+if {$IsFaulty != 0} {
+ puts "Error : OCC232"
+}
+
+set only_screen 1
--- /dev/null
+puts "========"
+puts "OCC280"
+puts "2. Hilighting the object, by moving mouse cursor on it does not hilight the object"
+puts "========"
+
+vinit
+box b 100 900 300
+vdisplay b
+vfit
+
+OCC280 0 0
+
+# selected point
+set x1 218
+set y1 196
+
+set Cyan_R 0
+set Cyan_G 1
+set Cyan_B 1
+
+set Yellow_R 1
+set Yellow_G 1
+set Yellow_B 0
+
+# There is not selection
+puts "There is not selection"
+QAGetPixelColor $x1 $y1 $Yellow_R $Yellow_G $Yellow_B
+
+# Move a mouse
+puts "Move a mouse"
+QAMoveTo $x1 $y1
+QAMoveTo $x1 $y1
+
+QAUpdateLights
+
+# There is a selection
+puts "There is a selection"
+QAGetPixelColor $x1 $y1 $Cyan_R $Cyan_G $Cyan_B
+
+set only_screen 1
+
--- /dev/null
+puts "========"
+puts "OCC280"
+puts "3. Fitall on perspective view does not fit all properly"
+puts "========"
+
+vinit
+box b 100 900 300
+vdisplay b
+vsetdispmode b 1
+
+OCC280 0 1
+
+set rd_ch 78039
+set gr_ch 55294
+set bl_ch 9411
+
+puts "Before View->FitAll()"
+QAUpdateLights
+set color0 [QAGetPixelColor 10 240]
+regexp {RED +: +([-0-9.+eE]+)} $color0 full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color0 full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color0 full bl
+
+if { ${rd} != 0 || ${gr} != 0 || ${bl} != 0 } {
+ puts "Error : colors are not equal"
+}
+
+vfit
+
+puts "After View->FitAll()"
+QAUpdateLights
+set color1 [QAGetPixelColor 10 240]
+regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
+regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
+regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
+
+set rd_int [expr int($rd1 * 1.e+05)]
+set gr_int [expr int($gr1 * 1.e+05)]
+set bl_int [expr int($bl1 * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+ puts "Error : Function vfit works wrongly"
+}
+
+set only_screen 1
--- /dev/null
+
+puts "========================"
+puts " OCC288 "
+puts "(case 1)"
+puts "========================"
+
+restore [locate_data_file shading_058.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+isos result 0
+triangles result
+vfit
+
+set tri 0
+set nod 0
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+puts [format " tri= %s nod= %s " $tri $nod]
+
+if { $tri != 5148 && $nod != 3042} {
+ puts " Warning: OCC288 (case 1) looks like OK, but visual checking is required!!"
+} else {
+ puts " OCC288 (case 1) : Faulty"
+}
+
+set only_screen 1
+
--- /dev/null
+
+puts "========================"
+puts " OCC288 "
+puts "(case 2)"
+puts "========================"
+
+restore [locate_data_file shading_105.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+isos result 0
+triangles result
+vfit
+
+set tri 0
+set nod 0
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+puts [format " tri= %s nod= %s " $tri $nod]
+
+if { $tri != 1170 && $nod != 647} {
+ puts " Warning: OCC288 (case 2) looks like OK, but visual checking is required !!!!"
+} else {
+ puts " OCC288 (case 2) : Faulty"
+}
+
+set only_screen 1
--- /dev/null
+puts "========================"
+puts " OCC288 "
+puts "(case 3)"
+puts "========================"
+
+restore [locate_data_file shading_107.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+isos result 0
+triangles result
+vfit
+
+set tri 0
+set nod 0
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+puts [format " tri= %s nod= %s " $tri $nod]
+
+if { $tri != 1832 && $nod != 1574} {
+ puts " Warning: OCC288 (case 3) looks like OK, but visual checking is required !!!!"
+} else {
+ puts " OCC288 (case 3) : Faulty"
+}
+
+set only_screen 1
+
--- /dev/null
+puts "========================"
+puts " OCC288 "
+puts "(case 4)"
+puts "========================"
+
+restore [locate_data_file shading_151.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+isos result 0
+triangles result
+vfit
+
+set tri 0
+set nod 0
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+puts [format " tri= %s nod= %s " $tri $nod]
+
+if { $tri != 4176 && $nod != 2857} {
+ puts "Warning: OCC288 (case 4) looks like OK, but visual checking is required !!!!"
+} else {
+ puts " OCC288 (case 4) : Faulty"
+}
+
+set only_screen 1
+
--- /dev/null
+puts "============ OCC288 (case 5) ==============="
+
+restore [locate_data_file OCC288e.brep] result
+puts [checkshape result]
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+isos result 0
+triangles result
+vfit
+
+set tri 0
+set nod 0
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+puts [format " tri= %s nod= %s " $tri $nod]
+
+# ($tri == 7826 && $noe == 8246) || ($tri == 8218 && $noe == 8638),aki251103
+
+if { ($tri == 6268 && $noe == 6688) } {
+ puts "Shading of OCC288 (case 5) looks like OK, but visual checking is required !"
+} else {
+ puts " Shady: Shading of OCC288 (case 5) may be bad, nb tri & nod changed"
+}
+
+set only_screen 1
+
--- /dev/null
+puts "================"
+puts "OCC316"
+puts "================"
+puts ""
+
+########################################################
+## Exception is raised in the SAMTECH Application during visualization. (#2054)
+########################################################
+
+restore [locate_data_file OCC316.brep] result
+
+decho off
+set che [checkshape result]
+decho on
+
+if { [regexp "Faulty" $che] == 1 } {
+ puts "Warning OCC316: Source shape is NOT correct. It was detected by Checkshape command"
+}
+
+tclean result
+
+vinit
+vdisplay result
+vsetdispmode result 1
+vfit
+
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+
+if { $tri == 212909 && $nod == 158362 } {
+ puts "Warning OCC316: here is shading problem (some faces are lost)"
+} else {
+ if { $tri == 0 || $nod == 0 } {
+ puts " Warning OCC316: here is shading problem (shading mesh is NOT created)"
+ isos result 0
+ } else {
+ puts "Warning: Shading of OCC316 looks OK, but visual checking is required"
+ }
+}
+
+set only_screen 1
+
--- /dev/null
+puts "========"
+puts "OCC319"
+puts "========"
+puts ""
+######################################################
+# Wrong shading on a shape
+######################################################
+
+cpulimit 3500
+
+restore [locate_data_file OCC319.brep] result
+
+decho off
+set res [checkshape result]
+decho on
+set index [lsearch $res Faulty]
+if {$index > -1} {
+ puts "Warning OCC319: here is checkshape problem"
+}
+
+tclean result
+vinit
+vdisplay result
+vsetdispmode result 1
+vfit
+
+set scale 16.5593321780929
+set center_X -0.0688543427812931
+set center_Y 11.6346916159369
+set proj_X 0.207536488771439
+set proj_Y -0.233648166060448
+set proj_Z 0.949914216995239
+set up_X -0.857990384101868
+set up_Y 0.422952175140381
+set up_Z 0.291485607624054
+set at_X 8.22575855255127
+set at_Y -2.95449280738831
+set at_Z 3.08669567108154
+
+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 info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+
+set IsGood 1
+if { $tri == 0 || $nod == 0 } {
+ puts "Faulty OCC319: here is shading problem"
+ set IsGood 0
+}
+
+regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full square
+set good_square 8623.6
+set square_percent [expr abs(${square} - ${good_square}) / double(${good_square}) * 100.]
+
+set percent_max 0.1
+
+puts "good_square = ${good_square}"
+puts "square = ${square}"
+puts "square_percent = ${square_percent}"
+
+if {${square_percent} > ${percent_max}} {
+ puts "OCC319 Faulty : here is square problem"
+ set IsGood 0
+}
+
+if {${IsGood} != 1} {
+ puts "Errpr : OCC319"
+}
+
+set only_screen 1
--- /dev/null
+ puts "========================"
+puts " OCC331 "
+puts "========================"
+puts ""
+#######################################################
+## Dark spot on a sphere after nurbsconvert
+#######################################################
+
+box b -5 -5 -5 10 10 10
+psphere s 6
+
+bfuse res s b
+
+nurbsconvert result res
+
+tclean result
+vinit
+vdisplay result
+vfit
+vsetdispmode result 1
+vfit
+
+set tri 0
+set nod 0
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+puts [format " tri= %s nod= %s " $tri $nod]
+
+if { $tri != 3808 && $nod != 2188} {
+ puts " OCC331: Looks like OK, but visual checking is required!!!"
+} else {
+ puts " OCC331: Faulty - Dark spot on a sphere after nurbsconvert"
+}
+
+
+set only_screen 1
+
+
--- /dev/null
+puts "================"
+puts "BUC61047"
+puts "OCC344"
+puts "================"
+puts ""
+
+#############################################
+## An exception - <access violation> is raised during visualization.
+#############################################
+
+restore [locate_data_file OCC344.brep] result
+puts [checkshape result]
+tclean result
+
+vinit
+vdisplay result
+vsetdispmode result 1
+vfit
+vclear
+isos result 0
+triangles result
+
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+
+if { $tri == 9 && $nod == 8 } {
+ puts "Warning OCC344: here is shading problem"
+} else {
+ puts "Shading of OCC344 looks like OK, but visual checking is required"
+}
+
+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 "OCC346"
+puts "================"
+puts ""
+#####################################################
+## Avoiding exception when the 2 vertices of the edge are the same.
+#####################################################
+
+set x 10
+set y 10
+set z 10
+
+vertex v1 $x $y $z
+vertex v2 $x $y $z
+
+edge result v1 v2
+
+set 2dviewer 0
+
--- /dev/null
+puts "========================"
+puts "BUC61000"
+puts " OCC364 "
+puts "========================"
+puts ""
+##############################################
+## Face is invisible in the shading mode in the 3D View.
+##############################################
+
+restore [locate_data_file OCC364.brep] result
+puts [checkshape result]
+
+tclean result
+isos result 0
+vinit
+vdisplay result
+vsetdispmode result 1
+vfit
+triangles result
+
+set info [trinfo result]
+regexp { +([-0-9.+eE]+) +triangles} $info full tri
+regexp { +([-0-9.+eE]+) +nodes} $info full nod
+
+if { $tri != 84 || $nod != 84 } {
+ puts "Faulty OCC364: here is shading problem"
+} else {
+ puts "Shading of OCC364 is OK"
+}
+
+set only_screen 1
+
+
+
--- /dev/null
+puts "================"
+puts "BUC61018"
+puts "OCC64"
+puts "================"
+puts ""
+
+set rd_ch 0
+set gr_ch 1
+set bl_ch 1
+
+vinit
+vtrihedron tri
+vtri_orig tri
+
+QAMoveTo 205 205
+QAUpdateLights
+
+set color [QAGetPixelColor 205 205]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd_int
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr_int
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl_int
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+}
+
+set only_screen 1
--- /dev/null
+puts "==========="
+puts "BUC60918"
+puts "OCC85"
+puts "==========="
+puts ""
+###############################
+## Shape drawn in transparency mode does not always eclipse another shapes
+###############################
+
+puts "=================================="
+puts "It takes visual check for this BUG"
+puts "=================================="
+
+pload OCAF
+
+box b2 20 20 20 5 5 5
+box b3 30 30 30
+box b4 10 20 25 7 7 7
+explode b3 f
+
+NewDocument D
+SetShape D 0:1:1 b3_2
+SetShape D 0:1:2 b2
+SetShape D 0:1:3 b4
+AISSet D 0:1:1 NS
+AISSet D 0:1:2 NS
+AISSet D 0:1:3 NS
+
+AISInitViewer D
+AISMaterial D 0:1:1 plastic
+AISMaterial D 0:1:2 plastic
+AISMaterial D 0:1:3 plastic
+AISTransparency D 0:1:1 0.6
+AISColor D 0:1:1 1
+AISDisplay D 0:1:1
+AISDisplay D 0:1:2
+AISDisplay D 0:1:3
+vfit
+vsetdispmode 1
+
+box b 10 10 10
+SetShape D 0:1:4 b
+AISSet D 0:1:4 NS
+AISDisplay D 0:1:4
+
+set rd_ch 78039
+set gr_ch 55294
+set bl_ch 9411
+
+QAUpdateLights
+set color [QAGetPixelColor 255 105]
+regexp {RED +: +([-0-9.+eE]+)} $color full rd
+regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
+regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
+
+set rd_int [expr int($rd * 1.e+05)]
+set gr_int [expr int($gr * 1.e+05)]
+set bl_int [expr int($bl * 1.e+05)]
+
+if { ${rd_int} != ${rd_ch} || ${gr_int} != ${gr_ch} || ${bl_int} != ${bl_ch} } {
+ puts "Error : colors are not equal"
+}
+
+set only_screen 1
+
+
--- /dev/null
+puts "==========="
+puts "BUC60918"
+puts "OCC85"
+puts "==========="
+puts ""
+###############################
+## Shape drawn in transparency mode does not always eclipse another shapes
+###############################
+
+puts "=================================="
+puts "It takes visual check for this BUG"
+puts "=================================="
+
+pload OCAF
+
+restore [locate_data_file buc60918-psm1.brep] psm1
+restore [locate_data_file buc60918-psm2.brep] psm2
+restore [locate_data_file buc60918-shl.brep] shl
+
+NewDocument D
+SetShape D 0:1:1 shl
+SetShape D 0:1:2 psm1
+SetShape D 0:1:3 psm2
+AISSet D 0:1:1 NS
+AISSet D 0:1:2 NS
+AISSet D 0:1:3 NS
+
+AISInitViewer D
+AISMaterial D 0:1:1 plastic
+AISMaterial D 0:1:2 plastic
+AISMaterial D 0:1:3 plastic
+AISTransparency D 0:1:1 0.6
+AISColor D 0:1:1 1
+AISDisplay D 0:1:1
+AISDisplay D 0:1:2
+AISDisplay D 0:1:3
+vsetdispmode 1
+
+box b 10 10 10
+SetShape D 0:1:4 b
+AISSet D 0:1:4 NS
+AISDisplay D 0:1:4
+vfit
+
+set rd_ch1 76862
+set gr_ch1 54117
+set bl_ch1 9019
+
+set rd_ch2 76078
+set gr_ch2 53725
+set bl_ch2 9019
+
+set color1 [QAGetPixelColor 263 140]
+regexp {RED +: +([-0-9.+eE]+)} $color1 full rd1
+regexp {GREEN +: +([-0-9.+eE]+)} $color1 full gr1
+regexp {BLUE +: +([-0-9.+eE]+)} $color1 full bl1
+
+set rd_int1 [expr int($rd1 * 1.e+05)]
+set gr_int1 [expr int($gr1 * 1.e+05)]
+set bl_int1 [expr int($bl1 * 1.e+05)]
+
+set color2 [QAGetPixelColor 230 123]
+regexp {RED +: +([-0-9.+eE]+)} $color2 full rd2
+regexp {GREEN +: +([-0-9.+eE]+)} $color2 full gr2
+regexp {BLUE +: +([-0-9.+eE]+)} $color2 full bl2
+
+set rd_int2 [expr int($rd2 * 1.e+05)]
+set gr_int2 [expr int($gr2 * 1.e+05)]
+set bl_int2 [expr int($bl2 * 1.e+05)]
+
+set status 1
+if { ${rd_int1} != ${rd_ch1} || ${gr_int1} != ${gr_ch1} || ${bl_int1} != ${bl_ch1} } {
+ set status 0
+}
+if { ${rd_int2} != ${rd_ch2} || ${gr_int2} != ${gr_ch2} || ${bl_int2} != ${bl_ch2} } {
+ set status 0
+}
+
+if { ${status} != 1 } {
+ puts "Error : colors are not equal"
+}
+
+set only_screen 1
+
+