]> OCCT Git - occt.git/commitdiff
0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and...
authoratereshi <atereshi@opencascade.com>
Tue, 20 Sep 2022 08:48:14 +0000 (11:48 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 31 Oct 2022 15:10:55 +0000 (18:10 +0300)
Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.

Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
 natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
 natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.

Result: By default, it is correct to add natural boundaries, because this case
 is correct from the point of view of the STEP format and others.

21 files changed:
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Face.hxx
tests/bugs/begin
tests/bugs/modalg_7/bug30273
tests/bugs/step/bug28414 [new file with mode: 0644]
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_1/J6
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 20388e08f17346f3ca080670061d62f2c6959bde..15016761ebb2685ca888049db54bd8e66767ede1 100644 (file)
@@ -647,11 +647,10 @@ Standard_Boolean ShapeFix_Face::Perform()
 
     // fix natural bounds
     Standard_Boolean NeedSplit = Standard_True;
-    if ( NeedFix ( myFixAddNaturalBoundMode ) ) {
-      if ( FixAddNaturalBound() ) {
-        NeedSplit = Standard_False;
-       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
-      }
+    if (FixAddNaturalBound())
+    {
+      NeedSplit = Standard_False;
+      myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
     }
 
     // split face
@@ -840,9 +839,11 @@ Standard_Boolean ShapeFix_Face::FixAddNaturalBound()
     return Standard_True;
   }
 
-  // check if surface is double-closed and fix is needed
-  if ( !IsSurfaceUVPeriodic (mySurf->Adaptor3d()) || ShapeAnalysis::IsOuterBound (myFace) ) 
+  // check if surface doesn't need natural bounds
+  if (!isNeedAddNaturalBound(ws))
+  {
     return Standard_False;
+  }
 
   // Collect information on free intervals in U and V
   TColgp_SequenceOfPnt2d intU, intV, centers;
@@ -1002,6 +1003,50 @@ 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
@@ -1071,9 +1116,8 @@ 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 = (NeedFix (myFixAddNaturalBoundMode) && IsSurfaceUVPeriodic(mySurf->Adaptor3d()));
+  Standard_Boolean isAddNaturalBounds = isNeedAddNaturalBound(ws);
   TColStd_SequenceOfInteger aSeqReversed;
   // if wire is only one, check its orientation
   if ( nb == 1 ) {
@@ -1084,9 +1128,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
     af.Orientation ( TopAbs_FORWARD );
     B.Add (af,ws.Value(1));
     
-    if ((myFixAddNaturalBoundMode != 1 ||
-      !IsSurfaceUVPeriodic(mySurf->Adaptor3d())) &&
-      !ShapeAnalysis::IsOuterBound(af))
+    if (!isAddNaturalBounds && !ShapeAnalysis::IsOuterBound(af))
     {
       Handle(ShapeExtend_WireData) sbdw =
         new ShapeExtend_WireData(TopoDS::Wire(ws.Value(1)));
@@ -1244,7 +1286,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
                 if(!(stb==ste)) {
                   sta = TopAbs_UNKNOWN;
                   SI.Bind(aw,0);
-                  j=nb;
+                  j=nbAll;
                   break;
                 }
               }
@@ -1363,11 +1405,9 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
 
   }
 
-  //done = (done && (nb ==1 || (isAddNaturalBounds || (!isAddNaturalBounds && nbInternal <nb))));
   if(isAddNaturalBounds && nb == aSeqReversed.Length())
     done = Standard_False;
-  else
-    done = (done && (nb ==1 || (isAddNaturalBounds || (!isAddNaturalBounds && nbInternal <nb))));
+
   //    Faut-il reconstruire ? si myRebil est mis
   if ( done ) {
     TopoDS_Shape S = myFace.EmptyCopied();
index 2a3eb9cf083907a25385a3d892a63322bf3fb046..3e9af255333d80259a35f4301c76a7ba93c2e64a 100644 (file)
@@ -261,7 +261,9 @@ protected:
 
 private:
 
-  
+  //! Returns True if the face needs to add natural bound and corresponded option of shape healing is ON
+  Standard_Boolean isNeedAddNaturalBound(const TopTools_SequenceOfShape& theOrientedWires);
+
   Standard_EXPORT Standard_Boolean SplitEdge (const Handle(ShapeExtend_WireData)& sewd, const Standard_Integer num, const Standard_Real param, const TopoDS_Vertex& vert, const Standard_Real preci, ShapeFix_DataMapOfShapeBox2d& boxes);
   
   Standard_EXPORT Standard_Boolean SplitEdge (const Handle(ShapeExtend_WireData)& sewd, const Standard_Integer num, const Standard_Real param1, const Standard_Real param2, const TopoDS_Vertex& vert, const Standard_Real preci, ShapeFix_DataMapOfShapeBox2d& boxes);
index 64eb6062158a97629e557e9ae96f2b9d457c5a69..0f664ace6ab5861679eeafb1544cd6c4f34e80fa 100755 (executable)
@@ -59,3 +59,47 @@ 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 503691099fa08f522134100628a288797ed7b8cb..daaefa168b58a2de586be4c9a75134a81c9db4e3 100644 (file)
@@ -5,5 +5,31 @@ puts ""
 
 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"]
+# 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}
+
 stepread [locate_data_file bug30273.stp] res *
+
+# Restoring the path to the old resource file
+set ::env(CSF_STEPDefaults) ${old_resource_path}
+
 checknbshapes res_1 -solid 176 -face 10463 -shape 72893
diff --git a/tests/bugs/step/bug28414 b/tests/bugs/step/bug28414
new file mode 100644 (file)
index 0000000..127f301
--- /dev/null
@@ -0,0 +1,20 @@
+puts "==================================================================="
+puts "0028414: Data Exchange - Step entity not correctly read"
+puts "==================================================================="
+puts ""
+
+pload VISUALIZATION
+
+stepread [locate_data_file bug28414_bug_toroidal_surface.stp] a *
+
+checkshape a_1 f
+
+checkprops a_1 -s 3593.35
+
+checkgravitycenter a_1 -s -30. 0. 137.993 0.001
+
+vinit
+vdisplay a_1
+vfit
+
+vdump $imagedir/${casename}.png
\ No newline at end of file
index ed26939c1ea464cb3dc14aa13aa8ece2f8397a46..1c32f0dcc23a8f4f4bd0d7eab1946b472f1038c4 100644 (file)
@@ -15,80 +15,18 @@ if { [info exists imagedir] == 0 } {
        file mkdir ${imagedir}
    }
 }
-
-# Generating resource file where all shape healing is off
-set fdata {
-ToSTEP.exec.op : SplitCommonVertex,DirectFaces
-
-FromSTEP.exec.op : FixShape
-
-FromSTEP.FixShape.Tolerance3d                         : &Runtime.Tolerance
-FromSTEP.FixShape.MaxTolerance3d                      : &Runtime.MaxTolerance
-FromSTEP.FixShape.MinTolerance3d                      : 1.e-7
-FromSTEP.FixShape.FixFreeShellMode                    : 0
-FromSTEP.FixShape.FixFreeFaceMode                     : 0
-FromSTEP.FixShape.FixFreeWireMode                     : 0
-FromSTEP.FixShape.FixSameParameterMode                : 0
-
-FromSTEP.FixShape.FixSolidMode                        : 0
-FromSTEP.FixShape.FixShellOrientationMode             : 0
-FromSTEP.FixShape.CreateOpenSolidMode                 : 0
-
-FromSTEP.FixShape.FixShellMode                        : 0
-FromSTEP.FixShape.FixFaceOrientationMode              : 0
-
-FromSTEP.FixShape.FixFaceMode                         : 0
-FromSTEP.FixShape.FixWireMode                         : 0
-FromSTEP.FixShape.FixOrientationMode                  : 0
-FromSTEP.FixShape.FixAddNaturalBoundMode              : 0
-FromSTEP.FixShape.FixMissingSeamMode                  : 0
-FromSTEP.FixShape.FixSmallAreaWireMode                : 0
-FromSTEP.FixShape.RemoveSmallAreaFaceMode             : 0
-FromSTEP.FixShape.FixIntersectingWiresMode            : 0
-FromSTEP.FixShape.FixLoopWiresMode                    : 0
-FromSTEP.FixShape.FixSplitFaceMode                    : 0
-FromSTEP.FixShape.AutoCorrectPrecisionMode            : 0
-FromSTEP.FixShape.ModifyTopologyMode                  : 0
-FromSTEP.FixShape.ModifyGeometryMode                  : 0
-FromSTEP.FixShape.ClosedWireMode                      : 0
-FromSTEP.FixShape.PreferencePCurveMode                : 0
-FromSTEP.FixShape.FixReorderMode                      : 0
-FromSTEP.FixShape.FixSmallMode                        : 0
-FromSTEP.FixShape.FixConnectedMode                    : 0
-FromSTEP.FixShape.FixEdgeCurvesMode                   : 0
-FromSTEP.FixShape.FixDegeneratedMode                  : 0
-FromSTEP.FixShape.FixLackingMode                      : 0
-FromSTEP.FixShape.FixSelfIntersectionMode             : 0
-FromSTEP.FixShape.RemoveLoopMode                      : 0
-FromSTEP.FixShape.FixReversed2dMode                   : 0
-FromSTEP.FixShape.FixRemovePCurveMode                 : 0
-FromSTEP.FixShape.FixRemoveCurve3dMode                : 0
-FromSTEP.FixShape.FixAddPCurveMode                    : 0
-FromSTEP.FixShape.FixAddCurve3dMode                   : 0
-FromSTEP.FixShape.FixSeamMode                         : 0
-FromSTEP.FixShape.FixShiftedMode                      : 0
-FromSTEP.FixShape.FixEdgeSameParameterMode            : 0
-FromSTEP.FixShape.FixNotchedEdgesMode                 : 0
-FromSTEP.FixShape.FixTailMode                         : 0
-FromSTEP.FixShape.MaxTailAngle                        : 0
-FromSTEP.FixShape.MaxTailWidth                        : 0
-FromSTEP.FixShape.FixSelfIntersectingEdgeMode         : 0
-FromSTEP.FixShape.FixIntersectingEdgesMode            : 0
-FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode : 0
-
-FromSTEP.FixShape.FixVertexPositionMode               : 0
-FromSTEP.FixShape.FixVertexToleranceMode              : 0
-}
-
-set new_resource_path ${imagedir}
-set resource_file STEP
-set fo [open "${new_resource_path}/${resource_file}" "wb"]
-puts -nonewline $fo $fdata
-close $fo
-
-# Changing the path to the resource file
+# remember the path to the old resource file
 set old_resource_path $::env(CSF_STEPDefaults)
-set env(CSF_STEPDefaults) ${new_resource_path}
+# reading old resource file
+set anOptions [parse_resource_file "${old_resource_path}/STEP"]
+# 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}
 
 # Generating, writing and reading the torus
 ptorus tor 20 5
@@ -108,4 +46,4 @@ view 1 -2D- 728 20 400 400
 checkview -screenshot -2d -path ${imagedir}/${test_image}.png
 
 # Restoring the path to the old resource file
-set env(CSF_STEPDefaults) ${old_resource_path}
+set ::env(CSF_STEPDefaults) ${old_resource_path}
index a19d6ce3052ee6460c3700a2ff94d425e316c13b..ba5dce2a206af74f4e28a7e0dcaf2af7d5aba788 100644 (file)
@@ -8,24 +8,49 @@ puts ""
 
 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"]
+# 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}
+
 set list [stepread [locate_data_file wgehaeuse_surface.stp] a *]
 
 if {[lsearch ${list} Error] > -1} {
-    puts "${BugNumber} : Error during reading attached IGES file"
+    puts "${BugNumber} : Error during reading attached STEP 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}
+
index 7dbfbf66fb9dbb7526dbfe475651bc929648158e..66bf8d35266ea9aa5f1dba918d659b9df65ceca9 100644 (file)
@@ -13,3 +13,47 @@ 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 be9d6b28f00c7b661a6ee6738b4bf623467be53b..cc0c34c71ae195a0c01c671bf662ff8c310d8cea 100644 (file)
@@ -67,12 +67,24 @@ 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
index 60f9cda3c54e78995f462b91229da0ba41a249d5..f2b249db24afeaa6b1f1f683631bd134183d2590 100644 (file)
@@ -16,3 +16,39 @@ 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}\""
+}
index 516117f8f71a826ba80c98d508a1a6ec82d8a03e..64b4f46cba6bc48a6d96ca697822a4ed38bfcfaa 100644 (file)
@@ -20,3 +20,39 @@ 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}\""
+}
index cf236b539a9f413db9c5be0982b8cf57a92c36a7..b903a708cd273c4fa981ffdd2b0100063945185c 100644 (file)
@@ -20,3 +20,39 @@ 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
index a9dc84a82c7e7b7e90b944542026c15c6fc5f750..141debb92fc08129213cf4946e20804123fa1d6b 100644 (file)
@@ -20,3 +20,39 @@ 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
index ec8cda4fd2e64b5097c56b4dd2d5a648df12def9..712a3e59828e0ffc44e7912e298076b2e3ebe4d5 100644 (file)
@@ -22,3 +22,39 @@ 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}\""
+}
index f98dd6f7c2f7b99ed499556e964faa698ec4fb21..c684948fa676b4f326da965b058424fd8090d4a6 100755 (executable)
@@ -1,6 +1,8 @@
 # !!!! 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: CHECKSHAPE : Faulty"
+puts "TODO CR23096 ALL: NBSHAPES : Faulty"
+puts "TODO CR23096 ALL: STATSHAPE : Faulty"
 
 set filename bm1_pe_t4.stp
 
@@ -8,8 +10,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    = 12  ( 12 )  Face     = 15  ( 15 ) 
-STATSHAPE   : Solid    = 0  ( 0 )  Shell    = 12  ( 12 )  Face     = 15  ( 15 )   FreeWire = 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 ) 
 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 )
index efa4373c29596a4b3026814342a15a830ea44e98..e08538bf00c90084cf3e88b377bbaed9cafdf817 100644 (file)
@@ -20,3 +20,39 @@ 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}\""
+}
index 807def6dc3b2b1e8dccefb7cf87c682ed1809d50..035864159a8ffd160dc1d698eeabb75373c97af3 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"]
+    # 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}\""
+}
+
index 908b5fbf1c070c02f3c8fed7931d69ce255f9922..1df2560691a1632811208fc3f7b79d52ddf304e1 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}\""
+}
+
index a3cf0a837513248b3e5f24195a1e47746b9a9c5b..2e78a1347f4498bedca39dfa409028722c0d03e4 100644 (file)
@@ -22,3 +22,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"]
+    # 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}\""
+}
+
index e9c1a96ca9d549f0f652a3933ac2d96b91414891..4f47b332488d36bc161e863ca78911f5bfb855c5 100644 (file)
@@ -20,3 +20,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"]
+    # 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}\""
+}
+
index 941eff477c1b619860b9b0b2c3a3a2edbbd5cf96..cc5b077c819110dac1ff9cd395c7bc3001b642f6 100644 (file)
@@ -20,3 +20,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"]
+    # 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}\""
+}
+