0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and...
[occt.git] / tests / de / step_2 / Q6
index 908b5fb..1df2560 100644 (file)
@@ -16,3 +16,40 @@ NLAYERS     : NLayers  = 0  ( 0 )
 LAYERS      : Layers   =   (  )
 
 }
+
+# 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.
+
+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_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}\""
+}
+