]> OCCT Git - occt-copy.git/commitdiff
0027384: BRepMesh_IncrementalMesh does not take angular deflection into account for...
authoroan <oan@opencascade.com>
Thu, 16 Jun 2016 13:35:45 +0000 (16:35 +0300)
committeroan <oan@opencascade.com>
Thu, 16 Jun 2016 14:27:53 +0000 (17:27 +0300)
19 files changed:
src/BRepMesh/BRepMesh.hxx
src/BRepMesh/BRepMesh_FastDiscretFace.cxx
src/BRepMesh/BRepMesh_FastDiscretFace.hxx
tests/bugs/mesh/bug24127
tests/bugs/mesh/bug25378_1_1
tests/bugs/mesh/bug25378_1_2
tests/bugs/mesh/bug25378_1_3
tests/bugs/mesh/bug25378_3_3
tests/bugs/mesh/bug25519
tests/bugs/moddata_1/bug22759
tests/mesh/begin
tests/mesh/data/advanced/B6
tests/mesh/data/standard/J8
tests/mesh/data/standard/L8
tests/mesh/data/standard/Q7
tests/mesh/data/standard/V5
tests/mesh/data/standard/W7
tests/mesh/data/standard/X3
tests/mesh/end

index 80b2ce042062fee92c3cfd986bb8d6464a138605..47213407a70dbdcb71e1497cc1642e5684016e14 100644 (file)
@@ -93,6 +93,7 @@ namespace BRepMesh
   typedef NCollection_List<Standard_Integer>                                                        ListOfInteger;
 
   //! Maps
+  typedef NCollection_Map<Standard_Real>                                                            MapOfReal;
   typedef NCollection_Map<Standard_Integer>                                                         MapOfInteger;
   typedef NCollection_DataMap<Handle(Poly_Triangulation), Standard_Boolean>                         DMapOfTriangulationBool;
   typedef NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>                                    MapOfShape;
index cdba30c9d0d93e2eefe9c1dca719ebf99eec2c8e..d5c9dc190b53a77d422444cdfe9fb132f3bc7d7f 100644 (file)
@@ -93,6 +93,29 @@ static Standard_Real FUN_CalcAverageDUV(TColStd_Array1OfReal& P, const Standard_
 
 namespace
 {
+  Standard_Real deflectionOfSegment (
+    const gp_Pnt& theFirstPoint,
+    const gp_Pnt& theLastPoint,
+    const gp_Pnt& theMidPoint)
+  {
+    // 23.03.2010 skl for OCC21645 - change precision for comparison
+    if (theFirstPoint.SquareDistance (theLastPoint) > Precision::SquareConfusion ())
+    {
+      gp_Lin aLin (theFirstPoint, gp_Dir (gp_Vec (theFirstPoint, theLastPoint)));
+      return aLin.Distance (theMidPoint);
+    }
+
+    return theFirstPoint.Distance (theMidPoint);
+  }
+
+  Standard_Boolean IsCompexSurface (const GeomAbs_SurfaceType theType)
+  {
+    return (
+      theType != GeomAbs_Sphere   &&
+      theType != GeomAbs_Cylinder &&
+      theType != GeomAbs_Cone     &&
+      theType != GeomAbs_Torus);
+  }
 
   //! Auxiliary class used to extract geometrical parameters of fixed TopoDS_Vertex.
   class FixedVExplorer
@@ -193,7 +216,7 @@ void BRepMesh_FastDiscretFace::initDataStructure()
   GeomAbs_SurfaceType thetype = gFace->GetType();
   const Standard_Boolean isBSpline = (thetype == GeomAbs_BezierSurface ||
                                       thetype == GeomAbs_BSplineSurface);
-  const Standard_Boolean useUVParam = (thetype == GeomAbs_Torus ||isBSpline);
+  const Standard_Boolean useUVParam = (thetype == GeomAbs_Torus || IsCompexSurface (thetype));
 
   myUParam.Clear(); 
   myVParam.Clear();
@@ -505,28 +528,6 @@ static void filterParameters(const BRepMesh::IMapOfReal& theParams,
     isCandidateDefined = Standard_True;
   }
   theResult.Append(aParamTmp.Last());
-  
-  if( theResult.Length() == 2 )
-  {
-    Standard_Real    dist  = theResult.Last() - theResult.First();
-    Standard_Integer nbint = (Standard_Integer)((dist / theFilterDist) + 0.5);
-
-    if( nbint > 1 )
-    {
-      //Five points more is maximum
-      if( nbint > 5 )
-      {
-        nbint = 5;
-      }
-
-      Standard_Integer i;
-      Standard_Real dU = dist / nbint;
-      for( i = 1; i < nbint; i++ )
-      {
-        theResult.InsertAfter(i, theResult.First()+i*dU);
-      }
-    }
-  }
 }
 
 void BRepMesh_FastDiscretFace::insertInternalVertices(
@@ -552,11 +553,6 @@ void BRepMesh_FastDiscretFace::insertInternalVertices(
     insertInternalVerticesTorus(theNewVertices);
     break;
 
-  case GeomAbs_BezierSurface:
-  case GeomAbs_BSplineSurface:
-    insertInternalVerticesBSpline(theNewVertices);
-    break;
-
   default:
     insertInternalVerticesOther(theNewVertices);
     break;
@@ -819,10 +815,10 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesTorus(
 }
 
 //=======================================================================
-//function : insertInternalVerticesBSpline
+//function : insertInternalVerticesOther
 //purpose  : 
 //=======================================================================
-void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
+void BRepMesh_FastDiscretFace::insertInternalVerticesOther(
   BRepMesh::ListOfVertex& theNewVertices)
 {
   const Standard_Real aRange[2][2] = {
@@ -861,22 +857,19 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
   }
 
   // check intermediate isolines
-  Handle(Geom_Surface) aBSpline;
-  GeomAbs_SurfaceType  aSurfType = gFace->GetType();
-  if (aSurfType == GeomAbs_BezierSurface)
-    aBSpline = gFace->Bezier();
-  else if (aSurfType == GeomAbs_BSplineSurface)
-    aBSpline = gFace->BSpline();
-
+  Handle (Geom_Surface) aSurface = gFace->ChangeSurface ().Surface ().Surface ();
   const BRepMesh::HClassifier& aClassifier = myAttribute->ChangeClassifier();
 
+  BRepMesh::MapOfReal aParamsToRemove[2];
+  BRepMesh::MapOfReal aParamsForbiddenToRemove[2];
+
   // precision for compare square distances
-  const Standard_Real aPrecision   = Precision::Confusion();
-  const Standard_Real aSqPrecision = aPrecision * aPrecision;
+  const Standard_Real aPrecision = Precision::Confusion();
   for (Standard_Integer k = 0; k < 2; ++k)
   {
+    const Standard_Integer aOtherIndex = (k + 1) % 2;
     BRepMesh::SequenceOfReal& aParams1 = aParams[k];
-    BRepMesh::SequenceOfReal& aParams2 = aParams[(k + 1) % 2];
+    BRepMesh::SequenceOfReal& aParams2 = aParams[aOtherIndex];
     const Standard_Boolean isU = (k == 0);
     Standard_Integer aStartIndex, aEndIndex; 
     if (isU)
@@ -890,31 +883,30 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
       aEndIndex   = aParams1.Length() - 1;
     }
 
+    BRepMesh::MapOfReal& aToRemove2          = aParamsToRemove[aOtherIndex];
+    BRepMesh::MapOfReal& aForbiddenToRemove1 = aParamsForbiddenToRemove[k];
+    BRepMesh::MapOfReal& aForbiddenToRemove2 = aParamsForbiddenToRemove[aOtherIndex];
     for (Standard_Integer i = aStartIndex; i <= aEndIndex; ++i)
     {
       const Standard_Real aParam1 = aParams1(i);
       GeomAdaptor_Curve aIso(isU ?
-        aBSpline->UIso(aParam1) : aBSpline->VIso(aParam1));
+        aSurface->UIso (aParam1) : aSurface->VIso (aParam1));
 
       Standard_Real aPrevParam2 = aParams2(1);
-      gp_Pnt aPrevPnt2 = aIso.Value(aPrevParam2);
+      gp_Pnt aPrevPnt2;
+      gp_Vec aPrevVec2;
+      aIso.D1 (aPrevParam2, aPrevPnt2, aPrevVec2);
       for (Standard_Integer j = 2; j <= aParams2.Length();)
       {
         Standard_Real aParam2 = aParams2(j);
-        gp_Pnt aPnt2 = aIso.Value(aParam2);
+        gp_Pnt aPnt2;
+        gp_Vec aVec2;
+        aIso.D1 (aParam2, aPnt2, aVec2);
+
         Standard_Real aMidParam = 0.5 * (aPrevParam2 + aParam2);
         gp_Pnt aMidPnt = aIso.Value(aMidParam);
 
-        // 23.03.2010 skl for OCC21645 - change precision for comparison
-        Standard_Real aDist;
-        if (aPrevPnt2.SquareDistance(aPnt2) > aSqPrecision)
-        {
-          gp_Lin aLin(aPrevPnt2, gp_Dir(gp_Vec(aPrevPnt2, aPnt2)));
-          aDist = aLin.Distance(aMidPnt);
-        }
-        else
-          aDist = aPrevPnt2.Distance(aMidPnt);
-
+        Standard_Real aDist = deflectionOfSegment (aPrevPnt2, aPnt2, aMidPnt);
         if (aDist > aDefFace && aDist > myMinSize)
         {
           // insertion 
@@ -936,14 +928,14 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
           }
 
           gp_Dir N1(0, 0, 1), N2(0, 0, 1);
-          Standard_Boolean aSt1 = GeomLib::NormEstim(aBSpline, aStPnt1, aPrecision, N1);
-          Standard_Boolean aSt2 = GeomLib::NormEstim(aBSpline, aStPnt2, aPrecision, N2);
+          Standard_Boolean aSt1 = GeomLib::NormEstim (aSurface, aStPnt1, aPrecision, N1);
+          Standard_Boolean aSt2 = GeomLib::NormEstim (aSurface, aStPnt2, aPrecision, N2);
 
-          Standard_Real aAngle = N2.Angle(N1);
+          const Standard_Real aAngle = N2.Angle(N1);
           if (aSt1 < 1 && aSt2 < 1 && aAngle > myAngle)
           {
-            Standard_Real aLen = GCPnts_AbscissaPoint::Length(aIso,
-              aPrevParam2, aMidParam, aDefFace);
+            const Standard_Real aLen = GCPnts_AbscissaPoint::Length (
+              aIso, aPrevParam2, aMidParam, aDefFace);
 
             if (aLen > myMinSize)
             {
@@ -953,8 +945,51 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
             }
           }
 
+          // Here we should leave at least 3 parameters as far as
+          // we must have at least one parameter related to surface
+          // internals in order to prevent movement of triangle body
+          // outside the surface in case of highly curved ones, e.g.
+          // BSpline springs.
+          if (aDist < aDefFace       &&
+              aParams2.Length () > 3 && 
+              j < aParams2.Length ())
+          {
+            // Remove too dense points
+            const Standard_Real aTmpParam = aParams2 (j + 1);
+            gp_Pnt aTmpPnt;
+            gp_Vec aTmpVec;
+            aIso.D1 (aTmpParam, aTmpPnt, aTmpVec);
+
+            Standard_Real aTmpMidParam = 0.5 * (aPrevParam2 + aTmpParam);
+            gp_Pnt        aTmpMidPnt = aIso.Value (aTmpMidParam);
+
+            // Lets check next parameter.
+            // If it also fits deflection, we can remove previous parameter.
+            aDist = deflectionOfSegment (aPrevPnt2, aTmpPnt, aTmpMidPnt);
+            if (aDist < aDefFace)
+            {
+              // Lets check parameters for angular deflection.
+              if (aPrevVec2.Angle (aTmpVec) < myAngle)
+              {
+                // For current Iso line we can remove this parameter.
+                aToRemove2.Add (aParam2);
+                aParam2 = aTmpParam;
+                aPnt2   = aTmpPnt;
+                aVec2   = aTmpVec;
+                ++j;
+              }
+              else {
+                // We have found a place on the surface refusing 
+                // removement of this parameter.
+                aForbiddenToRemove1.Add (aParam1);
+                aForbiddenToRemove2.Add (aParam2);
+              }
+            }
+          }
+
           aPrevParam2 = aParam2;
           aPrevPnt2   = aPnt2;
+          aPrevVec2   = aVec2;
 
           ++j;
         }
@@ -965,10 +1000,17 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
   // insert nodes of the regular grid
   for (Standard_Integer i = 1; i <= aParams[0].Length(); ++i)
   {
-    const Standard_Real aParam1 = aParams[0].Value(i);
+    const Standard_Real aParam1 = aParams[0].Value (i);
+    if (aParamsToRemove[0].Contains (aParam1) && !aParamsForbiddenToRemove[0].Contains (aParam1))
+      continue;
+
     for (Standard_Integer j = 1; j <= aParams[1].Length(); ++j)
     {
-      gp_Pnt2d aPnt2d(aParam1, aParams[1].Value(j));
+      const Standard_Real aParam2 = aParams[1].Value (j);
+      if (aParamsToRemove[1].Contains (aParam2) && !aParamsForbiddenToRemove[1].Contains (aParam2))
+        continue;
+
+      gp_Pnt2d aPnt2d(aParam1, aParam2);
 
       // Classify intersection point
       if (aClassifier->Perform(aPnt2d) == TopAbs_IN)
@@ -981,87 +1023,6 @@ void BRepMesh_FastDiscretFace::insertInternalVerticesBSpline(
   }
 }
 
-//=======================================================================
-//function : insertInternalVerticesOther
-//purpose  : 
-//=======================================================================
-void BRepMesh_FastDiscretFace::insertInternalVerticesOther(
-  BRepMesh::ListOfVertex& theNewVertices)
-{
-  const Standard_Real aAngle = myAngle;//0.35;
-  const Standard_Real aRange[2][2] = {
-      { myAttribute->GetUMax(), myAttribute->GetUMin() },
-      { myAttribute->GetVMax(), myAttribute->GetVMin() }
-  };
-
-  const Standard_Real                 aDefFace = myAttribute->GetDefFace();
-  const Handle(BRepAdaptor_HSurface)& gFace = myAttribute->Surface();
-
-  BRepMesh::SequenceOfReal aParams[2];
-  const Standard_Integer aIsoPointsNb = 11;
-  for (Standard_Integer k = 0; k < 2; ++k)
-  {
-    const Standard_Boolean isU = (k == 0);
-    const GeomAbs_IsoType  aIsoType = isU ? GeomAbs_IsoU : GeomAbs_IsoV;
-    const Standard_Integer aOtherParamsIndex = (k + 1) % 2;
-    const Standard_Real (&aRange1)[2] = aRange[k];
-    const Standard_Real (&aRange2)[2] = aRange[aOtherParamsIndex];
-
-    GCPnts_TangentialDeflection aDiscretIso[aIsoPointsNb];
-    const Standard_Real aStepWidth = (aRange1[0] - aRange1[1]) / aIsoPointsNb;
-
-    // Find the most curved Iso.
-    Standard_Integer aMaxIndex = 1, aMaxPointsNb = 0;
-    for (Standard_Integer aIsoIt = 0; aIsoIt < aIsoPointsNb; ++aIsoIt)
-    {
-      Standard_Real aParam = aRange1[1] + aIsoIt * aStepWidth;
-      Adaptor3d_IsoCurve aIso(gFace, aIsoType, aParam);
-
-      Standard_Real aFirstParam = Max(aRange2[1], aIso.FirstParameter());
-      Standard_Real aLastParam  = Min(aRange2[0], aIso.LastParameter());
-
-      aDiscretIso[aIsoIt].Initialize(aIso, aFirstParam, aLastParam, 
-        aAngle, 0.7 * aDefFace, 2, Precision::PConfusion(), myMinSize);
-
-      const Standard_Integer aPointsNb = aDiscretIso[aIsoIt].NbPoints();
-      if (aPointsNb > aMaxPointsNb)
-      {
-        aMaxPointsNb = aPointsNb;
-        aMaxIndex    = aIsoIt;
-      }
-    }
-
-    BRepMesh::SequenceOfReal& aParams2 = aParams[aOtherParamsIndex];
-    GCPnts_TangentialDeflection& aDIso = aDiscretIso[aMaxIndex];
-    for (Standard_Integer i = 1; i <= aMaxPointsNb; ++i)
-      aParams2.Append(aDIso.Parameter(i));
-
-    if (aParams2.Length() == 2)
-      aParams2.InsertAfter(1, 0.5 * (aRange2[1] + aRange2[0]));
-  }
-
-  Adaptor3d_IsoCurve aIsoV;
-  aIsoV.Load(gFace);
-
-  const BRepMesh::HClassifier& aClassifier = myAttribute->ChangeClassifier();
-  const Standard_Integer aUPointsNb = aParams[0].Length();
-  const Standard_Integer aVPointsNb = aParams[1].Length();
-  for (Standard_Integer i = 2; i < aVPointsNb; ++i)
-  {
-    const Standard_Real aV = aParams[1].Value(i);
-    aIsoV.Load(GeomAbs_IsoV, aV);
-
-    for (Standard_Integer j = 2; j < aUPointsNb; ++j)
-    {
-      const Standard_Real aU = aParams[0].Value(j);
-
-      const gp_Pnt2d aNewPoint(aU, aV);
-      if (aClassifier->Perform(aNewPoint) == TopAbs_IN)
-        insertVertex(aIsoV.Value(aU), aNewPoint.Coord(), theNewVertices);
-    }
-  }
-}
-
 //=======================================================================
 //function : checkDeflectionAndInsert
 //purpose  : 
@@ -1145,11 +1106,9 @@ Standard_Real BRepMesh_FastDiscretFace::control(
   const Handle(BRepAdaptor_HSurface)& gFace = myAttribute->Surface();
 
   Handle(Geom_Surface) aBSpline;
-  GeomAbs_SurfaceType  aSurfType = gFace->GetType();
-  if (aSurfType == GeomAbs_BezierSurface)
-    aBSpline = gFace->Bezier();
-  else if (aSurfType == GeomAbs_BSplineSurface)
-    aBSpline = gFace->BSpline();
+  const GeomAbs_SurfaceType aSurfType = gFace->GetType ();
+  if (IsCompexSurface (aSurfType) && aSurfType != GeomAbs_SurfaceOfExtrusion)
+    aBSpline = gFace->ChangeSurface ().Surface().Surface();
 
   NCollection_DataMap<Standard_Integer, gp_Dir> aNorMap;
   BRepMesh::MapOfIntegerInteger                 aStatMap;
index 66e05b1c73618b21c16ab1b5d4db8148f5dac90b..0e66df33f7367b009f8c5bc34833b0a3a0c8e8bb 100644 (file)
@@ -108,10 +108,6 @@ private:
   //! @param theNewVertices list of vertices to be extended and added to mesh.
   void insertInternalVerticesTorus(BRepMesh::ListOfVertex& theNewVertices);
 
-  //! Calculates nodes lying on Bezier/BSpline surface.
-  //! @param theNewVertices list of vertices to be extended and added to mesh.
-  void insertInternalVerticesBSpline(BRepMesh::ListOfVertex& theNewVertices);
-
   //! Calculates nodes lying on custom-type surface.
   //! @param theNewVertices list of vertices to be extended and added to mesh.
   void insertInternalVerticesOther(BRepMesh::ListOfVertex& theNewVertices);
index 16dbac7dcf332dba38943b7f96f79b2e924af902..542aacdde5c67b520eed13842aaf97579493a178 100755 (executable)
@@ -19,15 +19,15 @@ regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
 regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
 regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
 
-if { ${nbtri_s} != 99 } {
+if { ${nbtri_s} != 17 } {
    puts "Error: triangle number is bad"
 }
 
-if { ${nbnod_s} != 59 } {
+if { ${nbnod_s} != 18 } {
    puts "Error: node number is bad"
 }
 
-set expected_defl_s 0.59663444648536146
+set expected_defl_s 0.3345840532742983
 set tol_abs_defl_s 1.e-3
 set tol_rel_defl_s 0.01
 checkreal "Deflection" ${defl_s} ${expected_defl_s} ${tol_abs_defl_s} ${tol_rel_defl_s}
index 7a560437e5ac545580114e9e0c6e63f1060f3a6b..3ab8cef57cb7804388a18a28c48f1702b8e1a864 100755 (executable)
@@ -24,9 +24,9 @@ if { [regexp {Debug mode} [dversion]] } {
     set max_t_1 20
 } else {
   if { [regexp {Windows} [dversion]] } {
-    set max_t_1 15
+    set max_t_1 0
   } else {
-    set max_t_1 20
+    set max_t_1 0
   }
 }
 
index fd56f719a5242e479edd6d8eb3d83388b58ec0a7..d307ddb15cceccd96e0670429fee1b6937ba1826 100755 (executable)
@@ -24,9 +24,9 @@ if { [regexp {Debug mode} [dversion]] } {
     set max_t_01 180
 } else {
   if { [regexp {Windows} [dversion]] } {
-    set max_t_01 90
+    set max_t_01 1
   } else {
-    set max_t_01 90
+    set max_t_01 1
   }
 }
 
index 8cee3ebf07f731561ed3f67b4e62dd8950fc087a..eaf05994b74a9390c63e0e4b4b6ff92623759d61 100755 (executable)
@@ -25,9 +25,9 @@ if { [regexp {Debug mode} [dversion]] } {
     set max_t_001 600
 } else {
   if { [regexp {Windows} [dversion]] } {
-    set max_t_001 360
+    set max_t_001 184
   } else {
-    set max_t_001 400
+    set max_t_001 184
   }
 }
 
index 274598f445e2c5aa5b677734a115e80a0206d09c..fe30be428cd77c520be12c97d6a7d20b58b4aff9 100644 (file)
@@ -18,9 +18,9 @@ if { [regexp {Debug mode} [dversion]] } {
     set max_t_001 50
 } else {
   if { [regexp {Windows} [dversion]] } {
-    set max_t_001 20
+    set max_t_001 14
   } else {
-    set max_t_001 55
+    set max_t_001 14
   }
 }
 
index 73501ff6bba79a18fb8642e3857afa8a1576faeb..45c9aac08e1d213a807eae588217376afa7a2608 100755 (executable)
@@ -20,9 +20,9 @@ regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
 regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
 regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
 
-set good_nbtri 2721
-set good_nbnod 1405
-set good_defl 0.044436924588798624
+set good_nbtri 1779
+set good_nbnod 936
+set good_defl 0.10452721084309395
 
 set good_percent 5
 
index c7befea4f99ab077bbb97cb09679664d4ecb276e..a8f153e5e5269d2c62df3200b723c1b653f87f74 100755 (executable)
@@ -30,14 +30,14 @@ regexp {deflection +([-0-9.+eE]+)} $tri_info full defl
 set env(os_type) $tcl_platform(platform)
 if { [string compare $env(os_type) "windows"] != 0 } {
    puts "OS = Linux"
-   set good_tri  520414
-   set good_nod  263938
-   set good_defl 0.0026800432954056617
+   set good_tri  392920
+   set good_nod  200191
+   set good_defl 0.0092442421472207319
 } else {
    puts "OS = Windows NT"
-   set good_tri  520414
-   set good_nod  263938
-   set good_defl 0.0026800432954056617
+   set good_tri  392920
+   set good_nod  200191
+   set good_defl 0.0092442421472207319
 }
 
 proc GetPercent {Value GoodValue} {
index 5d6a7d4ad46023cae3c00acf756f1e517706f823..4442d0f5bff48e412b3edf3739b1145195c6a550 100755 (executable)
@@ -3,6 +3,7 @@ set percent_max 5.
 
 # relative tolerance (%)
 set rel_tol 1
+set max_rel_tol_diff 0
 
 set area_eps 0
 
index 4a9a082fb5ab90a90a31cac516108f3eb3c58a53..caa23af7f51ea0bade87bfa6b100a9639531da3a 100755 (executable)
@@ -3,5 +3,6 @@ if { [string compare $command "incmesh"] == 0 ||
      [string compare $command "mesh"] == 0 ||
      [string compare $command "incmesh_parallel"] == 0 } {
   set bug_area "OCC25519"
-  set rel_tol 1.3485
+  set max_rel_tol_diff 1
+  set rel_tol 0.91
 }
index 15e36fbb1a122607c91473f017dba0c7e79c69fe..92f29bcc48a6eb8bdf902dc39c9cbd33164a866c 100755 (executable)
@@ -1,5 +1,5 @@
 set TheFileName shading_089.brep
 if { [string compare $command "shading"] != 0 } {
    set bug_area "OCC22687"
-   set rel_tol 10
+   set rel_tol 1.42
 }
index 1645dc02aa25c62e091e4d306056753f757a24d1..d2e464eb643ea1de3fcdb1dfbab30f39d8d81df3 100755 (executable)
@@ -1 +1,5 @@
 set TheFileName shading_107.brep
+if { [string compare $command "shading"] == 0 } {
+  set bug_freelinks "L8"
+  set nbfree(All) 96
+} 
index a18ed5e62db316d533a087d6c5b719e22d25d864..386828c832b4b0219173cbcc6644fa6ae9b852a2 100755 (executable)
@@ -1,3 +1,3 @@
 set TheFileName shading_151.brep
 set bug_area "OCC22687"
-set rel_tol 3.15
+set rel_tol 3.12
index 84d661b645dca64fbc17a9cef7674802920cb3ee..4b69fa68044186a8d4aa684e31cff9bb1a8624e8 100755 (executable)
@@ -1,5 +1,5 @@
 set TheFileName shading_wrongshape_016.brep
 if { [string compare $command "shading"] == 0 } {
    set bug_area "OCC22687"
-   set rel_tol 1.28
+   set rel_tol 0.47
 }
index cc79f61406ed90dc8d89f7c15f308c875c0c89ff..bc5e498e50a9d961860f898670cd8869fa7bc6ea 100755 (executable)
@@ -1,9 +1,12 @@
 set TheFileName shading_wrongshape_027.brep
 set bug_freenodes "OCC22687"
-set nbfreenodes(All) 2
+#set nbfreenodes(All) 2
+set max_rel_tol_diff 1
 if { [string compare $command "shading"] != 0 } {
-  set bug_area "OCC22687"
-  set rel_tol 1.1
+  #set bug_area "OCC22687"
+  set rel_tol 2.13
+} else {
+  set rel_tol 0.48
 }
 set nbcross(All) 2
 set bug_cross "OCC23184"
index 625a2abf72e4a8579f22ef85182ab8b1cac804f9..cf919367a32f6fb807289b1bfab6a3f13444c984 100644 (file)
@@ -3,3 +3,12 @@ set TheFileName ""
 restore [locate_data_file OCC358a.brep] f
 restore [locate_data_file OCC358b.brep] w
 pipe res w f
+
+set bug_area "OCC358"
+set max_rel_tol_diff 1
+puts $command
+if { [string compare $command "shading"] == 0 } {
+  set rel_tol 1.67
+} else {
+  set rel_tol 0.676
+}
\ No newline at end of file
index ee661224d6a93d8f26a6d6b79b800626ac55fe0d..172f1279852c689cb53dc13c30ca74da28e17bf8 100644 (file)
@@ -148,9 +148,13 @@ set rel_err [expr abs([CheckTriArea res $area_eps])]
 if { $rel_err > $rel_tol } {
     puts "Error   : area by triangles differs from the actual area by $rel_err %"
 } else {
+  if { [info exists max_rel_tol_diff] && $max_rel_tol_diff > 0 } {
+    checkreal "area difference" $rel_err $rel_tol $max_rel_tol_diff 0
+  } else {
     if { $rel_tol > 1 && $rel_tol < 100 } {
-       puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol"
+      puts "Error: Improvement: The current area difference is $rel_err instead of $rel_tol"
     }
+  }
 }
 
 # Check if topology of mesh is valid