From: abv Date: Fri, 7 Dec 2012 12:29:17 +0000 (+0400) Subject: Adding test cases from grid chl X-Git-Tag: V6_6_0_beta~177 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=a87752f31ed52df92f324598b1609235ce8e6b03 Adding test cases from grid chl --- diff --git a/tests/bugs/caf/begin b/tests/bugs/caf/begin new file mode 100755 index 0000000000..04f004b1d5 --- /dev/null +++ b/tests/bugs/caf/begin @@ -0,0 +1,9 @@ +pload DCAF + + + + + + + + diff --git a/tests/bugs/caf/buc60756 b/tests/bugs/caf/buc60756 new file mode 100755 index 0000000000..65c4fa3cce --- /dev/null +++ b/tests/bugs/caf/buc60756 @@ -0,0 +1,16 @@ +puts "===========" +puts "BUC60756" +puts "BUC60761" +puts "BUC60762" +puts "BUC60764" +puts "===========" + +Open [locate_data_file BUC60756_Doc.std] D + +###################################################################### +catch {file delete ${imagedir}/Doc2.std} + +SaveAs D ${imagedir}/Doc2.std +Close D +Open ${imagedir}/Doc2.std D + diff --git a/tests/bugs/caf/buc60790 b/tests/bugs/caf/buc60790 new file mode 100755 index 0000000000..d8c3f834a1 --- /dev/null +++ b/tests/bugs/caf/buc60790 @@ -0,0 +1,15 @@ +puts "===========" +puts "BUC60790" +puts "BUC60836" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +set ResultError [BUC60836 D] +if {${ResultError} != 0 } { + puts "BUC60790: Error = $ResultError" +} + diff --git a/tests/bugs/caf/buc60813 b/tests/bugs/caf/buc60813 new file mode 100755 index 0000000000..7207bed545 --- /dev/null +++ b/tests/bugs/caf/buc60813 @@ -0,0 +1,30 @@ +puts "===========" +puts "BUC60813" +puts "===========" + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +Label D 0:1 + +SetName D 0:1 SourceLabel +SetReal D 0:1 3.1415 + +set Result [CopyLabel D 0:1 0:2] +if { ${Result} == 0} { + puts "BUC60813: Error 1" +} else { + set Name [GetName D 0:2] + if { [string length ${Name}] == 0 } { + puts "BUC60813: Error 2" + } else { + set Result [CopyLabel D 0:2 0:3] + if { ${Result} == 0 } { + puts "BUC60813: Error 3" + } else { + puts "BUC60813: OK" + } + } +} diff --git a/tests/bugs/caf/buc60817 b/tests/bugs/caf/buc60817 new file mode 100755 index 0000000000..7c9bfbee15 --- /dev/null +++ b/tests/bugs/caf/buc60817 @@ -0,0 +1,16 @@ +puts "===========" +puts "BUC60817" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +set ResultError [BUC60817 D] +if { ${ResultError} != 0 } { + puts "BUC60817: Error = $ResultError" +} + diff --git a/tests/bugs/caf/buc60831 b/tests/bugs/caf/buc60831 new file mode 100755 index 0000000000..de30a8c5e1 --- /dev/null +++ b/tests/bugs/caf/buc60831 @@ -0,0 +1,50 @@ +puts "===========" +puts "BUC60831" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +set L 0:3 +Label D $L + +set Status 0 + +set Result [BUC60831_1 D] +if { ${Result} != 0 } { + puts "BUC60831: Error 1" + set Status 1 +} + +NewCommand D + +set Result [BUC60831_2 D $L] +if { ${Result} != 0 } { + puts "BUC60831: Error 2" + set Status 1 +} + +set Result [BUC60831_1 D] +if { ${Result} != 1 } { + puts "BUC60831: Error 3" + set Status 1 +} + +NewCommand D + +Undo D + +set Result [BUC60831_1 D] +if { ${Result} != 0 } { + puts "BUC60831: Error 4" + set Status 1 +} + +if { ${Status} != 0} then { + puts "BUC60831: Error" +} + diff --git a/tests/bugs/caf/buc60844 b/tests/bugs/caf/buc60844 new file mode 100755 index 0000000000..e7b378e7e4 --- /dev/null +++ b/tests/bugs/caf/buc60844 @@ -0,0 +1,39 @@ +puts "===========" +puts "BUC60844" +puts "BUC60845" +puts "===========" + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D +Label D 0:2 +Label D 0:2:1 +Label D 0:2:1:1 +Label D 0:2:1:2 +Label D 0:3 + +SetNode D 0:1 +SetNode D 0:2 +SetNode D 0:2:1 +SetNode D 0:2:1:1 +SetNode D 0:2:1:2 +SetNode D 0:3 + +InsertNodeAfter D 0:1 0:2 +InsertNodeAfter D 0:2 0:3 + +AppendNode D 0:2 0:2:1 + +AppendNode D 0:2:1 0:2:1:1 +InsertNodeAfter D 0:2:1:1 0:2:1:2 + +NewCommand D + +ForgetAll D 0:2:1 + +NewCommand D + +Undo D + + diff --git a/tests/bugs/caf/buc60846 b/tests/bugs/caf/buc60846 new file mode 100755 index 0000000000..29ae8527f6 --- /dev/null +++ b/tests/bugs/caf/buc60846 @@ -0,0 +1,37 @@ +puts "TODO OCC12345 ALL: Faulty : Present script does not work currently !!! SKETCH application is missing" +puts "TODO OCC12345 ALL: Tcl Exception" +puts "TODO OCC12345 ALL: TEST INCOMPLETE" + +puts "===========" +puts "BUC60846" +puts "===========" + +puts "Faulty : Present script does not work currently !!! SKETCH application is missing" +############################################################## + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +Label D 0:3 +NewSketch D 0:3 0 0 0 1 0 0 +Point D 0:3 10 20 +Point D 0:3 11 20 +Segment D 0:3 0:3:2:3 0:3:2:4 + +Point D 0:3 10 21 +Point D 0:3 11 21 +Segment D 0:3 0:3:2:9 0:3:2:10 + +Distance D 0:3 0:3:2:5 0:3:2:11 + +AISInitViewer D + +AISSet D 0:3:2:15 C + +AISDisplay D 0:3:2:15 + +NewCommand D + + diff --git a/tests/bugs/caf/buc60847 b/tests/bugs/caf/buc60847 new file mode 100755 index 0000000000..fe5e7ea784 --- /dev/null +++ b/tests/bugs/caf/buc60847 @@ -0,0 +1,18 @@ +puts "===========" +puts "BUC60847" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +box Shape 10 20 30 + +set ResultError [BUC60847 D Shape] +if { ${ResultError} != 0 } { + puts "BUC60847: Error = $ResultError" +} + diff --git a/tests/bugs/caf/buc60862 b/tests/bugs/caf/buc60862 new file mode 100755 index 0000000000..d4f3dc34f5 --- /dev/null +++ b/tests/bugs/caf/buc60862 @@ -0,0 +1,21 @@ +puts "===========" +puts "BUC60862" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +vertex V1 10 20 0 +vertex V2 20 10 0 + +catch {edge Shape ${V1} ${V2}} +catch {set ResultError [BUC60862 D $Shape]} + +if { ${ResultError} != 0 } { + puts "BUC60862: Error = $ResultError" +} + diff --git a/tests/bugs/caf/buc60867 b/tests/bugs/caf/buc60867 new file mode 100755 index 0000000000..7fc9a65c33 --- /dev/null +++ b/tests/bugs/caf/buc60867 @@ -0,0 +1,12 @@ +puts "===========" +puts "BUC60867" +puts "===========" + +pload QAcommands + +set ResultError [ BUC60867 [locate_data_file BUC60756_Doc.std] ] + +if { [regexp "0" $ResultError] != 1 } { + puts "Error : 1" +} + diff --git a/tests/bugs/caf/buc60910 b/tests/bugs/caf/buc60910 new file mode 100755 index 0000000000..2c476496a7 --- /dev/null +++ b/tests/bugs/caf/buc60910 @@ -0,0 +1,19 @@ +puts "===========" +puts "BUC60910" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +set ResultError [BUC60910 D] +if { ${ResultError} != 0 } { + puts "Error : 1" +} + +NewCommand D + + diff --git a/tests/bugs/caf/buc60917 b/tests/bugs/caf/buc60917 new file mode 100755 index 0000000000..2d52e7453f --- /dev/null +++ b/tests/bugs/caf/buc60917 @@ -0,0 +1,58 @@ +puts "===========" +puts "BUC60917" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +box b 10 10 10 +SetShape D 0:1:1 b + +AISInitViewer D + +OpenCommand D + +AISSet D 0:1:1 NS +AISWidth D 0:1:1 1.0 +set W [AISWidth D 0:1:1] +if { ${W} != 1 } { + puts "Error : 1" +} else { + AISDisplay D 0:1:1 + vfit + CommitCommand D + + puts "Doing Undo... " + + Undo D + AISRepaint D + AISRepaint D + + puts "And now, look: Redo!" + + Redo D + AISRepaint D + + set W [AISWidth D 0:1:1] + if { ${W} != 1 } { + puts "Error : 2" + } +} + +set 3dviewer 2 + + + + +# This TCL script demonstrates bug in AIS/OCAF viewer +# +# It needs an additional DRAW command to be defined for +# setting Width parameter of TPrsStd_AISPresentation attribute. +# The code for this command (AISWidth) is provided separately. +# +# The problem is that when width is set to AISPresentation attribute +# and Undo/redo are made, this causes error 'width is 0' in the viewer. +# It seems that width is not kept during Undo/Redo operations. + diff --git a/tests/bugs/caf/buc60921 b/tests/bugs/caf/buc60921 new file mode 100755 index 0000000000..0a5d834f30 --- /dev/null +++ b/tests/bugs/caf/buc60921 @@ -0,0 +1,79 @@ +puts "===========" +puts "BUC60921" +puts "BUC60954" +puts "===========" + +pload QAcommands + +# see end of script! +#set EXEID TCAF +set EXEID DRAWEXE +set BREP [locate_data_file BUC60921.brep] + +NewDocument D MDTV-Standard +UndoLimit D 100 + +set MemoryLeakage 0 +set i_max 10 +set IsFirstTime 1 +for {set i 1} {$i <= ${i_max}} {incr i} { + CommitCommand D + OpenCommand D + BUC60921 D 0:1:1 $BREP + + catch {exec ps -e -o vsz,comm | grep $EXEID } res + puts "Iteration $i: virtual memory consumption = $res" + set Mem1 [lindex ${res} 0] + if { ${IsFirstTime} == 1} { + set Mem0 ${Mem1} + set IsFirstTime 0 + } + CommitCommand D + OpenCommand D + Undo D + catch {exec ps -e -o vsz,comm | grep $EXEID } res + puts "Iteration $i: virtual memory consumption = $res" + set Mem2 [lindex ${res} 0] + set Delta [expr abs(${Mem2} - ${Mem1})] + set MemoryLeakage [expr ${MemoryLeakage} + ${Delta}] + puts " ${i} delta memory consumed: ${Delta} KB" +} + +set percent_max 5 +set percent [expr ${MemoryLeakage} / (double(${i_max}) * ${Mem0} ) * 100.] +puts "percent = ${percent}" + +if {${percent} > ${percent_max}} { + puts "BUC60921: Error . There is memory leakage during Undo/Redo" +} else { + puts "BUC60921: OK" +} + + +# This TCL script demonstrates memory leak in OCAF Undo/Redo +# +# The DRAW command TestOCAF (provided separately) just reads +# the specified brep file +# and puts it into the document on a given label. +# This operation is done and undone several times, +# and the problem is that each time additional memory +# (approximately equivalent to the size of shape) +# is consumed. +# +# While obviously it should not be so: even if Undo keeps the +# shape in memory as delta on Redo, this delta should be cleared +# by the next operation! +# +# The bug persists with any setting of variables MMGT_OPT and MMGT_MMAP +# (while with different initial size and step) and +# +# It seems that either delta is not completely freed, or some +# other data structures keep the shape memory + +#================================================ +# The two settings below are necessary to localize the script in order +# to identify DRAW process among others, and to define path to BREP file +# The BREP file should be big anough (>= 1Mb recommended) +set EXEID QATCAF +set BREP /users/det/files/GEAR.brep +#================================================ diff --git a/tests/bugs/caf/buc60925 b/tests/bugs/caf/buc60925 new file mode 100755 index 0000000000..523d0e5622 --- /dev/null +++ b/tests/bugs/caf/buc60925 @@ -0,0 +1,19 @@ +puts "===========" +puts "BUC60925" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 100 + +NewCommand D + +set ResultError [BUC60925 D] +if { ${ResultError} != 0 } { + puts "Error : 1" +} + +NewCommand D + + diff --git a/tests/bugs/caf/bug114 b/tests/bugs/caf/bug114 new file mode 100755 index 0000000000..23e7e155ed --- /dev/null +++ b/tests/bugs/caf/bug114 @@ -0,0 +1,63 @@ +puts "===========" +puts "OCC114" +puts "===========" + +#-------------------------------------------------------------------- +####### Setting value of memory leakage in percents of memory allocated by shape +set percent_max 10 +puts "Max memory leakage is $percent_max%" +####### Setting amount of iterations for computing leackage +set i_max 20 +puts "Amount of iterations is $i_max" +#-------------------------------------------------------------------- + +if ![string compare $tcl_platform(platform) "windows"] { + proc VMem { memory } { + upvar $memory mem + regsub "^.*PeakVirtualSize: *\(\[0-9\]*\) KB.*$" \ + [exec tlist [pid]] "\\1" mem + } +} else { + proc VMem { memory } { + upvar $memory mem + set mem [lindex [exec ps -o vsz -p [pid]] 1] + } +} + +NewDocument D MDTV-Standard +UndoLimit D 10 + +VMem Mem0 +restore [locate_data_file OCC114.brep] s +VMem Mem1 +#puts "... The peak memory consumed: [expr $Mem1 - $Mem0] KB" + +set MemoryLeakage 0 + +for {set i 1} {${i} <= ${i_max}} {incr i} { + + OpenCommand D + SetShape D 0:1 s + AbortCommand D + + VMem Mem2 + set Delta [expr $Mem2 - $Mem1] + set MemoryLeakage [expr $MemoryLeakage + $Delta] +# puts " $i delta memory consumed: $Delta KB" +} + + +if { $MemoryLeakage != 0 } then { + set percent [expr ${MemoryLeakage} / (double(${i_max}) * (${Mem1} - ${Mem0})) * 100.] +} else { + set percent 0 +} +puts "Current memory leakage in percents = ${percent}" + +if {${percent} > ${percent_max}} { + puts "OCC114: Error" +} else { + puts "OCC114: OK" +} + + diff --git a/tests/bugs/caf/bug158 b/tests/bugs/caf/bug158 new file mode 100755 index 0000000000..a6bb271088 --- /dev/null +++ b/tests/bugs/caf/bug158 @@ -0,0 +1,15 @@ +puts "==============" +puts "OCC158" +puts "==============" + +NewDocument D MDTV-Standard + +################################################################## +if { [catch {set res [SaveAs D ${imagedir}/OCC158.std]}] != 0 } { + puts "OCC158: Error" +} else { + file delete ${imagedir}/OCC158.std +} + + + diff --git a/tests/bugs/caf/bug261 b/tests/bugs/caf/bug261 new file mode 100755 index 0000000000..667a352d44 --- /dev/null +++ b/tests/bugs/caf/bug261 @@ -0,0 +1,31 @@ +puts "===========" +puts "OCC261" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 10 +NewCommand D +SetReal D 0:1 10 + +NewCommand D +SetReal D 0:1 20 + +NewCommand D +SetReal D 0:1 30 + +NewCommand D +SetReal D 0:1 40 + +Undo D +Undo D + +OCC261 D + +set Res [UndoLimit D] +if { [regexp " 0" $Res] != 1 } { + puts "OCC261: Error" +} + + diff --git a/tests/bugs/caf/bug282 b/tests/bugs/caf/bug282 new file mode 100755 index 0000000000..82d2a0f451 --- /dev/null +++ b/tests/bugs/caf/bug282 @@ -0,0 +1,21 @@ +puts "===========" +puts "OCC282" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard + +circle acirc 0 0 0 20 +mkedge anEdge acirc +wire aWire anEdge + +plane pl 0 0 1 +mkface aface pl aWire + +NameImportShape D 0:1 aface + +if [catch { CheckNaming D 0:2 1 Label 0:1 1 1 1 } res] { + puts "OCC282: Error" +} + diff --git a/tests/bugs/caf/bug2932_1 b/tests/bugs/caf/bug2932_1 new file mode 100755 index 0000000000..a606183405 --- /dev/null +++ b/tests/bugs/caf/bug2932_1 @@ -0,0 +1,74 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 8 (TDataStd_IntegerArray) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set From 1 +set To 2 +set IntegerArray1 3 +set IntegerArray2 4 +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_IntegerArray +SetIntArray D ${Label} ${From} ${To} ${IntegerArray1} ${IntegerArray2} 0 +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_IntegerArray +SetIntArray D ${Label} ${From} ${To} ${IntegerArray1} ${IntegerArray2} 0 +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set length [llength ${list}] +set good_length 17 +puts "length = ${length}" +puts "good_length = ${good_length}" + +if { ${length} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} + + diff --git a/tests/bugs/caf/bug2932_2 b/tests/bugs/caf/bug2932_2 new file mode 100755 index 0000000000..0e07b5283e --- /dev/null +++ b/tests/bugs/caf/bug2932_2 @@ -0,0 +1,72 @@ +puts "================" +puts "OCC2932" +puts "================" +puts "" +####################################################################################### +# Create Attribute Delta depending on actual change of the attribute +####################################################################################### +# Case 14 (TDataStd_RealArray) +####################################################################################### + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Create a label and set attributes +NewCommand D +set Label 0:2 + +############################################ +set From 1 +set To 2 +set RealArray1 3. +set RealArray2 4. +############################################ + +set Real1 300. +set Real2 400. +set modified_attribute TDataStd_Real + +############################################ +# Set TDataStd_RealArray +SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0 +############################################ + +SetReal D ${Label} ${Real1} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +############################################ +# Set old value for TDataStd_RealArray +SetRealArray D ${Label} ${From} ${To} ${RealArray1} ${RealArray2} 0 +############################################ + +# Set new value for TDataStd_Real +SetReal D ${Label} ${Real2} +set list [DumpCommand D] + +# Open a transaction +NewCommand D +set list [DumpCommand D] + +# Checking +set length [llength ${list}] +set good_length 17 +puts "length = ${length}" +puts "good_length = ${good_length}" + +if { ${length} != ${good_length} } { + puts "OCC2932 Error (case 1)" +} else { + set name_attribute [lindex ${list} [expr ${good_length} - 1]] + puts "name_attribute = ${name_attribute}" + puts "modified_attribute = ${modified_attribute}" + if {[string compare ${name_attribute} ${modified_attribute}] == 0} { + puts "OCC2932 OK" + } else { + puts "OCC2932 Error (case 2)" + } +} diff --git a/tests/bugs/caf/bug350 b/tests/bugs/caf/bug350 new file mode 100755 index 0000000000..827491185a --- /dev/null +++ b/tests/bugs/caf/bug350 @@ -0,0 +1,31 @@ +puts "===========" +puts "OCC350" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard + +vertex v1 0 0 -50 +vertex v2 0 100 -50 +vertex v3 100 0 -50 +line l1 0 0 -50 0 1 0 +line l2 0 100 -50 1 -1 0 +line l3 100 0 -50 -1 0 0 +mkedge e1 l1 v1 v2 +mkedge e2 l2 v2 v3 +mkedge e3 l3 v3 v1 +wire w e1 e2 e3 +plane pl 0 0 -50 0 0 1 +mkface f pl w +NameImportShape D 0:1 f +NamePrism D 0:2 0:1 250 0 0 1 +NameBox D 0:3 150 150 150 +GetShape D 0:2 aPrism +GetShape D 0:3 aBox +NameCut D 0:4 aPrism aBox + +if [catch { CheckNaming D 0:9 1 Label 0:4 1 1 1 } res] { + puts "OCC350: Error" +} + diff --git a/tests/bugs/caf/bug351 b/tests/bugs/caf/bug351 new file mode 100755 index 0000000000..c5b2ea4c90 --- /dev/null +++ b/tests/bugs/caf/bug351 @@ -0,0 +1,15 @@ +puts "===========" +puts "OCC351" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard + +NameBox D 0:1 100 100 100 +NamePrism D 0:2 0:1:1 200 -1 0 0 + +if [catch { CheckNaming D 0:3 1 Label 0:2 1 1 1 } res] { + puts "OCC351: Error" +} + diff --git a/tests/bugs/caf/bug352 b/tests/bugs/caf/bug352 new file mode 100755 index 0000000000..88a5647c3a --- /dev/null +++ b/tests/bugs/caf/bug352 @@ -0,0 +1,18 @@ +puts "===========" +puts "OCC352" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard + +NameBox D 0:1 100 100 100 +box abox 100 100 100 +ttranslate abox 100 0 50 +NameImportShape D 0:2 abox + +NameGlue D 0:3 0:1 0:2 + +if [catch { CheckNaming D 0:4 1 Label 0:3 1 1 1 } res] { + puts "OCC352: Error" +} diff --git a/tests/bugs/caf/bug355 b/tests/bugs/caf/bug355 new file mode 100755 index 0000000000..ae7d1733e1 --- /dev/null +++ b/tests/bugs/caf/bug355 @@ -0,0 +1,15 @@ +puts "===========" +puts "OCC355" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard + +NameCylinder D 0:1 20 100 0 Solid +NamePrism D 0:2 0:1:2 50 0 0 1 + +if [catch { CheckNaming D 0:3 1 Label 0:2 1 1 1 } res] { + puts "OCC355: Error" +} + diff --git a/tests/bugs/caf/bug361 b/tests/bugs/caf/bug361 new file mode 100755 index 0000000000..216c128128 --- /dev/null +++ b/tests/bugs/caf/bug361 @@ -0,0 +1,13 @@ +puts "=================" +puts "OCC361" +puts "BUC60995" +puts "=================" + +pload QAcommands + +NewDocument D MDTV-Standard + +if { [catch { OCC361 D }] } { + puts "OCC361: Error" +} + diff --git a/tests/bugs/caf/bug381_1 b/tests/bugs/caf/bug381_1 new file mode 100755 index 0000000000..3accee94e0 --- /dev/null +++ b/tests/bugs/caf/bug381_1 @@ -0,0 +1,17 @@ +puts "=================" +puts "OCC381" +puts "=================" +puts "" + +pload QAcommands + +NewDocument D MDTV-Standard + +###################################################### +catch { SaveAs D ${imagedir}/OCC381.std } + +if { [catch { OCC381_Save D } ] } { + puts "OCC381: Error" +} else { + file delete ${imagedir}/OCC381.std +} diff --git a/tests/bugs/caf/bug381_2 b/tests/bugs/caf/bug381_2 new file mode 100755 index 0000000000..4abf85bce9 --- /dev/null +++ b/tests/bugs/caf/bug381_2 @@ -0,0 +1,16 @@ +puts "=================" +puts "OCC381" +puts "=================" +puts "" + +pload QAcommands + +NewDocument D MDTV-Standard + +###################################################### +if { [catch { OCC381_SaveAs D ${imagedir}/OCC381.std}] } { + puts "OCC381: Error" +} else { + file delete ${imagedir}/OCC381.std +} + diff --git a/tests/bugs/caf/bug387 b/tests/bugs/caf/bug387 new file mode 100755 index 0000000000..f3f84ff44b --- /dev/null +++ b/tests/bugs/caf/bug387 @@ -0,0 +1,23 @@ +puts "===========" +puts "OCC387" +puts "SAM1452" +puts "===========" + +NewDocument D MDTV-Standard +UndoLimit D 10 +NewCommand D +SetVariable D 0:1 0 a +SetRelation D 0:1 a=10 0:1 +SetReal D 0:1 10 + +NewCommand D +SetRelation D 0:1 a=20 0:1 +SetReal D 0:1 20 +NewCommand D +Undo D +set Res [DumpRelation D 0:1] + +if { [regexp "a=20" $Res] == 1 } { + puts "OCC387: Error " +} + diff --git a/tests/bugs/caf/bug425 b/tests/bugs/caf/bug425 new file mode 100755 index 0000000000..98a11b5bbc --- /dev/null +++ b/tests/bugs/caf/bug425 @@ -0,0 +1,55 @@ +puts "===========" +puts "OCC425" +puts "OCC414" +puts "===========" +###################################################### +# Exception on attemp to save a document that contains empty TDataStd_Name +###################################################### +# Crash on NT during document saving (SAM1344-#2153) +###################################################### + +set IsGood 1 + +NewDocument D MDTV-Standard +UndoLimit D 10 + +# Add an attribute to a data framework +set aSetAttr1 "" +set aLabel 0:2 +Label D ${aLabel} +SetName D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile ${imagedir}/OCC425.std +catch {file delete ${aFile}} +SaveAs D ${aFile} +if { ![file exists ${aFile}] } { + puts "There is not ${aFile} file; SaveAs command: Error" + set IsGood 0 +} +catch {exec chmod 777 ${aFile}} + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set aGetAttr3 "" +set IsDone [catch {set aGetAttr3 [GetName DD ${aLabel}]} aResult] +if { ${IsDone} != 0 } { + puts "OCC425: Error" + set IsGood 0 +} +if { ${aSetAttr1}!=${aGetAttr3} } { + puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}" + puts "Get a value of TDataStd_Name attribute from restoring document: Error" + set IsGood 0 +} + +if { ${IsGood} != 1 } { + puts "OCC425: Error" +} + diff --git a/tests/bugs/caf/bug73_1 b/tests/bugs/caf/bug73_1 new file mode 100755 index 0000000000..7049532680 --- /dev/null +++ b/tests/bugs/caf/bug73_1 @@ -0,0 +1,46 @@ +puts "===========" +puts "OCC73" +puts "BUC61050" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 10 + +# Close/Open transaction +NewCommand D + +# Set NamedShape attribute +box aBox1 100 200 300 +set aLabel 0:2 +SetShape D ${aLabel} aBox1 + +# Initialize 3D viewer +AISInitViewer D + +# Add AISPresentation attribute with parameter NS +AISSet D ${aLabel} NS + +# Display presentation of NamedShape in the viewer +AISDisplay D ${aLabel} + +# Get a selection mode of the shape +set SelectionMode0 [OCC73_SelectionMode D ${aLabel}] + +# Set a selection mode of the shape as 1 +set SelectionMode 1 +OCC73_SelectionMode D ${aLabel} ${SelectionMode} + +# Get a selection mode of the shape +set SelectionMode1 [OCC73_SelectionMode D ${aLabel}] + +puts "SelectionMode0 = ${SelectionMode0}" +puts "SelectionMode1 = ${SelectionMode1}" +puts "SelectionMode = ${SelectionMode}" + +if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode}} then { + puts "OCC73: Error" +} else { + puts "OCC73: OK" +} diff --git a/tests/bugs/caf/bug73_2 b/tests/bugs/caf/bug73_2 new file mode 100755 index 0000000000..cd8e92839d --- /dev/null +++ b/tests/bugs/caf/bug73_2 @@ -0,0 +1,59 @@ +puts "===========" +puts "OCC73" +puts "BUC61050" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 10 + +# Close/Open transaction +NewCommand D + +# Set NamedShape attribute +box aBox1 100 200 300 +set aLabel 0:2 +SetShape D ${aLabel} aBox1 + +# Initialize 3D viewer +AISInitViewer D + +# Add AISPresentation attribute with parameter NS +AISSet D ${aLabel} NS + +# Display presentation of NamedShape in the viewer +AISDisplay D ${aLabel} + +# Get a selection mode of the shape +set SelectionMode0 [OCC73_SelectionMode D ${aLabel}] + +# Set a selection mode of the shape as 1 +set SelectionMode 1 +OCC73_SelectionMode D ${aLabel} ${SelectionMode} + +# Get a selection mode of the shape +set SelectionMode1 [OCC73_SelectionMode D ${aLabel}] + +# Close/Open transaction +NewCommand D + +# Undo +Undo D + +# Redo +Redo D + +# Get a selection mode of the shape +set SelectionMode2 [OCC73_SelectionMode D ${aLabel}] + +puts "SelectionMode0 = ${SelectionMode0}" +puts "SelectionMode1 = ${SelectionMode1}" +puts "SelectionMode = ${SelectionMode}" +puts "SelectionMode2 = ${SelectionMode2}" + +if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then { + puts "OCC73: Error" +} else { + puts "OCC73: OK" +} diff --git a/tests/bugs/caf/bug73_3 b/tests/bugs/caf/bug73_3 new file mode 100755 index 0000000000..a9cb3ababe --- /dev/null +++ b/tests/bugs/caf/bug73_3 @@ -0,0 +1,69 @@ +puts "===========" +puts "OCC73" +puts "BUC61050" +puts "===========" + +pload QAcommands + +NewDocument D MDTV-Standard +UndoLimit D 10 + +# Close/Open transaction +NewCommand D + +# Set NamedShape attribute +box aBox1 100 200 300 +set aLabel 0:2 +SetShape D ${aLabel} aBox1 + +# Initialize 3D viewer +AISInitViewer D + +# Add AISPresentation attribute with parameter NS +AISSet D ${aLabel} NS + +# Display presentation of NamedShape in the viewer +AISDisplay D ${aLabel} + +# Get a selection mode of the shape +set SelectionMode0 [OCC73_SelectionMode D ${aLabel}] + +# Set a selection mode of the shape as 1 +set SelectionMode 1 +OCC73_SelectionMode D ${aLabel} ${SelectionMode} + +# Get a selection mode of the shape +set SelectionMode1 [OCC73_SelectionMode D ${aLabel}] + +# Close/Open transaction +NewCommand D + +# Forget the attribute +ForgetAll D ${aLabel} +NewCommand D + +# Undo-Redo-Undo +Undo D +Redo D +Undo D + +# Get a selection mode of the shape +set IsDone [catch {set SelectionMode2 [OCC73_SelectionMode D ${aLabel}]} aResult] + +if { ${IsDone} != 0 } { + puts "OCC73: Error" + puts ${aResult} +} else { + +puts "SelectionMode0 = ${SelectionMode0}" +puts "SelectionMode1 = ${SelectionMode1}" +puts "SelectionMode = ${SelectionMode}" +puts "SelectionMode2 = ${SelectionMode2}" + +if {${SelectionMode0} == ${SelectionMode1} || ${SelectionMode1} != ${SelectionMode} || ${SelectionMode1} != ${SelectionMode2}} then { + puts "OCC73: Error" +} else { + puts "OCC73: OK" +} + +} diff --git a/tests/bugs/fclasses/buc60724 b/tests/bugs/fclasses/buc60724 new file mode 100755 index 0000000000..a3ac3be7de --- /dev/null +++ b/tests/bugs/fclasses/buc60724 @@ -0,0 +1,11 @@ +puts "TODO OCC12345 ALL: Faulty : the first string is not zero string :" +puts "TODO OCC12345 ALL: Faulty : the second string is not zero string :" + +puts "==========" +puts "BUC60724" +puts "==========" + +pload QAcommands + +BUC60724 + diff --git a/tests/bugs/fclasses/buc60727 b/tests/bugs/fclasses/buc60727 new file mode 100755 index 0000000000..fb890f624d --- /dev/null +++ b/tests/bugs/fclasses/buc60727 @@ -0,0 +1,14 @@ +puts "=============" +puts "BUC60727" +puts "=============" + +pload QAcommands + +set start [BUC60727] +set n [llength $start] +set end [lindex $start [expr $n-1]] + +if { $end != 3} { + puts "Faulty : Incorrect converting of the unit" +} + diff --git a/tests/bugs/fclasses/buc60944 b/tests/bugs/fclasses/buc60944 new file mode 100755 index 0000000000..255ce8cff2 --- /dev/null +++ b/tests/bugs/fclasses/buc60944 @@ -0,0 +1,8 @@ +puts "========" +puts "BUC60944" +puts "========" +puts "" + +pload QAcommands + +BUC60944 "../../.." diff --git a/tests/bugs/fclasses/bug132_1 b/tests/bugs/fclasses/bug132_1 new file mode 100755 index 0000000000..42e91a6c4d --- /dev/null +++ b/tests/bugs/fclasses/bug132_1 @@ -0,0 +1,12 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1/word2} res] { + puts "Error : OCC132" +} + diff --git a/tests/bugs/fclasses/bug132_2 b/tests/bugs/fclasses/bug132_2 new file mode 100755 index 0000000000..33ab96ff5e --- /dev/null +++ b/tests/bugs/fclasses/bug132_2 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1:word2} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug132_3 b/tests/bugs/fclasses/bug132_3 new file mode 100755 index 0000000000..b8fca656be --- /dev/null +++ b/tests/bugs/fclasses/bug132_3 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1*word2} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug132_4 b/tests/bugs/fclasses/bug132_4 new file mode 100755 index 0000000000..4923cfe89a --- /dev/null +++ b/tests/bugs/fclasses/bug132_4 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1?word2} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug132_5 b/tests/bugs/fclasses/bug132_5 new file mode 100755 index 0000000000..14a2cce024 --- /dev/null +++ b/tests/bugs/fclasses/bug132_5 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1\"word2} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug132_6 b/tests/bugs/fclasses/bug132_6 new file mode 100755 index 0000000000..8cd6364e7e --- /dev/null +++ b/tests/bugs/fclasses/bug132_6 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1word2} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug132_8 b/tests/bugs/fclasses/bug132_8 new file mode 100755 index 0000000000..1a59d4ded2 --- /dev/null +++ b/tests/bugs/fclasses/bug132_8 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1|word2} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug132_9 b/tests/bugs/fclasses/bug132_9 new file mode 100755 index 0000000000..9deb676b83 --- /dev/null +++ b/tests/bugs/fclasses/bug132_9 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC132" +puts "BUC61029" +puts "BUC61030" +puts "========" + +pload QAcommands + +if [catch {OCC132 word1.word2.word3} res] { + puts "Error : OCC132" +} diff --git a/tests/bugs/fclasses/bug39 b/tests/bugs/fclasses/bug39 new file mode 100755 index 0000000000..348161d797 --- /dev/null +++ b/tests/bugs/fclasses/bug39 @@ -0,0 +1,13 @@ +puts "========" +puts "OCC39" +puts "========" + +pload QAcommands + +if ![string compare $tcl_platform(platform) "windows"] { + OCC39 W:\pak.per 0 res + puts [checkshape res] +} else { + puts "Thes case for WNT only!" +} + diff --git a/tests/bugs/fclasses/bug63 b/tests/bugs/fclasses/bug63 new file mode 100755 index 0000000000..cd15f8e020 --- /dev/null +++ b/tests/bugs/fclasses/bug63 @@ -0,0 +1,10 @@ +puts "================" +puts "OCC63" +puts "================" +puts "" + +restore [locate_data_file OCC63_×Ú.brep] result +puts [checkshape result] + +set 2dviewer 0 + diff --git a/tests/bugs/modalg/buc60462_1 b/tests/bugs/modalg/buc60462_1 new file mode 100755 index 0000000000..faa1e299dd --- /dev/null +++ b/tests/bugs/modalg/buc60462_1 @@ -0,0 +1,23 @@ +puts "TODO OCC12345 ALL: Faulty : Section is incorrect" +puts "TODO OCC12345 ALL: Error : The length of result shape is" + +puts "=============" +puts "BUC60462" +puts "=============" +puts "Section" +puts "" + +restore [locate_data_file buc60462a.brep] a +puts [checkshape a] +restore [locate_data_file buc60462b.brep] b +puts [checkshape b] +bsection result a b + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full cs + +if { $cs != 0 } { + puts "Faulty : Section is incorrect" +} + +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60462_2 b/tests/bugs/modalg/buc60462_2 new file mode 100755 index 0000000000..c3a7fe1432 --- /dev/null +++ b/tests/bugs/modalg/buc60462_2 @@ -0,0 +1,26 @@ +puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_17" +puts "TODO OCC12345 ALL: Faulty : mistakes are found in checked shape by checkshape command" +puts "TODO OCC12345 ALL: Error : The square of result shape is" + + +puts "==========" +puts "BUC60462" +puts "==========" + +restore [locate_data_file buc60462c.brep] a +puts [checkshape a] +restore [locate_data_file buc60462d.brep] b +puts [checkshape b] +puts "Fuse begin" +bfuse result a b +puts "Fuse end" + +set che [checkshape result r] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in checked shape by checkshape command" +} else { + puts "Checking by checkshape - OK" +} + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60463 b/tests/bugs/modalg/buc60463 new file mode 100755 index 0000000000..7a1fbd67ad --- /dev/null +++ b/tests/bugs/modalg/buc60463 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Faulty : Section is incorrect" + +puts "=============" +puts "BUC60463" +puts "=============" +puts "Section" +puts "" +cpulimit 1400 +restore [locate_data_file buc60463a.brep] a +puts [checkshape a] +restore [locate_data_file buc60463b.brep] b +puts [checkshape b] +bsection result a b + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full cs +if { $cs != 0 } { + puts "Faulty : Section is incorrect" +} +set length 0 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/buc60555_2 b/tests/bugs/modalg/buc60555_2 new file mode 100755 index 0000000000..11a7c0bd10 --- /dev/null +++ b/tests/bugs/modalg/buc60555_2 @@ -0,0 +1,54 @@ +puts "=============" +puts "BUC60555" +puts "CUT Case2" +puts "=============" +cpulimit 1400 +restore [locate_data_file buc60555a.brep] part +puts [checkshape part] +restore [locate_data_file buc60555b.brep] trTool1 +puts [checkshape trTool1] + +halfspace hs1 trTool1 20000 10000 0 +bcut cut1 part hs1 +puts [checkshape cut1] + +set che [checkshape cut1 r] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in checked shape by checkshape command" +} else { + puts "Checking by checkshape - OK" +} + +puts [maxtolerance cut1] + +restore [locate_data_file buc60555c.brep] trTool2 +halfspace hs2 trTool2 10000 10000 0 +bcut cut2 cut1 hs2 + +tcopy cut2 result + +explode cut2 e +mkcurve cu1 cut2_1 +mkcurve cu2 cut2_2 +mkcurve cu3 cut2_3 +mkcurve cu4 cut2_4 + +set che [checkshape cut2 r] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in checked shape by checkshape command" +} else { + puts "Checking by checkshape - OK" +} + +puts [checkshape cut2] +set tolerance [ maxtolerance cut2 ] +regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance +regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance +regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance +if { $MaxFaceTolerance > 1 || $MaxEdgeTolerance > 1 || $MaxVertexTolerance > 1 } { + puts "Faulty : Tolerance of shape is more then 1.0" +} else { + puts "Tolerance of shape is less then 1.0" +} +set square 4.52817e+07 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60555_3 b/tests/bugs/modalg/buc60555_3 new file mode 100755 index 0000000000..7552a71cf7 --- /dev/null +++ b/tests/bugs/modalg/buc60555_3 @@ -0,0 +1,70 @@ +puts "==============" +puts "BUC60555" +puts "CUT Case 3" +puts "==============" +cpulimit 5000 +restore [locate_data_file buc60555a.brep] part +puts [checkshape part] +restore [locate_data_file buc60555b.brep] trTool1 +puts [checkshape trTool1] + +halfspace hs1 trTool1 20000 10000 0 +bcut cut1 part hs1 +puts [checkshape cut1] + +set che [checkshape cut1 r] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in checked shape by checkshape command" +} else { + puts "Checking by checkshape - OK" +} + +maxtolerance cut1 + +restore [locate_data_file buc60555c.brep] trTool2 +halfspace hs2 trTool2 10000 10000 0 +bcut cut2 cut1 hs2 +puts [checkshape cut2] + +set che [checkshape cut2 r] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in checked shape by checkshape command" +} else { + puts "Checking by checkshape - OK" +} + +maxtolerance cut2 + +restore [locate_data_file buc60555d.brep] trTool3 +halfspace hs3 trTool3 20000 1000 0 +bcut cut3 cut2 hs3 + +tcopy cut3 result + +explode cut3 e +mkcurve cu1 cut3_1 +mkcurve cu2 cut3_2 +mkcurve cu3 cut3_3 +mkcurve cu4 cut3_4 + +set che [checkshape cut3 r] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in checked shape by checkshape command" +} else { + puts "Checking by checkshape - OK" +} + +puts [checkshape cut3 ] + +set tolerance [ maxtolerance cut3 ] +regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxFaceTolerance +regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxEdgeTolerance +regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tolerance full MaxVertexTolerance + +if { $MaxFaceTolerance > 1 || $MaxEdgeTolerance > 1 || $MaxVertexTolerance > 1 } { + puts "Faulty : Tolerance of shape is more then 1.0" +} else { + puts "Tolerance of shape is less then 1.0" +} +set square 2.22138e+07 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60585_1 b/tests/bugs/modalg/buc60585_1 new file mode 100755 index 0000000000..e9bfd3606d --- /dev/null +++ b/tests/bugs/modalg/buc60585_1 @@ -0,0 +1,18 @@ + +puts "========================" +puts "BUC60585" +puts "========================" + +restore [locate_data_file buc60585a.brep] s +puts [checkshape s] +plane ps 2036.25 -97.5 -1460.499755859375 0.0 -0.75103523489975432 -0.66026212668838646 1.0 0.0 0.0 + +psection result s ps + +set length 117.81 +set 2dviewer 0 + +## set num [lindex [checksection res] 4] +# if { $num != 0 } { +# puts " Faulty : Result shape is Unclosed !!! " +# } diff --git a/tests/bugs/modalg/buc60649 b/tests/bugs/modalg/buc60649 new file mode 100755 index 0000000000..8cf1ac658b --- /dev/null +++ b/tests/bugs/modalg/buc60649 @@ -0,0 +1,20 @@ +puts "==========" +puts "BUC60649" +puts "BUC60657" +puts "==========" +puts "" + +restore [locate_data_file buc60649a.brep] a +puts [checkshape a] + +set che [checkshape a rr] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in SOURCE shape by checkshape command" + puts "Body of the script was not executed" +} else { + puts "Checking of SOURCE shape by checkshape - OK" + mkoffset result a 1 1 + renamevar result_1 result +} +set length 271.473 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60663_2 b/tests/bugs/modalg/buc60663_2 new file mode 100755 index 0000000000..1a075edf34 --- /dev/null +++ b/tests/bugs/modalg/buc60663_2 @@ -0,0 +1,33 @@ +puts "TODO OCC12345 ALL: Faulty : the distanse is" +puts "TODO OCC12345 ALL: Error : The length of result shape is" + +puts "=====================================" +puts "BUC60663" +puts "=====================================" +puts "" +puts "It takes visual check for this BUG." +puts "=====================================" +puts "" + +restore [locate_data_file buc60663a.brep] a +puts [checkshape a] +restore [locate_data_file buc60663b.brep] b +puts [checkshape b] + +bsection result a b + +set expl [explode result v] +set len [llength $expl] +set ver [lindex $expl [expr $len - 1]] +explode b e +explode b_4 v +distmini d $ver b_5 + +regexp {([-0-9.+eE]+)} [dump d_val] full dist +regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [maxtolerance $ver] full toler + +if {$dist > $toler} { + puts "Faulty : the distanse is $dist. It is more $toler." +} +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60669 b/tests/bugs/modalg/buc60669 new file mode 100755 index 0000000000..1e09f79488 --- /dev/null +++ b/tests/bugs/modalg/buc60669 @@ -0,0 +1,21 @@ +pload QAcommands + +puts "==================" +puts "BUC60669" +puts "==================" +puts "" +############################################################# +## An exception was caught OSD_SIGBUS: SIGBUS 'bus error' detected.** +## Exception ** OSD_SIGBUS: SIGBUS 'bus error' detected. +############################################################# + +restore [locate_data_file buc60669a.brep] shell1 +puts [checkshape shell1] +restore [locate_data_file buc60669b.brep] shell2 +puts [checkshape shell2] + +ksection result shell1 shell2 1000 0.0001 0.00001 0 + +#checksection res +set length 104.754 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60682 b/tests/bugs/modalg/buc60682 new file mode 100755 index 0000000000..7e6f017a1c --- /dev/null +++ b/tests/bugs/modalg/buc60682 @@ -0,0 +1,32 @@ +puts "TODO OCC12345 ALL: Faulty BUC60682" +puts "TODO OCC12345 ALL: Error : The square of result shape is" +puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_5" + +pload QAcommands + +puts "==================" +puts "BUC60682" +puts "==================" + +restore [locate_data_file buc60682a.brep] shell1 +restore [locate_data_file buc60682b.brep] shell2 + +set che [checkshape shell1] +if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60682 (shell 1): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar shell1 result +} else { + puts "BUC60682 OK (shell 1): Source shape is valid" + set che [checkshape shell2] + if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60682 (shell 2): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar shell2 result + } else { + puts "BUC60682 OK (shell 2): Source shape is valid" + ksection result shell1 shell2 1000 0.0001 0.00001 0 + } +} +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60690 b/tests/bugs/modalg/buc60690 new file mode 100755 index 0000000000..c14362b9ab --- /dev/null +++ b/tests/bugs/modalg/buc60690 @@ -0,0 +1,48 @@ +puts "TODO OCC12345 ALL: Faulty : The distance between" +puts "TODO OCC12345 ALL: Error : The length of result shape is" + +puts "========================" +puts "BUC60690" +puts "========================" +puts "" + +restore [locate_data_file buc60690a.brep] a +restore [locate_data_file buc60690b.brep] b + +set che [checkshape a] +if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60690 (shape 1): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar a result +} else { + puts "BUC60690 OK (shape 1): Source shape is valid" + set che [checkshape b] + if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60690 (shape 2): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar b result + } else { + puts "BUC60690 OK (shape 2): Source shape is valid" + + bsection result a b + + set le [explode result v] + distmini d1 result_1 b + distmini d2 [lindex $le [expr [llength $le] - 1]] b + + regexp {([-0-9.+eE]+)} [dump d1_val] full du1 + + if { [expr $du1 > 1e-7] } { + puts "Faulty : The distance between first vertex and shellB is $du1. It is more then 1e-7." + } + + regexp {([-0-9.+eE]+)} [dump d2_val] full du2 + if { [expr $du2 > 1e-7] } { + puts "Faulty : The distance between last vertex and shellB is $du2. It is more then 1e-7." + } + } +} +set length 0 +set 2dviewer 0 + + diff --git a/tests/bugs/modalg/buc60703_1 b/tests/bugs/modalg/buc60703_1 new file mode 100755 index 0000000000..d03204630b --- /dev/null +++ b/tests/bugs/modalg/buc60703_1 @@ -0,0 +1,38 @@ +puts "TODO OCC12345 ALL: An exception was caught" +puts "TODO OCC12345 ALL: Exception" +puts "TODO OCC12345 ALL: Faulty BUC60703: here is problem with FUSE operation" +puts "TODO OCC12345 ALL: Error : The command can not be build." + +puts "========================" +puts "BUC60703" +puts "=================================" +puts "Action with models with VERY BIG tolerance" +puts "=================================" +########################################## +## Crash during a fuse whilst two plans are tangent. +## ( Case has LIMITATION status currently ) +########################################## + +#cpulimit 9000 + +restore [locate_data_file buc60703a.brep] a +# maxtolerance a +puts [checkshape a] +restore [locate_data_file buc60703b.brep] b +# maxtolerance b +puts [checkshape b] + +if [catch {bfuse result a b } catch_result] { + puts "Faulty BUC60703: here is problem with FUSE operation" +} else { + puts "OK OCC348: function FUSE works ok" + if [catch {checkshape result } catch_result] { + puts "Faulty BUC60703 : here is checking problem." + } else { + puts "BUC60703 OK" + } + # maxtolerance res +} + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60708 b/tests/bugs/modalg/buc60708 new file mode 100755 index 0000000000..f92c581393 --- /dev/null +++ b/tests/bugs/modalg/buc60708 @@ -0,0 +1,24 @@ + +puts "===========" +puts "BUC60708" +puts "===========" + +restore [locate_data_file buc60708a.brep] a +puts [checkshape a] +restore [locate_data_file buc60708b.brep] b +puts [checkshape b] + +bcommon result a b + +set faces [explode result f] +set n [llength $faces] + +set end [lindex $faces [expr $n-1]] + +if { $end != "result_4" } { + puts " Faulty :Common operation was made wrongly" +} else { + puts " Common operation was made successfully" +} +set square 13.4871 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60712 b/tests/bugs/modalg/buc60712 new file mode 100755 index 0000000000..4e47b77e41 --- /dev/null +++ b/tests/bugs/modalg/buc60712 @@ -0,0 +1,50 @@ +puts "==========" +puts "BUC60712" +puts "==========" +puts "" +puts "==================================" +puts "It takes visual check for this BUG" +puts "==================================" + +# +# OCC22070: Grid Tests: CHL set, detected problems +# Problems: +# The shape buc60712a.brep is self-interferred. +# thus it can not be used as the argument for Boolean Operation Algorithm. +# +# Proposals: +# The Case chl/902/F3 should be removed or rewritten: + +restore [locate_data_file buc60712a.brep] a +puts [checkshape a] + +restore [locate_data_file buc60712b.brep] b +puts [checkshape b] + +# Recompute "a" shape +explode a f + +bop a_1 a_2 +bopfuse r12 + +bop a_3 a_4 +bopfuse r34 + +bop r12 r34 + +bopfuse r + +# Start boolean operation +bop r b +bopsection result + +# Check result +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num +# Resume +if { $num != 0 } { + puts " Faulty BUC60712: Result shape is INcorrect !!! " +} else { + puts "BUC60712 OK: Result shape is correct " +} +set length 1.88145 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60744 b/tests/bugs/modalg/buc60744 new file mode 100755 index 0000000000..e5cde98d9e --- /dev/null +++ b/tests/bugs/modalg/buc60744 @@ -0,0 +1,47 @@ +pload QAcommands + +puts "========================" +puts "BUC60744" +puts "========================" +puts "" + +restore [locate_data_file buc60744a.brep] a +restore [locate_data_file buc60744b.brep] b + +set che [checkshape a] +if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60744 (shape 1): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar a result +} else { + puts "BUC60744 OK (shape 1): Source shape is valid" + + set che [checkshape b] + if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60744 (shape 2): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar b result + } else { + puts "BUC60744 OK (shape 2): Source shape is valid" + + ksection result a b 1000 0.0001 0.00001 0 + + set ne [llength [explode result e]] + set nv [llength [explode result v]] + + if {$ne >= $nv} { + puts [format "Faulty : the number of edges is %s, but the number of vertexes is %s." $ne $nv] + } + } +} +bsection result a b + +set ne [llength [explode result e]] +set nv [llength [explode result v]] + +if {$ne >= $nv} { + puts [format "Faulty : the number of edges is %s, but the number of vertexes is %s." $ne $nv] +} + +set length 228.386 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60777 b/tests/bugs/modalg/buc60777 new file mode 100755 index 0000000000..1ef9960273 --- /dev/null +++ b/tests/bugs/modalg/buc60777 @@ -0,0 +1,24 @@ + +puts "========================" +puts "BUC60777" +puts "========================" + +profile p x 30 y -10 x 10 y 10 x 10 y 30 t -30 -20 t -30 20 +mkoffset result p 1 -1 +explode p w + +regexp {Mass +: +([-0-9.+eE]+)} [lprops result_1] full end +regexp {Mass +: +([-0-9.+eE]+)} [lprops p_1] full end1 + +if { $end >= $end1} { + puts " Faulty Mkoffset operation was made wrongly" + } else { + puts " Mkoffset operation was made successfully" +} + +# Lenth of "profile" : 203.733802110964 + +renamevar result_1 result + +set length 191.044 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60782_2 b/tests/bugs/modalg/buc60782_2 new file mode 100755 index 0000000000..d5526a846f --- /dev/null +++ b/tests/bugs/modalg/buc60782_2 @@ -0,0 +1,37 @@ +puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_2" +puts "TODO OCC12345 ALL: Faulty : mistakes are found in SOURCE shape by checkshape command" +puts "TODO OCC12345 ALL: Faulty BUC60782" +puts "TODO OCC12345 ALL: Error : The command can not be build." + +puts "========================" +puts "BUC60782" +puts "CASE 2" +puts "========================" +puts "" +puts "Results of Geom2d_OffsetCurve are sometimes strange (not correct). " +puts "" + +restore [locate_data_file buc60782b.brep] a +set che [checkshape a] +if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60782 (case 2): Source shape is invalid" +} else { + puts "BUC60782 OK (case 2): Sourse shape is correct" +} + +set che [checkshape a rr] +if { [regexp {OK} $che ] != 1} { + puts "Faulty : mistakes are found in SOURCE shape by checkshape command" + puts "Body of the script was not executed" +} else { + puts "Checking of SOURCE shape by checkshape - OK" + if [catch { mkoffset result a 1 10 } catch_result] { + puts "Faulty BUC60782: mkoffset works wrongly" + renamevar a result + } else { + puts "OK BUC60782: offset is created" + tpcompound result + } +} +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60787_1 b/tests/bugs/modalg/buc60787_1 new file mode 100755 index 0000000000..e7fd3c9330 --- /dev/null +++ b/tests/bugs/modalg/buc60787_1 @@ -0,0 +1,32 @@ +puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces" +puts "TODO OCC12345 ALL: Error : The square of result shape is" + +puts "========" +puts "BUC60787" +puts "BUC60783" +puts "========" + +#restore Common_Shell_Case2.brep S1 +#restore Common_Solid_Case2.brep S2 + +restore [locate_data_file buc60787a.brep] S1 +puts [checkshape S1] +restore [locate_data_file buc60787b.brep] S2 +puts [checkshape S1] + +bcommon result S1 S2 + +set nb_info [nbshapes result] + + +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1 + +if { $err != 0 || $err1 != 1} { + puts "Faulty : result should be a shell, but not a compound of faces" +} else { + puts "BUC60787 - OK" +} + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60787_2 b/tests/bugs/modalg/buc60787_2 new file mode 100755 index 0000000000..e65731c231 --- /dev/null +++ b/tests/bugs/modalg/buc60787_2 @@ -0,0 +1,29 @@ +puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces" +puts "TODO OCC12345 ALL: Error : The square of result shape is" + +puts "========" +puts "BUC60787" +puts "BUC60783" +puts "========" + +#restore Cut_Shell_Case2.brep S1 +#restore Cut_Solid_Case2.brep S2 + +restore [locate_data_file buc60787c.brep] S1 +puts [checkshape S1] +restore [locate_data_file buc60787d.brep] S2 +puts [checkshape S2] + +bcut result S1 S2 + +set nb_info [nbshapes result] +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1 + +if { $err != 0 || $err1 != 1} { + puts "Faulty : result should be a shell, but not a compound of faces" +} else { + puts "BUC60787 - OK" +} +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60788_2 b/tests/bugs/modalg/buc60788_2 new file mode 100755 index 0000000000..8380af764f --- /dev/null +++ b/tests/bugs/modalg/buc60788_2 @@ -0,0 +1,29 @@ +puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces" +puts "TODO OCC12345 ALL: Error : The square of result shape is" + +puts "========" +puts "BUC60788" +puts "case 3" +puts "========" + +#restore Cut_Shell_Case2.brep S1 +#restore Cut_Solid_Case2.brep S2 + +restore [locate_data_file buc60788e.brep] S1 +puts [checkshape S1] +restore [locate_data_file buc60787d.brep] S2 +puts [checkshape S2] + +bcut result S1 S2 + +set nb_info [nbshapes result] +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1 + +if { $err != 0 || $err1 != 1} { + puts "Faulty : result should be a shell, but not a compound of faces" +} else { + puts "BUC60788 - OK" +} +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60788_3 b/tests/bugs/modalg/buc60788_3 new file mode 100755 index 0000000000..3b8085c05b --- /dev/null +++ b/tests/bugs/modalg/buc60788_3 @@ -0,0 +1,29 @@ +puts "TODO OCC12345 ALL: Faulty : result should be a shell, but not a compound of faces" +puts "TODO OCC12345 ALL: Error : The square of result shape is" + +puts "========" +puts "BUC60788" +puts "case 2" +puts "========" + +#restore Common_Shell_Case2.brep S1 +#restore Common_Solid_Case2.brep S2 + +restore [locate_data_file buc60788c.brep] S1 +puts [checkshape S1] +restore [locate_data_file buc60787b.brep] S2 +puts [checkshape S1] + +bcommon result S1 S2 + +set nb_info [nbshapes result] +regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full err +regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full err1 + +if { $err != 0 || $err1 != 1} { + puts "Faulty : result should be a shell, but not a compound of faces" +} else { + puts "BUC60788 - OK" +} +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60789_1 b/tests/bugs/modalg/buc60789_1 new file mode 100755 index 0000000000..59aa0cd380 --- /dev/null +++ b/tests/bugs/modalg/buc60789_1 @@ -0,0 +1,27 @@ + +puts "========" +puts "BUC60789" +puts "========" +puts "" + +#restore buc60789a.brep S1 +restore [locate_data_file buc60787b.brep] S1 +### (by apn during classification) +puts [checkshape S1] +restore [locate_data_file buc60789b.brep] S2 +puts [checkshape S2] + +bcommon result S1 S2 + + +set nb_info [nbshapes result] +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed + +if { $ve != 0 && $ed != 0 } { + puts " BUC60789 OK: COMMON operation was made properly" +} else { + puts "Faulty BUC60789: COMMON operation was made wrongly" +} +set length 78.3594 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60789_2 b/tests/bugs/modalg/buc60789_2 new file mode 100755 index 0000000000..eee4f3921a --- /dev/null +++ b/tests/bugs/modalg/buc60789_2 @@ -0,0 +1,26 @@ + +puts "========" +puts "BUC60789" +puts "========" +puts "" + +#restore buc60789c.brep S1 +##by apn +restore [locate_data_file buc60787b.brep] S1 +puts [checkshape S1] +restore [locate_data_file buc60789d.brep] S2 +puts [checkshape S2] + +bcut result S2 S1 + +set nb_info [nbshapes result] +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed + + if { $ve != 0 && $ed != 0 } { + puts " BUC60789 OK: CUT operation was made properly" + } else { + puts "Faulty BUC60789: CUT operation was made wrongly" + } +set length 288.856 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60826 b/tests/bugs/modalg/buc60826 new file mode 100755 index 0000000000..893aaf595b --- /dev/null +++ b/tests/bugs/modalg/buc60826 @@ -0,0 +1,27 @@ +puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60826b.brep could not be found" +puts "TODO OCC12345 ALL: TEST INCOMPLETE" + +puts "========================" +puts "BUC60826" +puts "========================" + +#restore Model2-a.brep a +restore [locate_data_file BUC60826a.brep] a +puts [checkshape a] + +# restore Model2-b.brep b +restore [locate_data_file BUC60826b.brep] b +puts [checkshape b] + +bsection result a b + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full num + +if { $num != 0 } { + puts " Faulty BUC60826 : Result shape is Unclosed !!! " +} else { + puts "BUC60826 OK: Result shape is CORRECT !!! " +} +set length 0 +set 2dviewer 0 + diff --git a/tests/bugs/modalg/buc60827 b/tests/bugs/modalg/buc60827 new file mode 100755 index 0000000000..ac9e510b5c --- /dev/null +++ b/tests/bugs/modalg/buc60827 @@ -0,0 +1,52 @@ +puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60827d.brep could not be found" +puts "TODO OCC12345 ALL: TEST INCOMPLETE" + +puts "========================" +puts "BUC60827" +puts "========================" + +#restore Model3-a.brep a +restore [locate_data_file BUC60827c.brep] a + +#restore Model3-b.brep b +restore [locate_data_file BUC60827d.brep] b + +set che [checkshape a] +if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60827 (shape 1): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar a result +} else { + puts "BUC60827 OK (shape 1): Source shape is valid" + + set che [checkshape b] + if { [regexp {Faulty} $che ] == 1 } { + puts "Faulty BUC60827 (shape 2): Source shape is invalid. It was detected by Checkshape command" + puts "Body of the script was NOT executed" + renamevar b result + } else { + puts "BUC60827 OK (shape 2): Source shape is valid" + + bsection result a b + set rlen 0 + set rlen [llength [explode res v]] + if ([expr $rlen == 0]) { + puts "Faulty :The result of section is an empty compound." + } else { + distmini d1 res_1 a_1 + regexp {([-0-9.+eE]+)} [dump d1_val] full len1 + if ([expr $len1 > 1e-7]) { + puts "Faulty :The section is incomplite." + } else { + distmini d2 res_2 a_2 + regexp {([-0-9.+eE]+)} [dump d2_val] full len2 + if ([expr $len2 > 1e-7]) { + puts "Faulty :The section is incomplite." + } + } + } + } +} + +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60830_4 b/tests/bugs/modalg/buc60830_4 new file mode 100755 index 0000000000..1ef45baf52 --- /dev/null +++ b/tests/bugs/modalg/buc60830_4 @@ -0,0 +1,20 @@ +puts "=============" +puts "BUC60830" +puts "BUC60829" +puts "=============" + +restore [locate_data_file BUC60830-face2.brep] f +puts [checkshape f] + +set che [checkshape f rr] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in SOURCE shape by checkshape command" + puts "Body of the script was not executed" +} else { + puts "Checking of SOURCE shape by checkshape - OK" + mkoffset result f 1 3 + renamevar result_1 result +} + +set length 81.5088 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60853 b/tests/bugs/modalg/buc60853 new file mode 100755 index 0000000000..60ddd30505 --- /dev/null +++ b/tests/bugs/modalg/buc60853 @@ -0,0 +1,49 @@ +puts "TODO OCC12345 ALL: Tcl Exception: Error: file BUC60853_plane.brep could not be found" +puts "TODO OCC12345 ALL: TEST INCOMPLETE" + +puts "========" +puts "BUC60853" +puts "========" +puts "" +############################################################################### +##The exception Standard_NumericError is generated in the function TopOpeBRepTool_CurveTool::MakeCurves(). +## The error occurs only when approximate mode is switched on. The command in draw is : +## > section res err_face.brep err_plane.brep -a +############################################################################### + +restore [locate_data_file BUC60853_face.brep] face +restore [locate_data_file BUC60853_plane.brep] plane +puts [checkshape face] +puts [checkshape plane] + +bsection result face plane -a + + +# set text [nbshapes res] +# set ver [lindex $text 7] +# set edg [lindex $text 10] +# set com [lindex $text 28] + +set nb_info [nbshapes result] +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ver +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full edg + +# if { $com != 0} { +# puts " Faulty BUC60853: Result shape is COMPOUND, but it must be edge " +# set make_photo 0 +# } else { +if { $edg != 1} { + puts " Faulty BUC60853: Result shape contains more than one edge " + explode res v +} else { + if { $ver < 2} { + puts " Faulty BUC60853: Result edge contains less than two vertexes." + explode res v + } else { + puts " BUC60853 OK: Result of section operation is correct " + explode res v + } +} +#} +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60878_1 b/tests/bugs/modalg/buc60878_1 new file mode 100755 index 0000000000..68c7987224 --- /dev/null +++ b/tests/bugs/modalg/buc60878_1 @@ -0,0 +1,25 @@ +puts "=============" +puts "BUC60878" +puts "=============" + +#restore BUC60878-wire1.brep a +#########dtext -10 -10 -60 "THE CASE IS INCORRECT" +#mkoffset r a 1 0.5 +#tpcompound res +#checkshape res + +restore [locate_data_file BUC60878-wire1.brep] a +puts [checkshape a] + +set che [checkshape a rr] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in SOURCE shape by checkshape command" + puts "Body of the script was not executed" +} else { + puts "Checking of SOURCE shape by checkshape - OK" + mkoffset result a 1 0.5 + renamevar result_1 result +} + +set length 370.796 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60878_2 b/tests/bugs/modalg/buc60878_2 new file mode 100755 index 0000000000..fe21133d21 --- /dev/null +++ b/tests/bugs/modalg/buc60878_2 @@ -0,0 +1,25 @@ +puts "=============" +puts "BUC60878" +puts "=============" + +#restore BUC60878-wire3.brep a +#########dtext -10 -10 -60 "THE CASE IS INCORRECT" +#mkoffset r a 1 0.25 +#tpcompound res +#checkshape res + +restore [locate_data_file BUC60878-wire3.brep] a +puts [checkshape a] + +set che [checkshape a rr] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in SOURCE shape by checkshape command" + puts "Body of the script was not executed" +} else { + puts "Checking of SOURCE shape by checkshape - OK" + mkoffset result a 1 0.25 + renamevar result_1 result +} + +set length 11.2406 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60878_3 b/tests/bugs/modalg/buc60878_3 new file mode 100755 index 0000000000..f51378ebb7 --- /dev/null +++ b/tests/bugs/modalg/buc60878_3 @@ -0,0 +1,25 @@ +puts "=============" +puts "BUC60878" +puts "=============" + +#restore BUC60878-wire5.brep a +###############dtext 0 -10 0 "THE CASE IS INCORRECT" +#mkoffset r a 1 4 +#tpcompound res +#checkshape res + +restore [locate_data_file BUC60878-wire5.brep] a +puts [checkshape a] + +set che [checkshape a rr] +if { [regexp {OK} $che] != 1 } { + puts "Faulty : mistakes are found in SOURCE shape by checkshape command" + puts "Body of the script was not executed" +} else { + puts "Checking of SOURCE shape by checkshape - OK" + mkoffset result a 1 4 + renamevar result_1 result +} + +set length 107.351 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60880 b/tests/bugs/modalg/buc60880 new file mode 100755 index 0000000000..42e3529fe9 --- /dev/null +++ b/tests/bugs/modalg/buc60880 @@ -0,0 +1,38 @@ + +puts "============" +puts "BUC60880" +puts "============" +puts "" +########################################## +## We have overlapping edges when section a shell by plane. +########################################## + +restore [locate_data_file BUC60880_sec_error2.brep] sh +puts [checkshape sh] + +plane pl 65000 19000 2600 1 0 0 +mkface f pl + +bsection result sh f + +set nb_info [nbshapes result] +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full ed + +if { $ed == 1 } { + puts "BUC60880 OK: SECTION operation was made properly" +} else { + explode result e + set status [OCC333 result_1 result_2] + if {[llength ${status}] < 1} { + puts "BUC60880 ERROR" + } else { + regexp {([-0-9.+eE]+)} $status full code + if { ${code} == 3 || ${code} == 2} { + puts "BUC60880 : Section command works properly" + } else { + puts "Faulty BUC60880: Section was made WRONGLY" + } + } +} +set length 1424.94 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60882 b/tests/bugs/modalg/buc60882 new file mode 100755 index 0000000000..8d8183759a --- /dev/null +++ b/tests/bugs/modalg/buc60882 @@ -0,0 +1,46 @@ +puts "============" +puts "BUC60882" +puts "============" +puts "" +####################################################################### +## The edge is corrupted after applying command "fsameparameter": tolerance is increased up to 1e+50 +####################################################################### + +pload XDE +catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands } + +restore [locate_data_file BUC60882_samepar.brep] result + +set che [checkshape result] + +if { [regexp {Faulty} $che ] == 1 } { + puts "Warning BUC60882: Source shape is NOT correct. It was detected by Checkshape command" +} else { + puts "BUC60882 OK: Source shape is valid" +} + +puts "*** Before : " + +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol + +puts "MaxTolerance = $MaxTol" +if { $MaxTol > 1 } { + puts "Warning : Tolerance of Source edge is more then 1.0" +} else { + puts " Tolerance of source edge is less then 1.0" +} + +fsameparameter result 1e-5 + +puts "*** After : " +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol_1 + +puts "MaxTolerance = $MaxTol_1" +if { $MaxTol_1 > $MaxTol } { + puts [format "Faulty BUC60882 : Tolerance of Result edge increased and it is equal to %s" $MaxTol_1] +} else { + puts " BUC60882 OK: Tolerance of Result edge is less or equal to tolerance of Sourse edge." +} + +set length 1768.53 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60896 b/tests/bugs/modalg/buc60896 new file mode 100755 index 0000000000..6f8c0b5dcc --- /dev/null +++ b/tests/bugs/modalg/buc60896 @@ -0,0 +1,18 @@ + +puts "============" +puts "BUC60896" +puts "============" +puts "" +############################################################### +## If give command "sameparameter edge" on attached edge in the DRAW this command hang. +############################################################### + +restore [locate_data_file BUC60896_edge.rle] result +# checkshape res + +sameparameter result +sameparameter result tol 1.e-2 +sameparameter result tol 1000 + +set length 48288.3 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60898 b/tests/bugs/modalg/buc60898 new file mode 100755 index 0000000000..460a3a1e38 --- /dev/null +++ b/tests/bugs/modalg/buc60898 @@ -0,0 +1,36 @@ +puts "TODO OCC12345 ALL: Faulty BUC60898: here is reading problem" +puts "TODO OCC12345 ALL: Error : The command can not be build." + +puts "===========" +puts " BUC60898" +puts "===========" +puts "" + +pload XDE +catch { source $env(CSF_DrawPluginQADefaults)/QARebuildCommands } + +if [catch { igesbrep [locate_data_file $filedir/buc60898.igs] a *} result] { +## rename to BUC60898.igs + puts "Faulty BUC60898: here is reading problem" +} else { + puts "BUC60898 OK" + tpcompound a + + if [catch {sewing result 1e-7 a } catch_result] { + puts "Faulty BUC60898: function SEWING gives except" + } else { + puts " BUC60898 OK: function SEWING works without except" + } +} + +#checkshape res +#set che [checkshape res r] +#set err [lindex $che [expr [llength $che] - 1]] +#if { $err != "OK"} { +# puts "Faulty : mistakes are found in checked shape by checkshape command" +#} else { +# puts "Checking by checkshape - OK" +#} + +set square 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60922 b/tests/bugs/modalg/buc60922 new file mode 100755 index 0000000000..028506f469 --- /dev/null +++ b/tests/bugs/modalg/buc60922 @@ -0,0 +1,27 @@ + +puts "============" +puts "BUC60922" +puts "============" +puts "" +############################# +## Exception NumericError in Extrema +############################# + +restore [locate_data_file BUC60907_px1.rle] sh +puts [checkshape sh] + +line l 40 0 5 0 1 0 +mkedge e l +subshape sh F 379 +mksurface result sh_379 + +puts "Info: compute extrema" +extrema result l + +puts "Info: compute distmini" +distmini r sh e + +mkface result result + +set square 157.932 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60926 b/tests/bugs/modalg/buc60926 new file mode 100755 index 0000000000..48ee24c769 --- /dev/null +++ b/tests/bugs/modalg/buc60926 @@ -0,0 +1,20 @@ + +puts "============" +puts "BUC60926" +puts "============" +puts "" +###################################################################### +## Creating a sphere of radius 1 at 0,0,0 and a cone with r1=1 r2=2 height=2 angle=3*PI/2 at 1,1,0 and +## then using BRepAlgoAPI_Fuse on the two solids will trigger a segmentation fault. +###################################################################### + +restore [locate_data_file shading_132.brep] a +puts [checkshape a] + +restore [locate_data_file BUC60926-2.brep] b +puts [checkshape b] + +bfuse result a b + +set square 41.7175 +set 2dviewer 0 diff --git a/tests/bugs/modalg/buc60946 b/tests/bugs/modalg/buc60946 new file mode 100755 index 0000000000..6815b2822a --- /dev/null +++ b/tests/bugs/modalg/buc60946 @@ -0,0 +1,25 @@ + +puts "============" +puts "BUC60946" +puts "============" + +restore [locate_data_file BUC60946_prism.brep] c +explode c +puts [checkshape c_1] +puts [checkshape c_2] + +renamevar c_1 sh +renamevar c_2 pr +bsection result sh pr + +set nb_info [nbshapes result] +regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_vertices +regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_edges + +if { $nb_vertices != $nb_edges } { + puts "Section is opened: Faulty shape" +} else { + puts "Section is closed: OK" +} +set length 52.5057 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug110_1 b/tests/bugs/modalg/bug110_1 new file mode 100755 index 0000000000..d2a6868ab5 --- /dev/null +++ b/tests/bugs/modalg/bug110_1 @@ -0,0 +1,41 @@ + +puts "========================" +puts " BUC60706 " +puts " OCC110 " +puts "(cases 1-3)" +puts "========================" + +restore [locate_data_file buc60706a.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706b.brep] w +puts [checkshape w] +pipe t w f + +restore [locate_data_file buc60706c.brep] s +puts [checkshape s] + +bcut res_1 s t +puts [checkshape res_1] + +restore [locate_data_file buc60706d.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706e.brep] w +puts [checkshape w] +pipe t w f + +bcut res_2 res_1 t +puts [checkshape res_2] + +restore [locate_data_file buc60706g.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706h.brep] w +puts [checkshape w] +pipe t w f + +bcut result res_2 t + +set square 865172 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug110_2 b/tests/bugs/modalg/bug110_2 new file mode 100755 index 0000000000..ecd845a5a5 --- /dev/null +++ b/tests/bugs/modalg/bug110_2 @@ -0,0 +1,41 @@ + +puts "========================" +puts " BUC60706 " +puts " OCC110 " +puts "(case 4-6)" +puts "========================" + +restore [locate_data_file buc60706j.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706b.brep] w +puts [checkshape w] +pipe t w f + +restore [locate_data_file buc60706l.brep] s +puts [checkshape s] + +bcut res_1 s t +puts [checkshape res_1] + +restore [locate_data_file buc60706m.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706e.brep] w +puts [checkshape w] +pipe t w f + +bcut res_2 res_1 t +puts [checkshape res_2] + +restore [locate_data_file buc60706p.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706h.brep] w +puts [checkshape w] +pipe t w f + +bcut result res_2 t + +set square 860752 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug110_3 b/tests/bugs/modalg/bug110_3 new file mode 100755 index 0000000000..eaeeefcc4a --- /dev/null +++ b/tests/bugs/modalg/bug110_3 @@ -0,0 +1,41 @@ + +puts "========================" +puts " BUC60706 " +puts " OCC110 " +puts "(case 7-9)" +puts "========================" + +restore [locate_data_file buc60706s.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706b.brep] w +puts [checkshape w] +pipe t w f + +restore [locate_data_file buc60706l.brep] s +puts [checkshape s] + +bcut res_1 s t +puts [checkshape res_1] + +restore [locate_data_file buc60706v.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706e.brep] w +puts [checkshape w] +pipe t w f + +bcut res_2 res_1 t +puts [checkshape res_2] + +restore [locate_data_file buc60706x.brep] f +puts [checkshape f] + +restore [locate_data_file buc60706h.brep] w +puts [checkshape w] +pipe t w f + +bcut result res_2 t + +set square 861220 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug23 b/tests/bugs/modalg/bug23 new file mode 100755 index 0000000000..be9031fb08 --- /dev/null +++ b/tests/bugs/modalg/bug23 @@ -0,0 +1,29 @@ +puts "TODO OCC12345 ALL: Faulty OCC23 : Checkshape command works wrongly" +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "================" +puts "OCC23" +puts "================" +puts "" +##################################################################### +## Checkshape gives result that there is a selfintersection on wire, but there are no intersection on it. +##################################################################### + +restore [locate_data_file OCC23.brep] sh + +decho off +set che [checkshape sh] +decho on + +if { [regexp {Faulty} $che] == 1 } { + puts "Faulty OCC23 : Checkshape command works wrongly" +} else { + puts "OCC23 OK : Checkshape command works properly" +} + +explode sh f +explode sh_2 w + +renamevar sh_2_1 result + +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug238_1 b/tests/bugs/modalg/bug238_1 new file mode 100755 index 0000000000..a972612ebc --- /dev/null +++ b/tests/bugs/modalg/bug238_1 @@ -0,0 +1,31 @@ +puts "TODO OCC12345 ALL: Faulty : Result shape is WRONG !!!" +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "========================" +puts " OCC238 " +puts "========================" + +################################################# +## puts " BOPCOMMON case_2_solid.brep and case_2_edge1.brep" +################################################# +puts " " +puts [restore [locate_data_file OCC238a.brep] a] +puts [restore [locate_data_file case_2_edge1.brep] b] +puts [bop a b] +puts [bopcommon result b a] + +set nb_info [nbshapes result] +set nb_v_good 14 +set nb_e_good 7 + +explode result v +explode a e +distmini di result_1 a_3 +regexp {([-0-9.+eE]+)} [dump $di_val] full dis +if { [expr $dis > 1.e-5] } { + puts "Faulty : Result shape is WRONG !!!" +} else { + puts " Result shape is COMPLITE" +} + +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug238_2 b/tests/bugs/modalg/bug238_2 new file mode 100755 index 0000000000..8118745c11 --- /dev/null +++ b/tests/bugs/modalg/bug238_2 @@ -0,0 +1,31 @@ +puts "TODO OCC12345 ALL: Faulty : Result shape is WRONG !!!" +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "========================" +puts " OCC238 " +puts "========================" + +################################################# +## puts " BOPTUC case_2_solid.brep from case_2_edge1.brep" +################################################# +puts " " +puts [restore [locate_data_file OCC238a.brep] a] +puts [restore [locate_data_file case_2_edge1.brep] b] +puts [bop a b] +puts [boptuc result b a] + +set nb_info [nbshapes result] +set nb_v_good 14 +set nb_e_good 7 + +explode result v +explode a e +distmini di result_2 a_3 +regexp {([-0-9.+eE]+)} [dump $di_val] full dis +if { [expr $dis > 1.e-5] } { + puts "Faulty : Result shape is WRONG !!!" +} else { + puts " Result shape is COMPLITE" +} + +set length 0 +set 2dviewer 0 diff --git a/tests/bugs/modalg/bug239_1 b/tests/bugs/modalg/bug239_1 new file mode 100755 index 0000000000..855f90f4d3 --- /dev/null +++ b/tests/bugs/modalg/bug239_1 @@ -0,0 +1,23 @@ +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must contain" +puts "TODO OCC12345 ALL: Error : The length of result shape is" + +puts "========================" +puts " OCC239 " +puts "========================" + +################################################# +## puts " BOPCOMMON case_2_solid.brep and case_2_wire1.brep" +################################################# + puts " " +restore [locate_data_file OCC238a.brep] a +restore [locate_data_file case_2_wire1.brep] b + puts [bop a b] + puts [bopcommon result] + + set nb_info [nbshapes result] + set nb_v_good 18 + set nb_e_good 10 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug239_2 b/tests/bugs/modalg/bug239_2 new file mode 100755 index 0000000000..8d71b62150 --- /dev/null +++ b/tests/bugs/modalg/bug239_2 @@ -0,0 +1,20 @@ + +puts "========================" +puts " OCC239 " +puts "========================" + +################################################# +## puts " BOPTUC case_2_solid.brep and case_2_wire1.brep" +################################################# + puts " " +restore [locate_data_file OCC238a.brep] a +restore [locate_data_file case_2_wire1.brep] b + puts [bop a b] + puts [boptuc result] + set nb_info [nbshapes result] + set nb_v_good 18 + set nb_e_good 11 + +set length 2481.26 +set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug240_1 b/tests/bugs/modalg/bug240_1 new file mode 100755 index 0000000000..2f46893eb2 --- /dev/null +++ b/tests/bugs/modalg/bug240_1 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The command is not valid" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must" + +puts "========================" +puts " OCC240 " +puts "========================" + +################################################# +## puts " BOPCOMMON case_2_shell.brep and case_2_edge2.brep" +################################################# + puts " " +restore [locate_data_file OCC240a.brep] a +restore [locate_data_file case_2_edge2.brep] b + puts [bop a b] + puts [bopcommon result] + set nb_info [nbshapes result] + set nb_v_good 14 + set nb_e_good 6 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug240_2 b/tests/bugs/modalg/bug240_2 new file mode 100755 index 0000000000..d6575a3d93 --- /dev/null +++ b/tests/bugs/modalg/bug240_2 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must" +puts "TODO OCC12345 ALL: Error : The length of result shape is" + +puts "========================" +puts " OCC240 " +puts "========================" + +################################################# +## puts " BOPTUC case_2_shell.brep and case_2_edge2.brep" +################################################# + puts " " +restore [locate_data_file OCC240a.brep] a +restore [locate_data_file case_2_edge2.brep] b + puts [bop a b] + puts [boptuc result] + set nb_info [nbshapes result] + set nb_v_good 14 + set nb_e_good 7 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug241_1 b/tests/bugs/modalg/bug241_1 new file mode 100755 index 0000000000..5b01f27af8 --- /dev/null +++ b/tests/bugs/modalg/bug241_1 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The command is not valid" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must" + +puts "========================" +puts " OCC241 " +puts "========================" + +################################################# +## puts " BOPCOMMON case_2_shell.brep and case_2_edge3.brep" +################################################# + puts " " +restore [locate_data_file OCC240a.brep] a +restore [locate_data_file case_2_edge3.brep] b + puts [bop a b] + puts [bopcommon result] + set nb_info [nbshapes result] + set nb_v_good 6 + set nb_e_good 3 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug241_2 b/tests/bugs/modalg/bug241_2 new file mode 100755 index 0000000000..c6c1f019a3 --- /dev/null +++ b/tests/bugs/modalg/bug241_2 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must" + +puts "========================" +puts " OCC241 " +puts "========================" + +################################################# +## puts " BOPTUC case_2_shell.brep and case_2_edge3.brep" +################################################# + puts " " +restore [locate_data_file OCC240a.brep] a +restore [locate_data_file case_2_edge3.brep] b + puts [bop a b] + puts [boptuc result] + set nb_info [nbshapes result] + set nb_v_good 6 + set nb_e_good 3 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug242_1 b/tests/bugs/modalg/bug242_1 new file mode 100755 index 0000000000..b54049b791 --- /dev/null +++ b/tests/bugs/modalg/bug242_1 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The command is not valid" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must" + +puts "========================" +puts " OCC242 " +puts "========================" + +################################################# +## puts " BOPCOMMON case_2_shell.brep and case_2_wire1.brep" +################################################# + puts " " +restore [locate_data_file OCC240a.brep] a +restore [locate_data_file case_2_wire1.brep] b + puts [bop a b] + puts [bopcommon result] + set nb_info [nbshapes result] + set nb_v_good 18 + set nb_e_good 9 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug242_2 b/tests/bugs/modalg/bug242_2 new file mode 100755 index 0000000000..b6a9e6bf29 --- /dev/null +++ b/tests/bugs/modalg/bug242_2 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must" + +puts "========================" +puts " OCC242 " +puts "========================" + +################################################# +## puts " BOPTUC case_2_shell.brep and case_2_wire1.brep" +################################################# + puts " " +restore [locate_data_file OCC240a.brep] a +restore [locate_data_file case_2_wire1.brep] b + puts [bop a b] + puts [boptuc result] + set nb_info [nbshapes result] + set nb_v_good 18 + set nb_e_good 13 + + set length 0 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug243_1 b/tests/bugs/modalg/bug243_1 new file mode 100755 index 0000000000..19a30ca660 --- /dev/null +++ b/tests/bugs/modalg/bug243_1 @@ -0,0 +1,20 @@ + +puts "========================" +puts " OCC243 " +puts "========================" + +################################################# +## puts " BOPCOMMON case_4_shell.brep and case_4_wire3.brep" +################################################# + puts " " +restore [locate_data_file case_4_shell.brep] a +restore [locate_data_file case_4_wire3.brep] b + puts [bop a b] + puts [bopcommon result] + set nb_info [nbshapes result] + set nb_v_good 15 + set nb_e_good 10 + + set length 1150.78 + set 2dviewer 0 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug243_2 b/tests/bugs/modalg/bug243_2 new file mode 100755 index 0000000000..ed3f1fb67e --- /dev/null +++ b/tests/bugs/modalg/bug243_2 @@ -0,0 +1,20 @@ + +puts "========================" +puts " OCC243 " +puts "========================" + +################################################# +## puts " BOPTUC case_4_shell.brep and case_4_wire3.brep" +################################################# + puts " " +restore [locate_data_file case_4_shell.brep] a +restore [locate_data_file case_4_wire3.brep] b + puts [bop a b] + puts [boptuc result] + set nb_info [nbshapes result] + set nb_v_good 16 + set nb_e_good 11 + + set length 929.278 + set 2dviewer 1 + \ No newline at end of file diff --git a/tests/bugs/modalg/bug244 b/tests/bugs/modalg/bug244 new file mode 100755 index 0000000000..d7c0cea847 --- /dev/null +++ b/tests/bugs/modalg/bug244 @@ -0,0 +1,20 @@ + +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 diff --git a/tests/bugs/modalg/bug245_1 b/tests/bugs/modalg/bug245_1 new file mode 100755 index 0000000000..0c8f0169c7 --- /dev/null +++ b/tests/bugs/modalg/bug245_1 @@ -0,0 +1,20 @@ + +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 diff --git a/tests/bugs/modalg/bug245_2 b/tests/bugs/modalg/bug245_2 new file mode 100755 index 0000000000..10f19fe9c2 --- /dev/null +++ b/tests/bugs/modalg/bug245_2 @@ -0,0 +1,20 @@ + +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 diff --git a/tests/bugs/modalg/bug246 b/tests/bugs/modalg/bug246 new file mode 100755 index 0000000000..c0791bb9f3 --- /dev/null +++ b/tests/bugs/modalg/bug246 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must 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 diff --git a/tests/bugs/modalg/bug248_1 b/tests/bugs/modalg/bug248_1 new file mode 100755 index 0000000000..2d90b98bf4 --- /dev/null +++ b/tests/bugs/modalg/bug248_1 @@ -0,0 +1,22 @@ +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 diff --git a/tests/bugs/modalg/bug248_2 b/tests/bugs/modalg/bug248_2 new file mode 100755 index 0000000000..43e3a166ec --- /dev/null +++ b/tests/bugs/modalg/bug248_2 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must 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 diff --git a/tests/bugs/modalg/bug249_1 b/tests/bugs/modalg/bug249_1 new file mode 100755 index 0000000000..beefe7fe1d --- /dev/null +++ b/tests/bugs/modalg/bug249_1 @@ -0,0 +1,22 @@ +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 diff --git a/tests/bugs/modalg/bug249_2 b/tests/bugs/modalg/bug249_2 new file mode 100755 index 0000000000..79a5ce889d --- /dev/null +++ b/tests/bugs/modalg/bug249_2 @@ -0,0 +1,23 @@ +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 diff --git a/tests/bugs/modalg/bug249_3 b/tests/bugs/modalg/bug249_3 new file mode 100755 index 0000000000..6ea2f7de7e --- /dev/null +++ b/tests/bugs/modalg/bug249_3 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must 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 diff --git a/tests/bugs/modalg/bug249_4 b/tests/bugs/modalg/bug249_4 new file mode 100755 index 0000000000..f7fc2ea5aa --- /dev/null +++ b/tests/bugs/modalg/bug249_4 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must 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 diff --git a/tests/bugs/modalg/bug250_1 b/tests/bugs/modalg/bug250_1 new file mode 100755 index 0000000000..a3dc6d4786 --- /dev/null +++ b/tests/bugs/modalg/bug250_1 @@ -0,0 +1,22 @@ +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 diff --git a/tests/bugs/modalg/bug250_2 b/tests/bugs/modalg/bug250_2 new file mode 100755 index 0000000000..68fd5d3d7c --- /dev/null +++ b/tests/bugs/modalg/bug250_2 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must 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 diff --git a/tests/bugs/modalg/bug250_3 b/tests/bugs/modalg/bug250_3 new file mode 100755 index 0000000000..686178468d --- /dev/null +++ b/tests/bugs/modalg/bug250_3 @@ -0,0 +1,22 @@ +puts "TODO OCC12345 ALL: Error : The length of result shape is" +puts "TODO OCC12345 ALL: Error : Result shape is WRONG because it must 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 diff --git a/tests/bugs/modalg/bug250_4 b/tests/bugs/modalg/bug250_4 new file mode 100755 index 0000000000..8feeec140b --- /dev/null +++ b/tests/bugs/modalg/bug250_4 @@ -0,0 +1,21 @@ +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 diff --git a/tests/bugs/modalg/bug251_1 b/tests/bugs/modalg/bug251_1 new file mode 100755 index 0000000000..991849dd60 --- /dev/null +++ b/tests/bugs/modalg/bug251_1 @@ -0,0 +1,33 @@ +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 diff --git a/tests/bugs/modalg/bug251_2 b/tests/bugs/modalg/bug251_2 new file mode 100755 index 0000000000..a3ba58adfa --- /dev/null +++ b/tests/bugs/modalg/bug251_2 @@ -0,0 +1,33 @@ +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 diff --git a/tests/bugs/modalg/bug264_0 b/tests/bugs/modalg/bug264_0 index fb6644c231..c03c8ee0df 100755 --- a/tests/bugs/modalg/bug264_0 +++ b/tests/bugs/modalg/bug264_0 @@ -26,4 +26,4 @@ if { $tri != 6 && $nod != 8 } { } set square 1.3135 -set 2dviewer 0 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug264_1 b/tests/bugs/modalg/bug264_1 index 904393e3d1..16bc617dd3 100755 --- a/tests/bugs/modalg/bug264_1 +++ b/tests/bugs/modalg/bug264_1 @@ -28,4 +28,4 @@ if { $tri != 26 && $nod != 28 } { } set square 0 -set 2dviewer 0 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug264_10 b/tests/bugs/modalg/bug264_10 new file mode 100755 index 0000000000..cab6419d13 --- /dev/null +++ b/tests/bugs/modalg/bug264_10 @@ -0,0 +1,32 @@ +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 + diff --git a/tests/bugs/modalg/bug264_11 b/tests/bugs/modalg/bug264_11 new file mode 100755 index 0000000000..6fd7bcbd94 --- /dev/null +++ b/tests/bugs/modalg/bug264_11 @@ -0,0 +1,32 @@ +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 + diff --git a/tests/bugs/modalg/bug264_2 b/tests/bugs/modalg/bug264_2 new file mode 100755 index 0000000000..53839af6a6 --- /dev/null +++ b/tests/bugs/modalg/bug264_2 @@ -0,0 +1,35 @@ +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 + diff --git a/tests/bugs/modalg/bug264_3 b/tests/bugs/modalg/bug264_3 new file mode 100755 index 0000000000..a437673599 --- /dev/null +++ b/tests/bugs/modalg/bug264_3 @@ -0,0 +1,35 @@ +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 + diff --git a/tests/bugs/modalg/bug264_4 b/tests/bugs/modalg/bug264_4 new file mode 100755 index 0000000000..67ae1651fe --- /dev/null +++ b/tests/bugs/modalg/bug264_4 @@ -0,0 +1,35 @@ +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 + diff --git a/tests/bugs/modalg/bug264_5 b/tests/bugs/modalg/bug264_5 new file mode 100755 index 0000000000..394e04ed8d --- /dev/null +++ b/tests/bugs/modalg/bug264_5 @@ -0,0 +1,35 @@ +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 + diff --git a/tests/bugs/modalg/bug264_6 b/tests/bugs/modalg/bug264_6 index 25bc6920b0..061eda8b03 100755 --- a/tests/bugs/modalg/bug264_6 +++ b/tests/bugs/modalg/bug264_6 @@ -29,4 +29,4 @@ if { $tri != 18 && $nod != 20 } { } set square 19.2399 -set 2dviewer 0 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug264_7 b/tests/bugs/modalg/bug264_7 index 7c0cf86d5c..74ce81bb38 100755 --- a/tests/bugs/modalg/bug264_7 +++ b/tests/bugs/modalg/bug264_7 @@ -29,5 +29,5 @@ if { ($tri != 114 && $nod != 116) && ($tri != 116 && $nod != 118) } { } set square 150.283 -set 2dviewer 0 +set 3dviewer 0 diff --git a/tests/bugs/modalg/bug264_8 b/tests/bugs/modalg/bug264_8 new file mode 100755 index 0000000000..6b92c702af --- /dev/null +++ b/tests/bugs/modalg/bug264_8 @@ -0,0 +1,34 @@ +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 diff --git a/tests/bugs/modalg/bug264_9 b/tests/bugs/modalg/bug264_9 new file mode 100755 index 0000000000..f5487a20b2 --- /dev/null +++ b/tests/bugs/modalg/bug264_9 @@ -0,0 +1,34 @@ +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 diff --git a/tests/bugs/modalg/bug287 b/tests/bugs/modalg/bug287 new file mode 100755 index 0000000000..e6c45140a3 --- /dev/null +++ b/tests/bugs/modalg/bug287 @@ -0,0 +1,40 @@ +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 + diff --git a/tests/bugs/modalg/bug295 b/tests/bugs/modalg/bug295 new file mode 100755 index 0000000000..8c3b82f5e4 --- /dev/null +++ b/tests/bugs/modalg/bug295 @@ -0,0 +1,36 @@ +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 diff --git a/tests/bugs/modalg/bug300 b/tests/bugs/modalg/bug300 new file mode 100755 index 0000000000..127517613a --- /dev/null +++ b/tests/bugs/modalg/bug300 @@ -0,0 +1,37 @@ + +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 diff --git a/tests/bugs/modalg/bug305 b/tests/bugs/modalg/bug305 new file mode 100755 index 0000000000..ece2dd4152 --- /dev/null +++ b/tests/bugs/modalg/bug305 @@ -0,0 +1,83 @@ +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 + diff --git a/tests/bugs/modalg/bug307_1 b/tests/bugs/modalg/bug307_1 new file mode 100755 index 0000000000..3a78e9243e --- /dev/null +++ b/tests/bugs/modalg/bug307_1 @@ -0,0 +1,36 @@ +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 + + diff --git a/tests/bugs/modalg/bug307_2 b/tests/bugs/modalg/bug307_2 new file mode 100755 index 0000000000..64045ce4df --- /dev/null +++ b/tests/bugs/modalg/bug307_2 @@ -0,0 +1,34 @@ +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 diff --git a/tests/bugs/modalg/bug317 b/tests/bugs/modalg/bug317 new file mode 100755 index 0000000000..964366bb2c --- /dev/null +++ b/tests/bugs/modalg/bug317 @@ -0,0 +1,36 @@ +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 + diff --git a/tests/bugs/modalg/bug327_3 b/tests/bugs/modalg/bug327_3 new file mode 100755 index 0000000000..4ddda576c2 --- /dev/null +++ b/tests/bugs/modalg/bug327_3 @@ -0,0 +1,16 @@ +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 diff --git a/tests/bugs/modalg/bug327_4 b/tests/bugs/modalg/bug327_4 new file mode 100755 index 0000000000..348483639c --- /dev/null +++ b/tests/bugs/modalg/bug327_4 @@ -0,0 +1,18 @@ +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 + + diff --git a/tests/bugs/modalg/bug330 b/tests/bugs/modalg/bug330 new file mode 100755 index 0000000000..bdf17c6aff --- /dev/null +++ b/tests/bugs/modalg/bug330 @@ -0,0 +1,25 @@ +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 diff --git a/tests/bugs/modalg/bug337 b/tests/bugs/modalg/bug337 new file mode 100755 index 0000000000..0d821463b4 --- /dev/null +++ b/tests/bugs/modalg/bug337 @@ -0,0 +1,37 @@ + +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 + + + + diff --git a/tests/bugs/modalg/bug345 b/tests/bugs/modalg/bug345 new file mode 100755 index 0000000000..0098a5c926 --- /dev/null +++ b/tests/bugs/modalg/bug345 @@ -0,0 +1,16 @@ + +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 + diff --git a/tests/bugs/modalg/bug357 b/tests/bugs/modalg/bug357 new file mode 100755 index 0000000000..739946b99d --- /dev/null +++ b/tests/bugs/modalg/bug357 @@ -0,0 +1,20 @@ + +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 + + diff --git a/tests/bugs/modalg/bug358 b/tests/bugs/modalg/bug358 new file mode 100755 index 0000000000..d4d56526ca --- /dev/null +++ b/tests/bugs/modalg/bug358 @@ -0,0 +1,40 @@ +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 + diff --git a/tests/bugs/modalg/bug395 b/tests/bugs/modalg/bug395 new file mode 100755 index 0000000000..338806cbe7 --- /dev/null +++ b/tests/bugs/modalg/bug395 @@ -0,0 +1,37 @@ +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 + + diff --git a/tests/bugs/modalg/bug397 b/tests/bugs/modalg/bug397 new file mode 100755 index 0000000000..9cb19d665b --- /dev/null +++ b/tests/bugs/modalg/bug397 @@ -0,0 +1,43 @@ +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 + + diff --git a/tests/bugs/modalg/bug399 b/tests/bugs/modalg/bug399 new file mode 100755 index 0000000000..4d50bcb1e9 --- /dev/null +++ b/tests/bugs/modalg/bug399 @@ -0,0 +1,23 @@ +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 diff --git a/tests/bugs/modalg/bug406 b/tests/bugs/modalg/bug406 new file mode 100755 index 0000000000..57f14706c3 --- /dev/null +++ b/tests/bugs/modalg/bug406 @@ -0,0 +1,23 @@ +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 diff --git a/tests/bugs/modalg/bug410_3 b/tests/bugs/modalg/bug410_3 new file mode 100755 index 0000000000..49c90691a9 --- /dev/null +++ b/tests/bugs/modalg/bug410_3 @@ -0,0 +1,17 @@ + +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 diff --git a/tests/bugs/modalg/bug410_4 b/tests/bugs/modalg/bug410_4 new file mode 100755 index 0000000000..12715380ab --- /dev/null +++ b/tests/bugs/modalg/bug410_4 @@ -0,0 +1,22 @@ + +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 diff --git a/tests/bugs/modalg/bug416 b/tests/bugs/modalg/bug416 new file mode 100755 index 0000000000..2ae60303b4 --- /dev/null +++ b/tests/bugs/modalg/bug416 @@ -0,0 +1,21 @@ + +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 + + diff --git a/tests/bugs/modalg/bug439 b/tests/bugs/modalg/bug439 new file mode 100755 index 0000000000..63c6656d3d --- /dev/null +++ b/tests/bugs/modalg/bug439 @@ -0,0 +1,26 @@ + +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 diff --git a/tests/bugs/modalg/bug446_1 b/tests/bugs/modalg/bug446_1 new file mode 100755 index 0000000000..8dc81ddc22 --- /dev/null +++ b/tests/bugs/modalg/bug446_1 @@ -0,0 +1,25 @@ +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 + diff --git a/tests/bugs/modalg/bug452_1 b/tests/bugs/modalg/bug452_1 new file mode 100755 index 0000000000..b5a7745c49 --- /dev/null +++ b/tests/bugs/modalg/bug452_1 @@ -0,0 +1,30 @@ + +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 + diff --git a/tests/bugs/modalg/bug452_2 b/tests/bugs/modalg/bug452_2 new file mode 100755 index 0000000000..a938728c05 --- /dev/null +++ b/tests/bugs/modalg/bug452_2 @@ -0,0 +1,58 @@ + +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 diff --git a/tests/bugs/modalg/bug452_3 b/tests/bugs/modalg/bug452_3 new file mode 100755 index 0000000000..3ec86b68f2 --- /dev/null +++ b/tests/bugs/modalg/bug452_3 @@ -0,0 +1,43 @@ + +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 + + diff --git a/tests/bugs/modalg/bug452_4 b/tests/bugs/modalg/bug452_4 new file mode 100755 index 0000000000..0a03e60b0e --- /dev/null +++ b/tests/bugs/modalg/bug452_4 @@ -0,0 +1,44 @@ + +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 + + + diff --git a/tests/bugs/modalg/bug453_1 b/tests/bugs/modalg/bug453_1 new file mode 100755 index 0000000000..9a7c28bd75 --- /dev/null +++ b/tests/bugs/modalg/bug453_1 @@ -0,0 +1,35 @@ + +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 diff --git a/tests/bugs/modalg/bug453_2 b/tests/bugs/modalg/bug453_2 new file mode 100755 index 0000000000..da70eca5d0 --- /dev/null +++ b/tests/bugs/modalg/bug453_2 @@ -0,0 +1,36 @@ + +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 diff --git a/tests/bugs/modalg/bug465 b/tests/bugs/modalg/bug465 new file mode 100755 index 0000000000..ff96cf53a1 --- /dev/null +++ b/tests/bugs/modalg/bug465 @@ -0,0 +1,21 @@ + +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 diff --git a/tests/bugs/modalg/bug472_1 b/tests/bugs/modalg/bug472_1 new file mode 100755 index 0000000000..106a913b75 --- /dev/null +++ b/tests/bugs/modalg/bug472_1 @@ -0,0 +1,22 @@ +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 diff --git a/tests/bugs/modalg/bug472_2 b/tests/bugs/modalg/bug472_2 new file mode 100755 index 0000000000..45fad29533 --- /dev/null +++ b/tests/bugs/modalg/bug472_2 @@ -0,0 +1,22 @@ +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 diff --git a/tests/bugs/modalg/bug472_3 b/tests/bugs/modalg/bug472_3 new file mode 100755 index 0000000000..82a51e18b9 --- /dev/null +++ b/tests/bugs/modalg/bug472_3 @@ -0,0 +1,28 @@ +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 + diff --git a/tests/bugs/modalg/bug497_1 b/tests/bugs/modalg/bug497_1 new file mode 100755 index 0000000000..7aa08490bd --- /dev/null +++ b/tests/bugs/modalg/bug497_1 @@ -0,0 +1,25 @@ +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 diff --git a/tests/bugs/modalg/bug497_3 b/tests/bugs/modalg/bug497_3 new file mode 100755 index 0000000000..f85c8bfcfa --- /dev/null +++ b/tests/bugs/modalg/bug497_3 @@ -0,0 +1,27 @@ +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 diff --git a/tests/bugs/modalg/bug57_1 b/tests/bugs/modalg/bug57_1 new file mode 100755 index 0000000000..d72399432a --- /dev/null +++ b/tests/bugs/modalg/bug57_1 @@ -0,0 +1,15 @@ + +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 diff --git a/tests/bugs/modalg/bug57_2 b/tests/bugs/modalg/bug57_2 new file mode 100755 index 0000000000..d27b667c69 --- /dev/null +++ b/tests/bugs/modalg/bug57_2 @@ -0,0 +1,15 @@ + +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 diff --git a/tests/bugs/modalg/bug59_1 b/tests/bugs/modalg/bug59_1 new file mode 100755 index 0000000000..25acfda5d3 --- /dev/null +++ b/tests/bugs/modalg/bug59_1 @@ -0,0 +1,15 @@ + +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 diff --git a/tests/bugs/modalg/bug59_2 b/tests/bugs/modalg/bug59_2 new file mode 100755 index 0000000000..c926bf7eb0 --- /dev/null +++ b/tests/bugs/modalg/bug59_2 @@ -0,0 +1,15 @@ + +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 diff --git a/tests/bugs/modalg/bug62 b/tests/bugs/modalg/bug62 new file mode 100755 index 0000000000..4ae14f8f59 --- /dev/null +++ b/tests/bugs/modalg/bug62 @@ -0,0 +1,34 @@ +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 + diff --git a/tests/bugs/modalg/bug83_1 b/tests/bugs/modalg/bug83_1 new file mode 100755 index 0000000000..65e78f1e68 --- /dev/null +++ b/tests/bugs/modalg/bug83_1 @@ -0,0 +1,38 @@ +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 + + diff --git a/tests/bugs/modalg/bug83_2 b/tests/bugs/modalg/bug83_2 new file mode 100755 index 0000000000..b3e51d3614 --- /dev/null +++ b/tests/bugs/modalg/bug83_2 @@ -0,0 +1,36 @@ +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 + diff --git a/tests/bugs/modalg/bug87 b/tests/bugs/modalg/bug87 new file mode 100755 index 0000000000..2e6ceed60e --- /dev/null +++ b/tests/bugs/modalg/bug87 @@ -0,0 +1,32 @@ +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 diff --git a/tests/bugs/moddata/buc60607_1 b/tests/bugs/moddata/buc60607_1 new file mode 100755 index 0000000000..4e5979db9f --- /dev/null +++ b/tests/bugs/moddata/buc60607_1 @@ -0,0 +1,21 @@ +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" +} diff --git a/tests/bugs/moddata/buc60607_2 b/tests/bugs/moddata/buc60607_2 new file mode 100755 index 0000000000..f602def4d5 --- /dev/null +++ b/tests/bugs/moddata/buc60607_2 @@ -0,0 +1,8 @@ +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 diff --git a/tests/bugs/moddata/buc60607_3 b/tests/bugs/moddata/buc60607_3 new file mode 100755 index 0000000000..e4a5088de8 --- /dev/null +++ b/tests/bugs/moddata/buc60607_3 @@ -0,0 +1,8 @@ +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 diff --git a/tests/bugs/moddata/buc60607_4 b/tests/bugs/moddata/buc60607_4 new file mode 100755 index 0000000000..b461cb1307 --- /dev/null +++ b/tests/bugs/moddata/buc60607_4 @@ -0,0 +1,8 @@ +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 diff --git a/tests/bugs/moddata/buc60618 b/tests/bugs/moddata/buc60618 new file mode 100755 index 0000000000..6d1ed6267d --- /dev/null +++ b/tests/bugs/moddata/buc60618 @@ -0,0 +1,59 @@ +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" +} diff --git a/tests/bugs/moddata/buc60622_1 b/tests/bugs/moddata/buc60622_1 new file mode 100755 index 0000000000..2bbee56643 --- /dev/null +++ b/tests/bugs/moddata/buc60622_1 @@ -0,0 +1,14 @@ +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} + diff --git a/tests/bugs/moddata/buc60622_2 b/tests/bugs/moddata/buc60622_2 new file mode 100755 index 0000000000..559ff29006 --- /dev/null +++ b/tests/bugs/moddata/buc60622_2 @@ -0,0 +1,33 @@ +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" +} diff --git a/tests/bugs/moddata/buc60622_3 b/tests/bugs/moddata/buc60622_3 new file mode 100755 index 0000000000..0ef8996c23 --- /dev/null +++ b/tests/bugs/moddata/buc60622_3 @@ -0,0 +1,46 @@ +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" +} + diff --git a/tests/bugs/moddata/buc60623_3 b/tests/bugs/moddata/buc60623_3 new file mode 100755 index 0000000000..6232b24d71 --- /dev/null +++ b/tests/bugs/moddata/buc60623_3 @@ -0,0 +1,30 @@ +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 + diff --git a/tests/bugs/moddata/buc60654 b/tests/bugs/moddata/buc60654 new file mode 100755 index 0000000000..8e7008e246 --- /dev/null +++ b/tests/bugs/moddata/buc60654 @@ -0,0 +1,21 @@ +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" +} + diff --git a/tests/bugs/moddata/buc60792 b/tests/bugs/moddata/buc60792 new file mode 100755 index 0000000000..e6b075093f --- /dev/null +++ b/tests/bugs/moddata/buc60792 @@ -0,0 +1,10 @@ +puts "========================" +puts "BUC60792" +puts "========================" + +pload QAcommands + +vinit +BUC60792 + +set 2dviewer 0 diff --git a/tests/bugs/moddata/buc60815 b/tests/bugs/moddata/buc60815 new file mode 100755 index 0000000000..82bc868ecf --- /dev/null +++ b/tests/bugs/moddata/buc60815 @@ -0,0 +1,22 @@ +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 + diff --git a/tests/bugs/moddata/buc60843_1 b/tests/bugs/moddata/buc60843_1 new file mode 100755 index 0000000000..9f1ec84c6a --- /dev/null +++ b/tests/bugs/moddata/buc60843_1 @@ -0,0 +1,24 @@ +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" +} diff --git a/tests/bugs/moddata/buc60843_2 b/tests/bugs/moddata/buc60843_2 new file mode 100755 index 0000000000..87b2cc3347 --- /dev/null +++ b/tests/bugs/moddata/buc60843_2 @@ -0,0 +1,25 @@ +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" +} + diff --git a/tests/bugs/moddata/buc60890 b/tests/bugs/moddata/buc60890 new file mode 100755 index 0000000000..ea2a5c8207 --- /dev/null +++ b/tests/bugs/moddata/buc60890 @@ -0,0 +1,22 @@ +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." +} diff --git a/tests/bugs/moddata/buc60902 b/tests/bugs/moddata/buc60902 new file mode 100755 index 0000000000..9ff97594ce --- /dev/null +++ b/tests/bugs/moddata/buc60902 @@ -0,0 +1,14 @@ +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" +} + + + diff --git a/tests/bugs/moddata/buc60941 b/tests/bugs/moddata/buc60941 new file mode 100755 index 0000000000..2129b5cdd5 --- /dev/null +++ b/tests/bugs/moddata/buc60941 @@ -0,0 +1,20 @@ +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" +} diff --git a/tests/bugs/moddata/bug119 b/tests/bugs/moddata/bug119 new file mode 100755 index 0000000000..d68bdfa824 --- /dev/null +++ b/tests/bugs/moddata/bug119 @@ -0,0 +1,46 @@ +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 + } +} diff --git a/tests/bugs/moddata/bug139 b/tests/bugs/moddata/bug139 new file mode 100755 index 0000000000..0595134dc9 --- /dev/null +++ b/tests/bugs/moddata/bug139 @@ -0,0 +1,25 @@ +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 + diff --git a/tests/bugs/moddata/bug143 b/tests/bugs/moddata/bug143 new file mode 100755 index 0000000000..ee27c86060 --- /dev/null +++ b/tests/bugs/moddata/bug143 @@ -0,0 +1,20 @@ +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" +} diff --git a/tests/bugs/moddata/bug231 b/tests/bugs/moddata/bug231 new file mode 100755 index 0000000000..4904822b5d --- /dev/null +++ b/tests/bugs/moddata/bug231 @@ -0,0 +1,25 @@ +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 + diff --git a/tests/bugs/moddata/bug235 b/tests/bugs/moddata/bug235 new file mode 100755 index 0000000000..02d4cd1f0c --- /dev/null +++ b/tests/bugs/moddata/bug235 @@ -0,0 +1,41 @@ +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 + + diff --git a/tests/bugs/moddata/bug236 b/tests/bugs/moddata/bug236 new file mode 100755 index 0000000000..00f1339229 --- /dev/null +++ b/tests/bugs/moddata/bug236 @@ -0,0 +1,40 @@ +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 + diff --git a/tests/bugs/moddata/bug237 b/tests/bugs/moddata/bug237 new file mode 100755 index 0000000000..c75601a352 --- /dev/null +++ b/tests/bugs/moddata/bug237 @@ -0,0 +1,27 @@ +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 + diff --git a/tests/bugs/moddata/bug25 b/tests/bugs/moddata/bug25 new file mode 100755 index 0000000000..b949e02e00 --- /dev/null +++ b/tests/bugs/moddata/bug25 @@ -0,0 +1,35 @@ +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 + + diff --git a/tests/bugs/moddata/bug253 b/tests/bugs/moddata/bug253 new file mode 100755 index 0000000000..5bdafe4201 --- /dev/null +++ b/tests/bugs/moddata/bug253 @@ -0,0 +1,43 @@ +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 + + diff --git a/tests/bugs/moddata/bug265 b/tests/bugs/moddata/bug265 new file mode 100755 index 0000000000..bf396b067f --- /dev/null +++ b/tests/bugs/moddata/bug265 @@ -0,0 +1,16 @@ +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 + + diff --git a/tests/bugs/moddata/bug271 b/tests/bugs/moddata/bug271 new file mode 100755 index 0000000000..dec89563b7 --- /dev/null +++ b/tests/bugs/moddata/bug271 @@ -0,0 +1,26 @@ + +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 + diff --git a/tests/bugs/moddata/bug284 b/tests/bugs/moddata/bug284 new file mode 100755 index 0000000000..37a6c9f636 --- /dev/null +++ b/tests/bugs/moddata/bug284 @@ -0,0 +1,26 @@ +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 + diff --git a/tests/bugs/moddata/bug286 b/tests/bugs/moddata/bug286 new file mode 100755 index 0000000000..2d133e7830 --- /dev/null +++ b/tests/bugs/moddata/bug286 @@ -0,0 +1,28 @@ +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 diff --git a/tests/bugs/moddata/bug303_1 b/tests/bugs/moddata/bug303_1 new file mode 100755 index 0000000000..e4a81b44d2 --- /dev/null +++ b/tests/bugs/moddata/bug303_1 @@ -0,0 +1,23 @@ +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 diff --git a/tests/bugs/moddata/bug303_2 b/tests/bugs/moddata/bug303_2 new file mode 100755 index 0000000000..72bc6f3f02 --- /dev/null +++ b/tests/bugs/moddata/bug303_2 @@ -0,0 +1,23 @@ +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 diff --git a/tests/bugs/moddata/bug308 b/tests/bugs/moddata/bug308 new file mode 100755 index 0000000000..9befbc3ca4 --- /dev/null +++ b/tests/bugs/moddata/bug308 @@ -0,0 +1,25 @@ +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 + diff --git a/tests/bugs/moddata/bug311_1 b/tests/bugs/moddata/bug311_1 new file mode 100755 index 0000000000..4640258cb7 --- /dev/null +++ b/tests/bugs/moddata/bug311_1 @@ -0,0 +1,47 @@ +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 + diff --git a/tests/bugs/moddata/bug311_2 b/tests/bugs/moddata/bug311_2 new file mode 100755 index 0000000000..88740e7d80 --- /dev/null +++ b/tests/bugs/moddata/bug311_2 @@ -0,0 +1,47 @@ +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 + diff --git a/tests/bugs/moddata/bug324 b/tests/bugs/moddata/bug324 new file mode 100755 index 0000000000..f7bfcc75d5 --- /dev/null +++ b/tests/bugs/moddata/bug324 @@ -0,0 +1,21 @@ +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 + + diff --git a/tests/bugs/moddata/bug325 b/tests/bugs/moddata/bug325 new file mode 100755 index 0000000000..943aba96e2 --- /dev/null +++ b/tests/bugs/moddata/bug325 @@ -0,0 +1,21 @@ +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 diff --git a/tests/bugs/moddata/bug326 b/tests/bugs/moddata/bug326 new file mode 100755 index 0000000000..5c491ae55e --- /dev/null +++ b/tests/bugs/moddata/bug326 @@ -0,0 +1,18 @@ +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 + diff --git a/tests/bugs/moddata/bug332 b/tests/bugs/moddata/bug332 new file mode 100755 index 0000000000..73f07e5077 --- /dev/null +++ b/tests/bugs/moddata/bug332 @@ -0,0 +1,104 @@ +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 + + + diff --git a/tests/bugs/moddata/bug333 b/tests/bugs/moddata/bug333 new file mode 100755 index 0000000000..bafe6e77a6 --- /dev/null +++ b/tests/bugs/moddata/bug333 @@ -0,0 +1,37 @@ +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 diff --git a/tests/bugs/moddata/bug343 b/tests/bugs/moddata/bug343 new file mode 100755 index 0000000000..3335b4a554 --- /dev/null +++ b/tests/bugs/moddata/bug343 @@ -0,0 +1,131 @@ +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 + + + + diff --git a/tests/bugs/moddata/bug36 b/tests/bugs/moddata/bug36 new file mode 100755 index 0000000000..7c61e6b4a9 --- /dev/null +++ b/tests/bugs/moddata/bug36 @@ -0,0 +1,29 @@ +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 + + diff --git a/tests/bugs/moddata/bug360 b/tests/bugs/moddata/bug360 new file mode 100755 index 0000000000..5ff2cb238c --- /dev/null +++ b/tests/bugs/moddata/bug360 @@ -0,0 +1,24 @@ +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 + + diff --git a/tests/bugs/moddata/bug370 b/tests/bugs/moddata/bug370 new file mode 100755 index 0000000000..dab5d91141 --- /dev/null +++ b/tests/bugs/moddata/bug370 @@ -0,0 +1,24 @@ +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 + + diff --git a/tests/bugs/moddata/bug378 b/tests/bugs/moddata/bug378 new file mode 100755 index 0000000000..4e065f12cf --- /dev/null +++ b/tests/bugs/moddata/bug378 @@ -0,0 +1,23 @@ +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 + + diff --git a/tests/bugs/moddata/bug408 b/tests/bugs/moddata/bug408 new file mode 100755 index 0000000000..6338cce7e3 --- /dev/null +++ b/tests/bugs/moddata/bug408 @@ -0,0 +1,14 @@ +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] + + + diff --git a/tests/bugs/moddata/bug428 b/tests/bugs/moddata/bug428 new file mode 100755 index 0000000000..0902facb6d --- /dev/null +++ b/tests/bugs/moddata/bug428 @@ -0,0 +1,34 @@ +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 + diff --git a/tests/bugs/moddata/bug429 b/tests/bugs/moddata/bug429 new file mode 100755 index 0000000000..5d47e9cf83 --- /dev/null +++ b/tests/bugs/moddata/bug429 @@ -0,0 +1,32 @@ +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 + diff --git a/tests/bugs/moddata/bug430 b/tests/bugs/moddata/bug430 new file mode 100755 index 0000000000..0474ae3583 --- /dev/null +++ b/tests/bugs/moddata/bug430 @@ -0,0 +1,19 @@ +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 + + diff --git a/tests/bugs/moddata/bug431 b/tests/bugs/moddata/bug431 new file mode 100755 index 0000000000..849b8a7036 --- /dev/null +++ b/tests/bugs/moddata/bug431 @@ -0,0 +1,23 @@ +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 + diff --git a/tests/bugs/moddata/bug433 b/tests/bugs/moddata/bug433 new file mode 100755 index 0000000000..c87f9d7178 --- /dev/null +++ b/tests/bugs/moddata/bug433 @@ -0,0 +1,22 @@ +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 + diff --git a/tests/bugs/moddata/bug438_1 b/tests/bugs/moddata/bug438_1 new file mode 100755 index 0000000000..d6a4b21eb8 --- /dev/null +++ b/tests/bugs/moddata/bug438_1 @@ -0,0 +1,27 @@ +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 + diff --git a/tests/bugs/moddata/bug441_1 b/tests/bugs/moddata/bug441_1 new file mode 100755 index 0000000000..662ca47c9e --- /dev/null +++ b/tests/bugs/moddata/bug441_1 @@ -0,0 +1,31 @@ +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 diff --git a/tests/bugs/moddata/bug441_2 b/tests/bugs/moddata/bug441_2 new file mode 100755 index 0000000000..56dfcc9015 --- /dev/null +++ b/tests/bugs/moddata/bug441_2 @@ -0,0 +1,31 @@ +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 diff --git a/tests/bugs/moddata/bug441_3 b/tests/bugs/moddata/bug441_3 new file mode 100755 index 0000000000..3689d15dd9 --- /dev/null +++ b/tests/bugs/moddata/bug441_3 @@ -0,0 +1,31 @@ +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 diff --git a/tests/bugs/moddata/bug453_3 b/tests/bugs/moddata/bug453_3 new file mode 100755 index 0000000000..9b9b2f3bf9 --- /dev/null +++ b/tests/bugs/moddata/bug453_3 @@ -0,0 +1,35 @@ +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 + diff --git a/tests/bugs/moddata/bug496 b/tests/bugs/moddata/bug496 new file mode 100755 index 0000000000..921d6fea01 --- /dev/null +++ b/tests/bugs/moddata/bug496 @@ -0,0 +1,19 @@ +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 diff --git a/tests/bugs/moddata/bug503 b/tests/bugs/moddata/bug503 new file mode 100755 index 0000000000..5195d81b50 --- /dev/null +++ b/tests/bugs/moddata/bug503 @@ -0,0 +1,26 @@ +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 + diff --git a/tests/bugs/moddata/bug504 b/tests/bugs/moddata/bug504 new file mode 100755 index 0000000000..57f168ddd8 --- /dev/null +++ b/tests/bugs/moddata/bug504 @@ -0,0 +1,28 @@ +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 + diff --git a/tests/bugs/moddata/ger61235 b/tests/bugs/moddata/ger61235 new file mode 100755 index 0000000000..7535a07f6a --- /dev/null +++ b/tests/bugs/moddata/ger61235 @@ -0,0 +1,24 @@ +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 + + diff --git a/tests/bugs/moddata/pro19422_1 b/tests/bugs/moddata/pro19422_1 new file mode 100755 index 0000000000..fb0b6513ab --- /dev/null +++ b/tests/bugs/moddata/pro19422_1 @@ -0,0 +1,21 @@ +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 + diff --git a/tests/bugs/moddata/pro19422_2 b/tests/bugs/moddata/pro19422_2 new file mode 100755 index 0000000000..63a2fb9b92 --- /dev/null +++ b/tests/bugs/moddata/pro19422_2 @@ -0,0 +1,19 @@ +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 diff --git a/tests/bugs/vis/begin b/tests/bugs/vis/begin new file mode 100755 index 0000000000..d4ae0a4675 --- /dev/null +++ b/tests/bugs/vis/begin @@ -0,0 +1,3 @@ +pload QAcommands + + diff --git a/tests/bugs/vis/bug112 b/tests/bugs/vis/bug112 new file mode 100755 index 0000000000..b2f5025913 --- /dev/null +++ b/tests/bugs/vis/bug112 @@ -0,0 +1,39 @@ +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 + + + diff --git a/tests/bugs/vis/bug112_1 b/tests/bugs/vis/bug112_1 new file mode 100755 index 0000000000..180858c3f0 --- /dev/null +++ b/tests/bugs/vis/bug112_1 @@ -0,0 +1,27 @@ +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 diff --git a/tests/bugs/vis/bug128 b/tests/bugs/vis/bug128 new file mode 100755 index 0000000000..853384376c --- /dev/null +++ b/tests/bugs/vis/bug128 @@ -0,0 +1,29 @@ +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 diff --git a/tests/bugs/vis/bug136 b/tests/bugs/vis/bug136 new file mode 100755 index 0000000000..382a241595 --- /dev/null +++ b/tests/bugs/vis/bug136 @@ -0,0 +1,26 @@ +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 + diff --git a/tests/bugs/vis/bug138_1 b/tests/bugs/vis/bug138_1 new file mode 100755 index 0000000000..8a5c655778 --- /dev/null +++ b/tests/bugs/vis/bug138_1 @@ -0,0 +1,23 @@ + +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 diff --git a/tests/bugs/vis/bug138_2 b/tests/bugs/vis/bug138_2 new file mode 100755 index 0000000000..cae563f523 --- /dev/null +++ b/tests/bugs/vis/bug138_2 @@ -0,0 +1,19 @@ +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 diff --git a/tests/bugs/vis/bug146 b/tests/bugs/vis/bug146 new file mode 100755 index 0000000000..442606cccd --- /dev/null +++ b/tests/bugs/vis/bug146 @@ -0,0 +1,37 @@ + +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 diff --git a/tests/bugs/vis/bug153 b/tests/bugs/vis/bug153 new file mode 100755 index 0000000000..d9dc7e4476 --- /dev/null +++ b/tests/bugs/vis/bug153 @@ -0,0 +1,18 @@ + +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} diff --git a/tests/bugs/vis/bug154_1 b/tests/bugs/vis/bug154_1 new file mode 100755 index 0000000000..1394b4526a --- /dev/null +++ b/tests/bugs/vis/bug154_1 @@ -0,0 +1,41 @@ +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 diff --git a/tests/bugs/vis/bug154_2 b/tests/bugs/vis/bug154_2 new file mode 100755 index 0000000000..bdb1ec48a6 --- /dev/null +++ b/tests/bugs/vis/bug154_2 @@ -0,0 +1,31 @@ +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 + diff --git a/tests/bugs/vis/bug155_1 b/tests/bugs/vis/bug155_1 new file mode 100755 index 0000000000..9172176fd4 --- /dev/null +++ b/tests/bugs/vis/bug155_1 @@ -0,0 +1,28 @@ +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 diff --git a/tests/bugs/vis/bug155_2 b/tests/bugs/vis/bug155_2 new file mode 100755 index 0000000000..690ae297f9 --- /dev/null +++ b/tests/bugs/vis/bug155_2 @@ -0,0 +1,28 @@ +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 + diff --git a/tests/bugs/vis/bug155_3 b/tests/bugs/vis/bug155_3 new file mode 100755 index 0000000000..a34b9d953e --- /dev/null +++ b/tests/bugs/vis/bug155_3 @@ -0,0 +1,26 @@ +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 diff --git a/tests/bugs/vis/bug173_1 b/tests/bugs/vis/bug173_1 new file mode 100755 index 0000000000..b362c4b4c7 --- /dev/null +++ b/tests/bugs/vis/bug173_1 @@ -0,0 +1,52 @@ +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 diff --git a/tests/bugs/vis/bug173_2 b/tests/bugs/vis/bug173_2 new file mode 100755 index 0000000000..65a05cac43 --- /dev/null +++ b/tests/bugs/vis/bug173_2 @@ -0,0 +1,37 @@ +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 diff --git a/tests/bugs/vis/bug173_3 b/tests/bugs/vis/bug173_3 new file mode 100755 index 0000000000..2e9c422449 --- /dev/null +++ b/tests/bugs/vis/bug173_3 @@ -0,0 +1,40 @@ +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 + diff --git a/tests/bugs/vis/bug185 b/tests/bugs/vis/bug185 new file mode 100755 index 0000000000..d74a5d31c3 --- /dev/null +++ b/tests/bugs/vis/bug185 @@ -0,0 +1,49 @@ +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 diff --git a/tests/bugs/vis/bug192 b/tests/bugs/vis/bug192 new file mode 100755 index 0000000000..650c8f126d --- /dev/null +++ b/tests/bugs/vis/bug192 @@ -0,0 +1,42 @@ +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 + diff --git a/tests/bugs/vis/bug193 b/tests/bugs/vis/bug193 new file mode 100755 index 0000000000..6acd713e93 --- /dev/null +++ b/tests/bugs/vis/bug193 @@ -0,0 +1,41 @@ + +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 diff --git a/tests/bugs/vis/bug194_1 b/tests/bugs/vis/bug194_1 new file mode 100755 index 0000000000..1a1f832ce6 --- /dev/null +++ b/tests/bugs/vis/bug194_1 @@ -0,0 +1,33 @@ + +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 diff --git a/tests/bugs/vis/bug194_2 b/tests/bugs/vis/bug194_2 new file mode 100755 index 0000000000..d6e06c16a7 --- /dev/null +++ b/tests/bugs/vis/bug194_2 @@ -0,0 +1,33 @@ + +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 diff --git a/tests/bugs/vis/bug195 b/tests/bugs/vis/bug195 new file mode 100755 index 0000000000..eae1b71ac7 --- /dev/null +++ b/tests/bugs/vis/bug195 @@ -0,0 +1,38 @@ + +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 diff --git a/tests/bugs/vis/bug196 b/tests/bugs/vis/bug196 new file mode 100755 index 0000000000..8ecaaf15a3 --- /dev/null +++ b/tests/bugs/vis/bug196 @@ -0,0 +1,38 @@ + +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 diff --git a/tests/bugs/vis/bug19619 b/tests/bugs/vis/bug19619 new file mode 100755 index 0000000000..5c2797bf5b --- /dev/null +++ b/tests/bugs/vis/bug19619 @@ -0,0 +1,17 @@ + +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 diff --git a/tests/bugs/vis/bug197_1 b/tests/bugs/vis/bug197_1 new file mode 100755 index 0000000000..f64a443fe5 --- /dev/null +++ b/tests/bugs/vis/bug197_1 @@ -0,0 +1,59 @@ +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 + + diff --git a/tests/bugs/vis/bug197_2 b/tests/bugs/vis/bug197_2 new file mode 100755 index 0000000000..52784dbd2f --- /dev/null +++ b/tests/bugs/vis/bug197_2 @@ -0,0 +1,54 @@ +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 + diff --git a/tests/bugs/vis/bug198_1 b/tests/bugs/vis/bug198_1 new file mode 100755 index 0000000000..c698e44771 --- /dev/null +++ b/tests/bugs/vis/bug198_1 @@ -0,0 +1,36 @@ +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 diff --git a/tests/bugs/vis/bug198_2 b/tests/bugs/vis/bug198_2 new file mode 100755 index 0000000000..6e42601d7c --- /dev/null +++ b/tests/bugs/vis/bug198_2 @@ -0,0 +1,39 @@ +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 + + diff --git a/tests/bugs/vis/bug19_1 b/tests/bugs/vis/bug19_1 new file mode 100755 index 0000000000..c718051632 --- /dev/null +++ b/tests/bugs/vis/bug19_1 @@ -0,0 +1,22 @@ +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 + diff --git a/tests/bugs/vis/bug19_2 b/tests/bugs/vis/bug19_2 new file mode 100755 index 0000000000..23c01b5a43 --- /dev/null +++ b/tests/bugs/vis/bug19_2 @@ -0,0 +1,28 @@ +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 + + diff --git a/tests/bugs/vis/bug204_1 b/tests/bugs/vis/bug204_1 new file mode 100755 index 0000000000..1ee8bf783f --- /dev/null +++ b/tests/bugs/vis/bug204_1 @@ -0,0 +1,30 @@ +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 diff --git a/tests/bugs/vis/bug204_2 b/tests/bugs/vis/bug204_2 new file mode 100755 index 0000000000..e278b957a5 --- /dev/null +++ b/tests/bugs/vis/bug204_2 @@ -0,0 +1,27 @@ +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 diff --git a/tests/bugs/vis/bug215 b/tests/bugs/vis/bug215 new file mode 100755 index 0000000000..3997b81eef --- /dev/null +++ b/tests/bugs/vis/bug215 @@ -0,0 +1,30 @@ + +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 diff --git a/tests/bugs/vis/bug218 b/tests/bugs/vis/bug218 new file mode 100755 index 0000000000..105d824079 --- /dev/null +++ b/tests/bugs/vis/bug218 @@ -0,0 +1,58 @@ +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 diff --git a/tests/bugs/vis/bug224 b/tests/bugs/vis/bug224 new file mode 100755 index 0000000000..02d26499f7 --- /dev/null +++ b/tests/bugs/vis/bug224 @@ -0,0 +1,44 @@ +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 + diff --git a/tests/bugs/vis/bug225 b/tests/bugs/vis/bug225 new file mode 100755 index 0000000000..826a1f7d67 --- /dev/null +++ b/tests/bugs/vis/bug225 @@ -0,0 +1,30 @@ + +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 diff --git a/tests/bugs/vis/bug232 b/tests/bugs/vis/bug232 new file mode 100755 index 0000000000..8e67dc58d8 --- /dev/null +++ b/tests/bugs/vis/bug232 @@ -0,0 +1,106 @@ +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 diff --git a/tests/bugs/vis/bug280_2 b/tests/bugs/vis/bug280_2 new file mode 100755 index 0000000000..4e1ba327df --- /dev/null +++ b/tests/bugs/vis/bug280_2 @@ -0,0 +1,41 @@ +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 + diff --git a/tests/bugs/vis/bug280_3 b/tests/bugs/vis/bug280_3 new file mode 100755 index 0000000000..c796b5f578 --- /dev/null +++ b/tests/bugs/vis/bug280_3 @@ -0,0 +1,46 @@ +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 diff --git a/tests/bugs/vis/bug288_1 b/tests/bugs/vis/bug288_1 new file mode 100755 index 0000000000..266cfe21cb --- /dev/null +++ b/tests/bugs/vis/bug288_1 @@ -0,0 +1,32 @@ + +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 + diff --git a/tests/bugs/vis/bug288_2 b/tests/bugs/vis/bug288_2 new file mode 100755 index 0000000000..42d3f15d2e --- /dev/null +++ b/tests/bugs/vis/bug288_2 @@ -0,0 +1,31 @@ + +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 diff --git a/tests/bugs/vis/bug288_3 b/tests/bugs/vis/bug288_3 new file mode 100755 index 0000000000..dad77c3729 --- /dev/null +++ b/tests/bugs/vis/bug288_3 @@ -0,0 +1,31 @@ +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 + diff --git a/tests/bugs/vis/bug288_4 b/tests/bugs/vis/bug288_4 new file mode 100755 index 0000000000..fab7c1b1ee --- /dev/null +++ b/tests/bugs/vis/bug288_4 @@ -0,0 +1,31 @@ +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 + diff --git a/tests/bugs/vis/bug288_5 b/tests/bugs/vis/bug288_5 new file mode 100755 index 0000000000..5b72f3610f --- /dev/null +++ b/tests/bugs/vis/bug288_5 @@ -0,0 +1,30 @@ +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 + diff --git a/tests/bugs/vis/bug316 b/tests/bugs/vis/bug316 new file mode 100755 index 0000000000..8a617abb00 --- /dev/null +++ b/tests/bugs/vis/bug316 @@ -0,0 +1,43 @@ +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 + diff --git a/tests/bugs/vis/bug319 b/tests/bugs/vis/bug319 new file mode 100755 index 0000000000..c00a0725e9 --- /dev/null +++ b/tests/bugs/vis/bug319 @@ -0,0 +1,71 @@ +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 diff --git a/tests/bugs/vis/bug331 b/tests/bugs/vis/bug331 new file mode 100755 index 0000000000..1c32093125 --- /dev/null +++ b/tests/bugs/vis/bug331 @@ -0,0 +1,39 @@ + 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 + + diff --git a/tests/bugs/vis/bug344 b/tests/bugs/vis/bug344 new file mode 100755 index 0000000000..b44e8cac56 --- /dev/null +++ b/tests/bugs/vis/bug344 @@ -0,0 +1,35 @@ +puts "================" +puts "BUC61047" +puts "OCC344" +puts "================" +puts "" + +############################################# +## An exception - 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 + + diff --git a/tests/bugs/vis/bug346 b/tests/bugs/vis/bug346 new file mode 100755 index 0000000000..4537d89b02 --- /dev/null +++ b/tests/bugs/vis/bug346 @@ -0,0 +1,22 @@ +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 + diff --git a/tests/bugs/vis/bug364 b/tests/bugs/vis/bug364 new file mode 100755 index 0000000000..472c96f662 --- /dev/null +++ b/tests/bugs/vis/bug364 @@ -0,0 +1,34 @@ +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 + + + diff --git a/tests/bugs/vis/bug64 b/tests/bugs/vis/bug64 new file mode 100755 index 0000000000..294e11f6d7 --- /dev/null +++ b/tests/bugs/vis/bug64 @@ -0,0 +1,27 @@ +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 diff --git a/tests/bugs/vis/bug85_1 b/tests/bugs/vis/bug85_1 new file mode 100755 index 0000000000..4a531be51f --- /dev/null +++ b/tests/bugs/vis/bug85_1 @@ -0,0 +1,66 @@ +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 + + diff --git a/tests/bugs/vis/bug85_2 b/tests/bugs/vis/bug85_2 new file mode 100755 index 0000000000..3f57316b68 --- /dev/null +++ b/tests/bugs/vis/bug85_2 @@ -0,0 +1,85 @@ +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 + +