diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 24ccb07998..e3abbd51ee 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -647,10 +647,11 @@ Standard_Boolean ShapeFix_Face::Perform() // fix natural bounds Standard_Boolean NeedSplit = Standard_True; - if (FixAddNaturalBound()) - { - NeedSplit = Standard_False; - myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 ); + if ( NeedFix ( myFixAddNaturalBoundMode ) ) { + if ( FixAddNaturalBound() ) { + NeedSplit = Standard_False; + myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 ); + } } // split face @@ -839,11 +840,9 @@ Standard_Boolean ShapeFix_Face::FixAddNaturalBound() return Standard_True; } - // check if surface doesn't need natural bounds - if (!isNeedAddNaturalBound(ws)) - { + // check if surface is double-closed and fix is needed + if ( !IsSurfaceUVPeriodic (mySurf->Adaptor3d()) || ShapeAnalysis::IsOuterBound (myFace) ) return Standard_False; - } // Collect information on free intervals in U and V TColgp_SequenceOfPnt2d intU, intV, centers; @@ -1003,50 +1002,6 @@ Standard_Boolean ShapeFix_Face::FixOrientation() return FixOrientation(MapWires); } -//======================================================================= -// function : isNeedAddNaturalBound -// purpose : -//======================================================================= -Standard_Boolean ShapeFix_Face::isNeedAddNaturalBound(const TopTools_SequenceOfShape& theOrientedWires) -{ - // if fix is not needed - if (!NeedFix (myFixAddNaturalBoundMode)) - { - return Standard_False; - } - // if surface is not double-closed - if (!IsSurfaceUVPeriodic (mySurf->Adaptor3d())) - { - return Standard_False; - } - // if face has an OUTER bound - if (ShapeAnalysis::IsOuterBound (myFace)) - { - return Standard_False; - } - // check that not any wire has a seam edge and not any edge is degenerated. - // because the presence of a seam or degenerated edge indicates that this wire should be an external one, - // and in case of its incorrect orientation, this will be corrected. - Standard_Integer aNbOriented = theOrientedWires.Length(); - for (Standard_Integer i = 1; i <= aNbOriented; i++) - { - TopoDS_Wire aWire = TopoDS::Wire(theOrientedWires.Value(i)); - for (TopoDS_Iterator anEdgeIt(aWire); anEdgeIt.More(); anEdgeIt.Next()) - { - TopoDS_Edge anEdge = TopoDS::Edge(anEdgeIt.Value()); - if (BRep_Tool::Degenerated(anEdge)) - { - return Standard_False; - } - if (BRep_Tool::IsClosed(anEdge, myFace)) - { - return Standard_False; - } - } - } - - return Standard_True; -} //======================================================================= //function : FixOrientation @@ -1116,8 +1071,9 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap // if no wires, just do nothing if ( nb <= 0) return Standard_False; + Standard_Integer nbInternal=0; - Standard_Boolean isAddNaturalBounds = isNeedAddNaturalBound(ws); + Standard_Boolean isAddNaturalBounds = (NeedFix (myFixAddNaturalBoundMode) && IsSurfaceUVPeriodic(mySurf->Adaptor3d())); TColStd_SequenceOfInteger aSeqReversed; // if wire is only one, check its orientation if ( nb == 1 ) { @@ -1128,7 +1084,9 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap af.Orientation ( TopAbs_FORWARD ); B.Add (af,ws.Value(1)); - if (!isAddNaturalBounds && !ShapeAnalysis::IsOuterBound(af)) + if ((myFixAddNaturalBoundMode != 1 || + !IsSurfaceUVPeriodic(mySurf->Adaptor3d())) && + !ShapeAnalysis::IsOuterBound(af)) { Handle(ShapeExtend_WireData) sbdw = new ShapeExtend_WireData(TopoDS::Wire(ws.Value(1))); @@ -1285,7 +1243,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap if(!(stb==ste)) { sta = TopAbs_UNKNOWN; SI.Bind(aw,0); - j=nbAll; + j=nb; break; } } @@ -1402,9 +1360,11 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap } + //done = (done && (nb ==1 || (isAddNaturalBounds || (!isAddNaturalBounds && nbInternal -1} { - puts "${BugNumber} : Error during reading attached STEP file" + puts "${BugNumber} : Error during reading attached IGES file" } else { tpcompound comp if [catch { set fixlist [fixshape result comp 1e-7] } res] { - puts "${BugNumber}: Error during fixshape" + puts "${BugNumber}: Error during fixshape" } else { - set index [string first "Segments were disordered; fixed\n" ${fixlist}] + set index [string first "Segments were disordered; fixed\n" ${fixlist}] if {$index != -1} { - puts "Faulty ${BugNumber}" + puts "Faulty ${BugNumber}" } else { - puts "OK ${BugNumber}" + puts "OK ${BugNumber}" } - checkprops result -s 2.22665e+06 - checkshape result - checkview -display result -2d -path ${imagedir}/${test_image}.png + checkprops result -s 2.22665e+06 +checkshape result + checkview -display result -2d -path ${imagedir}/${test_image}.png } } -# Restoring the path to the old resource file -set ::env(CSF_STEPDefaults) ${old_resource_path} - diff --git a/tests/de/begin b/tests/de/begin index 66bf8d3526..7dbfbf66fb 100644 --- a/tests/de/begin +++ b/tests/de/begin @@ -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 -} diff --git a/tests/de/end b/tests/de/end index cc0c34c71a..be9d6b28f0 100644 --- a/tests/de/end +++ b/tests/de/end @@ -67,24 +67,12 @@ if { [string length $filename] > 1} { set tmp [param read.step.product.mode OFF] } set path_file [locate_data_file $filename] - - 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] - } - if { [catch { $ReadCommand D_First $path_file } catch_result] } { set err_msg "Error: First - file was not read - exception " puts $err_msg append todo_msg $todo_mask $err_msg $end_line set mist 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 - unset de_use_custom_scripts - } } else { set mist 1 diff --git a/tests/de/iges_1/G8 b/tests/de/iges_1/G8 index f2b249db24..60f9cda3c5 100644 --- a/tests/de/iges_1/G8 +++ b/tests/de/iges_1/G8 @@ -16,39 +16,3 @@ 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_IGESDefaults) - # reading old resource file - set anOptions [parse_resource_file "${old_resource_path}/IGES"] - # 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} -} - -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}\"" -} diff --git a/tests/de/iges_1/J9 b/tests/de/iges_1/J9 index 64b4f46cba..516117f8f7 100644 --- a/tests/de/iges_1/J9 +++ b/tests/de/iges_1/J9 @@ -20,39 +20,3 @@ 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_IGESDefaults) - # reading old resource file - set anOptions [parse_resource_file "${old_resource_path}/IGES"] - # 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} -} - -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}\"" -} diff --git a/tests/de/step_1/E1 b/tests/de/step_1/E1 index b903a708cd..cf236b539a 100644 --- a/tests/de/step_1/E1 +++ b/tests/de/step_1/E1 @@ -20,39 +20,3 @@ 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"] - # 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} -} - -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 diff --git a/tests/de/step_1/E2 b/tests/de/step_1/E2 index 141debb92f..a9dc84a82c 100644 --- a/tests/de/step_1/E2 +++ b/tests/de/step_1/E2 @@ -20,39 +20,3 @@ 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"] - # 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} -} - -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 diff --git a/tests/de/step_1/G9 b/tests/de/step_1/G9 index 712a3e5982..ec8cda4fd2 100644 --- a/tests/de/step_1/G9 +++ b/tests/de/step_1/G9 @@ -22,39 +22,3 @@ NLAYERS : NLayers = 0 ( 1 ) LAYERS : Layers = ( 001 ) } - -# 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"] - # 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} -} - -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}\"" -} diff --git a/tests/de/step_1/J6 b/tests/de/step_1/J6 index c684948fa6..f98dd6f7c2 100755 --- a/tests/de/step_1/J6 +++ b/tests/de/step_1/J6 @@ -1,8 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: Update of 3D-Parameters has failed" -puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" -puts "TODO CR23096 ALL: NBSHAPES : Faulty" -puts "TODO CR23096 ALL: STATSHAPE : Faulty" +puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" set filename bm1_pe_t4.stp @@ -10,8 +8,8 @@ set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 3 ) Warnings = 13 ( 30 ) Summary = 13 ( 33 ) CHECKSHAPE : Wires = 3 ( 2 ) Faces = 3 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) -NBSHAPES : Solid = 0 ( 0 ) Shell = 13 ( 12 ) Face = 16 ( 15 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 13 ( 12 ) Face = 16 ( 15 ) FreeWire = 0 ( 0 ) +NBSHAPES : Solid = 0 ( 0 ) Shell = 12 ( 12 ) Face = 15 ( 15 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 12 ( 12 ) Face = 15 ( 15 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 1562.051497 ( 1562.051497 ) AvgTol = 272.6255712 ( 211.9512858 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) diff --git a/tests/de/step_2/B3 b/tests/de/step_2/B3 index e08538bf00..efa4373c29 100644 --- a/tests/de/step_2/B3 +++ b/tests/de/step_2/B3 @@ -20,39 +20,3 @@ 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"] - # 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} -} - -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}\"" -} diff --git a/tests/de/step_2/Q5 b/tests/de/step_2/Q5 index 035864159a..807def6dc3 100644 --- a/tests/de/step_2/Q5 +++ b/tests/de/step_2/Q5 @@ -16,40 +16,3 @@ 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"] - # 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} -} - -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}\"" -} - diff --git a/tests/de/step_2/Q6 b/tests/de/step_2/Q6 index 1df2560691..908b5fbf1c 100644 --- a/tests/de/step_2/Q6 +++ b/tests/de/step_2/Q6 @@ -16,40 +16,3 @@ 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}\"" -} - diff --git a/tests/de/step_3/B9 b/tests/de/step_3/B9 index 2e78a1347f..a3cf0a8375 100644 --- a/tests/de/step_3/B9 +++ b/tests/de/step_3/B9 @@ -22,40 +22,3 @@ 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"] - # 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} -} - -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}\"" -} - diff --git a/tests/de/step_3/C8 b/tests/de/step_3/C8 index 4f47b33248..e9c1a96ca9 100644 --- a/tests/de/step_3/C8 +++ b/tests/de/step_3/C8 @@ -20,40 +20,3 @@ 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"] - # 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} -} - -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}\"" -} - diff --git a/tests/de/step_3/E4 b/tests/de/step_3/E4 index cc5b077c81..941eff477c 100644 --- a/tests/de/step_3/E4 +++ b/tests/de/step_3/E4 @@ -20,40 +20,3 @@ 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"] - # 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} -} - -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}\"" -} -