]> OCCT Git - occt.git/commitdiff
0033221: Resource files are not deleted after testing CR33221
authoratereshi <andrey.tereshin@opencascade.com>
Tue, 29 Nov 2022 12:58:43 +0000 (15:58 +0300)
committeratereshi <andrey.tereshin@opencascade.com>
Wed, 30 Nov 2022 13:35:57 +0000 (16:35 +0300)
Problem: The old way of managing resource files was used, without deleting the temporary file.
Change: Changing the shape healing options is done by using InterfaceStatic.
Result: There is no need to replace the resource file.

17 files changed:
tests/bugs/begin
tests/bugs/modalg_7/bug30273
tests/bugs/step/bug32922
tests/bugs/xde/bug6283
tests/de/begin
tests/de/end
tests/de/iges_1/G8
tests/de/iges_1/J9
tests/de/step_1/E1
tests/de/step_1/E2
tests/de/step_1/G9
tests/de/step_2/B3
tests/de/step_2/Q5
tests/de/step_2/Q6
tests/de/step_3/B9
tests/de/step_3/C8
tests/de/step_3/E4

index 0f664ace6ab5861679eeafb1544cd6c4f34e80fa..64eb6062158a97629e557e9ae96f2b9d457c5a69 100755 (executable)
@@ -59,47 +59,3 @@ proc checktime {value expected tol_rel message} {
       puts "Improvement. ${message}, ${value} seconds, is less than expected time - ${expected} seconds"
    }
 }
-
-# Reads resource file, returns options from file as key-value dict
-proc parse_resource_file {theFileName} {
-    # Creating empty dictionary
-    set aDict [dict create];
-    # Check for resource file
-    if { [info exists theFileName] == 0 } {
-       puts "Error: resource file \"${theFileName}\" isn't found"
-       return $aDict
-   }
-   # Open a resource file
-   set aFD [open "${theFileName}" "rb"]
-   set aLineNo 0
-   # Read line by line
-   while {[gets $aFD aLine] !=-1 } {
-       incr aLineNo
-       # Clear the line from comment
-       if {[regexp {(^[^!]+)} $aLine match aClearLine]} {
-          # remove spaces
-          set aClearLine [string trim $aClearLine]
-          if {[string length $aClearLine] != 0} {
-             if {[regexp {(\S+)\s*:\s*(\S*)} $aClearLine match aKey aValue]} {
-                 dict set aDict $aKey $aValue
-             } else {
-                puts "Error: syntax error in resource file at line: ${aLineNo}"
-             }
-          }   
-       }
-   }
-   close $aFD
-   return $aDict
-}
-
-# Creates new resource file with options as key-value dict
-proc create_resource_file {theFileName theOptions} {
-   # Open a resource file
-   set aFD [open "${theFileName}" "wb"]
-   set aLineNo 0
-   # Write line by line
-   dict for {aKey aValue} $theOptions {
-       puts $aFD "${aKey} : ${aValue}"
-   }
-   close $aFD
-}
index daaefa168b58a2de586be4c9a75134a81c9db4e3..81d25dc70c8aa33899e47d0ccd29716ea7453cc9 100644 (file)
@@ -8,28 +8,15 @@ pload XDE
 # Due to the ambiguous interpretation of the "inner" wire on the surfaces
 # that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation),
 # we must manually turn off the adding of the natural bound option of the shape healing for this test.
-if { [info exists imagedir] == 0 } {
-   set imagedir ../BugNumber
-   if {![file exists ${imagedir}]} {
-       file mkdir ${imagedir}
-   }
-}
-# remember the path to the old resource file
-set old_resource_path $::env(CSF_STEPDefaults)
-# reading old resource file
-set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+
+# Empty resource file name to take params from InterfaceStatic
+param "read.step.resource.name" "\"\""
 # activation of ignoring the adding of natural bound
-dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-# path to new resource file
-set new_resource_path ${imagedir}
-# creating resource file
-create_resource_file "${new_resource_path}/STEP" $anOptions
-# changing the path to the resource file
-set ::env(CSF_STEPDefaults) ${new_resource_path}
+param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 
 stepread [locate_data_file bug30273.stp] res *
 
-# Restoring the path to the old resource file
-set ::env(CSF_STEPDefaults) ${old_resource_path}
+param "read.step.resource.name" "STEP"
+param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 
 checknbshapes res_1 -solid 176 -face 10463 -shape 72893
index 1c32f0dcc23a8f4f4bd0d7eab1946b472f1038c4..07c60e7096882c7b640bf18c0dd6d65b26a4cf71 100644 (file)
@@ -9,24 +9,10 @@ puts ""
 
 pload MODELING XDE
 
-if { [info exists imagedir] == 0 } {
-   set imagedir ../bug32922
-   if {![file exists ${imagedir}]} {
-       file mkdir ${imagedir}
-   }
-}
-# remember the path to the old resource file
-set old_resource_path $::env(CSF_STEPDefaults)
-# reading old resource file
-set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+# Empty resource file name to take params from InterfaceStatic
+param "read.step.resource.name" "\"\""
 # turn off shape healing
-dict set anOptions "FromSTEP.exec.op" ""
-# path to new resource file
-set new_resource_path ${imagedir}
-# creating resource file
-create_resource_file "${new_resource_path}/STEP" $anOptions
-# changing the path to the resource file
-set ::env(CSF_STEPDefaults) ${new_resource_path}
+param "FromSTEP.exec.op" "\"\""
 
 # Generating, writing and reading the torus
 ptorus tor 20 5
@@ -45,5 +31,5 @@ view 1 -2D- 728 20 400 400
 2dfit
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
 
-# Restoring the path to the old resource file
-set ::env(CSF_STEPDefaults) ${old_resource_path}
+param "read.step.resource.name" "STEP"
+param "FromSTEP.exec.op" "FixShape"
index ba5dce2a206af74f4e28a7e0dcaf2af7d5aba788..2da044cbef6435567a6a977c0ded1d834c1c5ccb 100644 (file)
@@ -11,24 +11,11 @@ set BugNumber OCC6283
 # Due to the ambiguous interpretation of the "inner" wire on the surfaces
 # that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation),
 # we must manually turn off the adding of the natural bound option of the shape healing for this test.
-if { [info exists imagedir] == 0 } {
-   set imagedir ../BugNumber
-   if {![file exists ${imagedir}]} {
-       file mkdir ${imagedir}
-   }
-}
-# remember the path to the old resource file
-set old_resource_path $::env(CSF_STEPDefaults)
-# reading old resource file
-set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+
+# Empty resource file name to take params from InterfaceStatic
+param "read.step.resource.name" "\"\""
 # activation of ignoring the adding of natural bound
-dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-# path to new resource file
-set new_resource_path ${imagedir}
-# creating resource file
-create_resource_file "${new_resource_path}/STEP" $anOptions
-# changing the path to the resource file
-set ::env(CSF_STEPDefaults) ${new_resource_path}
+param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 
 set list [stepread [locate_data_file wgehaeuse_surface.stp] a *]
 
@@ -51,6 +38,6 @@ if {[lsearch ${list} Error] > -1} {
     }
 }
 
-# Restoring the path to the old resource file
-set ::env(CSF_STEPDefaults) ${old_resource_path}
+param "read.step.resource.name" "STEP"
+param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 
index 66bf8d35266ea9aa5f1dba918d659b9df65ceca9..7dbfbf66fb9dbb7526dbfe475651bc929648158e 100644 (file)
@@ -13,47 +13,3 @@ set lengthunit_start ""
 
 # Open a transaction
 NewCommand D
-
-# Reads resource file, returns options from file as key-value dict
-proc parse_resource_file {theFileName} {
-    # Creating empty dictionary
-    set aDict [dict create];
-    # Check for resource file
-    if { [info exists theFileName] == 0 } {
-       puts "Error: resource file \"${theFileName}\" isn't found"
-       return $aDict
-   }
-   # Open a resource file
-   set aFD [open "${theFileName}" "rb"]
-   set aLineNo 0
-   # Read line by line
-   while {[gets $aFD aLine] !=-1 } {
-       incr aLineNo
-       # Clear the line from comment
-       if {[regexp {(^[^!]+)} $aLine match aClearLine]} {
-          # remove spaces
-          set aClearLine [string trim $aClearLine]
-          if {[string length $aClearLine] != 0} {
-             if {[regexp {(\S+)\s*:\s*(\S*)} $aClearLine match aKey aValue]} {
-                 dict set aDict $aKey $aValue
-             } else {
-                puts "Error: syntax error in resource file at line: ${aLineNo}"
-             }
-          }   
-       }
-   }
-   close $aFD
-   return $aDict
-}
-
-# Creates new resource file with options as key-value dict
-proc create_resource_file {theFileName theOptions} {
-   # Open a resource file
-   set aFD [open "${theFileName}" "wb"]
-   set aLineNo 0
-   # Write line by line
-   dict for {aKey aValue} $theOptions {
-       puts $aFD "${aKey} : ${aValue}"
-   }
-   close $aFD
-}
index cc0c34c71ae195a0c01c671bf662ff8c310d8cea..ea1d4f43e8442edb737608f82d5b7ae2b2716865 100644 (file)
@@ -70,7 +70,7 @@ if { [string length $filename] > 1} {
     
     if { [info exists de_use_custom_scripts] } {
         puts "Executing custom script for the test before reading data from file..."
-        set old_resource_path [de_before_script $filename]
+        de_before_script
     }
     
     if { [catch { $ReadCommand D_First $path_file } catch_result] } {
@@ -82,7 +82,7 @@ if { [string length $filename] > 1} {
     
     if { [info exists de_use_custom_scripts] } {
         puts "Executing custom script for the test after reading data from file..."
-        de_after_script $old_resource_path
+        de_after_script
         unset de_use_custom_scripts
     }
 
index f2b249db24afeaa6b1f1f683631bd134183d2590..5ec58931934764841b3d93321b4ac574b30395ef 100644 (file)
@@ -23,32 +23,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_IGESDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/IGES"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.iges.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromIGES.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/IGES" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_IGESDefaults) ${new_resource_path}
-    puts "New path to IGES resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromIGES.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_IGESDefaults) ${old_resource_path}
-   puts "Restore path to IGES resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.iges.resource.name" "IGES"
+    param "FromIGES.FixShape.FixAddNaturalBoundMode" -1
 }
index 64b4f46cba6bc48a6d96ca697822a4ed38bfcfaa..e57bac036317e63c040eece41cb440fe64af4eb9 100644 (file)
@@ -27,32 +27,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_IGESDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/IGES"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.iges.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromIGES.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/IGES" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_IGESDefaults) ${new_resource_path}
-    puts "New path to IGES resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromIGES.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_IGESDefaults) ${old_resource_path}
-   puts "Restore path to IGES resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.iges.resource.name" "IGES"
+    param "FromIGES.FixShape.FixAddNaturalBoundMode" -1
 }
index b903a708cd273c4fa981ffdd2b0100063945185c..230bab190845e976d03d8921d751286e50e2418a 100644 (file)
@@ -27,32 +27,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
-}
\ No newline at end of file
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
+}
index 141debb92fc08129213cf4946e20804123fa1d6b..5614373344a403c7e3a76749a59fe219870fe7a3 100644 (file)
@@ -27,32 +27,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
-}
\ No newline at end of file
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
+}
index 712a3e59828e0ffc44e7912e298076b2e3ebe4d5..d3423150022048b79f144d631b1690a3ac7f58a2 100644 (file)
@@ -29,32 +29,14 @@ LAYERS      : Layers   =   ( 001 )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
index e08538bf00c90084cf3e88b377bbaed9cafdf817..24b8a1c7d29c30f23e11b019024077197165fcc9 100644 (file)
@@ -27,32 +27,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
index 035864159a8ffd160dc1d698eeabb75373c97af3..901cdd2e95862aff01cf2ef24df2ad7eb2031cc7 100644 (file)
@@ -23,33 +23,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
-
index 1df2560691a1632811208fc3f7b79d52ddf304e1..34cd873ace9b1f2e5f9b88fea89b3171217bf3bd 100644 (file)
@@ -23,33 +23,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
-    # turn off the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
+    # activation of ignoring the adding of natural bound
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
-
index 2e78a1347f4498bedca39dfa409028722c0d03e4..0eba5333efd4f8e0e7fe142d989aa2ae1f549c73 100644 (file)
@@ -29,33 +29,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
-
index 4f47b332488d36bc161e863ca78911f5bfb855c5..d00b81a45832cfa04d37aeb4cd66a03fcbf99d19 100644 (file)
@@ -27,33 +27,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
-
index cc5b077c819110dac1ff9cd395c7bc3001b642f6..a831e25833d4f30a3bcd8d31416ca546a2d28b4b 100644 (file)
@@ -27,33 +27,14 @@ LAYERS      : Layers   =   (  )
 
 set de_use_custom_scripts 1
 
-proc de_before_script {TheFileName} {
-    if { [info exists imagedir] == 0 } {
-       set imagedir ../[file rootname $TheFileName]
-       if {![file exists ${imagedir}]} {
-           file mkdir ${imagedir}
-       }
-    }
-    # remember the path to the old resource file
-    set old_resource_path $::env(CSF_STEPDefaults)
-    # reading old resource file
-    set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+proc de_before_script {} {
+    # Empty resource file name to take params from InterfaceStatic
+    param "read.step.resource.name" "\"\""
     # activation of ignoring the adding of natural bound
-    dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0"
-    # path to new resource file
-    set new_resource_path ${imagedir}
-    # creating resource file
-    create_resource_file "${new_resource_path}/STEP" $anOptions
-    # changing the path to the resource file
-    set ::env(CSF_STEPDefaults) ${new_resource_path}
-    puts "New path to STEP resource file is: \"${new_resource_path}\""
-    
-    return ${old_resource_path}
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" 0
 }
 
-proc de_after_script {old_resource_path} {
-   # Restoring the path to the old resource file
-   set ::env(CSF_STEPDefaults) ${old_resource_path}
-   puts "Restore path to STEP resource file: \"${old_resource_path}\""
+proc de_after_script {} {
+    param "read.step.resource.name" "STEP"
+    param "FromSTEP.FixShape.FixAddNaturalBoundMode" -1
 }
-