]> OCCT Git - occt.git/commitdiff
0032241: Mesh - wrong shading display of thrusections [regression since OCCT 7.4.0]
authoroan <oan@opencascade.com>
Fri, 9 Sep 2022 08:29:38 +0000 (11:29 +0300)
committersmoskvin <smoskvin@opencascade.com>
Fri, 16 Sep 2022 15:34:44 +0000 (18:34 +0300)
0032422: Mesh - Weird rendering
0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient

Added method BRepMesh_NURBSRangeSplitter::getUndefinedInterval() intended to compute checkpoint parameters for those NURBS surfaces which have no intervals at all. In this case number of poles is used to produce artificial regular grid which can be refined further. Add at least one midpoint for surfaces with one interval and only two poles.

Added BRepMesh_ExtrusionRangeSplitter and BRepMesh_UndefinedRangeSplitter derivatives from BRepMesh_NURBSRangeSplitter intended to handle special cases of extrusion surfaces and general surfaces with undefined parameters.

54 files changed:
src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx
src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx
src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx
src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx [new file with mode: 0644]
src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx [new file with mode: 0644]
src/BRepMesh/FILES
tests/bugs/iges/buc60820_1
tests/bugs/iges/buc60820_2
tests/bugs/iges/buc60823
tests/bugs/iges/bug306
tests/bugs/mesh/bug23631
tests/bugs/mesh/bug25287
tests/bugs/mesh/bug27845
tests/bugs/mesh/bug29149
tests/bugs/mesh/bug29641 [new file with mode: 0644]
tests/bugs/mesh/bug30008_1
tests/bugs/mesh/bug30167
tests/bugs/mesh/bug31251
tests/bugs/mesh/bug32241 [new file with mode: 0644]
tests/bugs/mesh/bug32422 [new file with mode: 0644]
tests/bugs/modalg_2/bug264_0
tests/bugs/modalg_2/bug292
tests/bugs/modalg_2/bug358
tests/bugs/moddata_1/bug15519
tests/bugs/moddata_1/bug22759
tests/bugs/moddata_2/bug428
tests/de_mesh/shape_write_stl/A11
tests/de_mesh/shape_write_stl/A4
tests/hlr/poly_hlr/C12
tests/hlr/poly_hlr/C14
tests/hlr/poly_hlr/C15
tests/hlr/poly_hlr/C16
tests/hlr/poly_hlr/C17
tests/hlr/poly_hlr/C3
tests/hlr/poly_hlr/C7
tests/hlr/poly_hlr/bug23625_1
tests/hlr/poly_hlr/bug23625_2
tests/hlr/poly_hlr/bug23625_3
tests/hlr/poly_hlr/bug27719_102
tests/hlr/poly_hlr/bug27719_103
tests/hlr/poly_hlr/bug27719_104
tests/hlr/poly_hlr/bug27719_105
tests/mesh/data/advanced/B8
tests/mesh/data/standard/L2
tests/mesh/data/standard/M8
tests/mesh/data/standard/Q3
tests/mesh/data/standard/U2
tests/mesh/data/standard/W6
tests/mesh/data/standard/W7
tests/mesh/data/standard/X1
tests/perf/mesh/bug26965
tests/v3d/bugs/bug288_5

diff --git a/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx b/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx
new file mode 100644 (file)
index 0000000..e836936
--- /dev/null
@@ -0,0 +1,45 @@
+// Created on: 2022-09-07
+// Copyright (c) 2022 OPEN CASCADE SAS
+// Created by: Oleg AGASHIN
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <BRepMesh_ExtrusionRangeSplitter.hxx>
+
+//=======================================================================
+// Function: getUndefinedIntervalNb
+// Purpose : 
+//=======================================================================
+Standard_Integer BRepMesh_ExtrusionRangeSplitter::getUndefinedIntervalNb(
+  const Handle(Adaptor3d_Surface)& theSurface,
+  const Standard_Boolean           /*isU*/,
+  const GeomAbs_Shape              theContinuity) const
+{
+  // Here we need just a regular grid along dimension with no 
+  // geometrical data regarding intervals like extrusion surface.
+  const Handle(Adaptor3d_Curve) aCurve = theSurface->BasisCurve();
+  Standard_Integer aIntervalsNb = aCurve->NbIntervals(theContinuity);
+  if (aIntervalsNb == 1)
+  {
+    const GeomAbs_CurveType aCurveType = aCurve->GetType();
+    const Standard_Boolean isBSplineCurve =
+      aCurveType == GeomAbs_BezierCurve ||
+      aCurveType == GeomAbs_BSplineCurve;
+
+    if (isBSplineCurve)
+    {
+      aIntervalsNb = aCurve->NbPoles() - 1;
+    }
+  }
+
+  return aIntervalsNb;
+}
diff --git a/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx b/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx
new file mode 100644 (file)
index 0000000..c1fda20
--- /dev/null
@@ -0,0 +1,45 @@
+// Created on: 2022-09-07
+// Copyright (c) 2022 OPEN CASCADE SAS
+// Created by: Oleg AGASHIN
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _BRepMesh_ExtrusionRangeSplitter_HeaderFile
+#define _BRepMesh_ExtrusionRangeSplitter_HeaderFile
+
+#include <BRepMesh_NURBSRangeSplitter.hxx>
+
+//! Auxiliary class analysing extrusion surface in order to generate internal nodes.
+class BRepMesh_ExtrusionRangeSplitter : public BRepMesh_NURBSRangeSplitter
+{
+public:
+
+  //! Constructor.
+  BRepMesh_ExtrusionRangeSplitter()
+  {
+  }
+
+  //! Destructor.
+  virtual ~BRepMesh_ExtrusionRangeSplitter()
+  {
+  }
+
+protected:
+
+  //! Returns number of intervals computed using available geometrical parameters.
+  Standard_EXPORT virtual Standard_Integer getUndefinedIntervalNb(
+    const Handle(Adaptor3d_Surface)& theSurface,
+    const Standard_Boolean           isU,
+    const GeomAbs_Shape              theContinuity) const Standard_OVERRIDE;
+};
+
+#endif
index 00fd9f95567a78b91560acd71dc56ce9c149c050..ce7cb6fba95d56b6275b4fb95789829c9f3c87f3 100644 (file)
@@ -21,6 +21,8 @@
 #include <BRepMesh_DelaunayBaseMeshAlgo.hxx>
 #include <BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx>
 #include <BRepMesh_BoundaryParamsRangeSplitter.hxx>
+#include <BRepMesh_ExtrusionRangeSplitter.hxx>
+#include <BRepMesh_UndefinedRangeSplitter.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_MeshAlgoFactory, IMeshTools_MeshAlgoFactory)
 
@@ -98,7 +100,18 @@ Handle(IMeshTools_MeshAlgo) BRepMesh_MeshAlgoFactory::GetAlgo(
     return new DeflectionControlMeshAlgo<BRepMesh_BoundaryParamsRangeSplitter>::Type;
     break;
 
-  default:
+  case GeomAbs_SurfaceOfExtrusion:
+    return new DeflectionControlMeshAlgo<BRepMesh_ExtrusionRangeSplitter>::Type;
+    break;
+
+  case GeomAbs_BezierSurface:
+  case GeomAbs_BSplineSurface:
     return new DeflectionControlMeshAlgo<BRepMesh_NURBSRangeSplitter>::Type;
+    break;
+
+  case GeomAbs_OffsetSurface:
+  case GeomAbs_OtherSurface:
+  default:
+    return new DeflectionControlMeshAlgo<BRepMesh_UndefinedRangeSplitter>::Type;
   }
 }
index 7b0bdb67add86916656cbbe01fbe63ce7de80ebe..186eca8059e2b003a0257eb2ad70f1688911a4f1 100644 (file)
@@ -392,27 +392,73 @@ Handle(IMeshData::ListOfPnt2d) BRepMesh_NURBSRangeSplitter::GenerateSurfaceNodes
   return aNodes;
 }
 
+//=======================================================================
+// Function: getUndefinedIntervalNb
+// Purpose : 
+//=======================================================================
+Standard_Integer BRepMesh_NURBSRangeSplitter::getUndefinedIntervalNb(
+  const Handle(Adaptor3d_Surface)& theSurface,
+  const Standard_Boolean           isU,
+  const GeomAbs_Shape              /*theContinuity*/) const
+{
+  return (isU ? theSurface->NbUPoles() : theSurface->NbVPoles()) - 1;
+}
+
+//=======================================================================
+// Function: getUndefinedInterval
+// Purpose : 
+//=======================================================================
+void BRepMesh_NURBSRangeSplitter::getUndefinedInterval(
+  const Handle(Adaptor3d_Surface)&               theSurface,
+  const Standard_Boolean                         isU,
+  const GeomAbs_Shape                            theContinuity,
+  const std::pair<Standard_Real, Standard_Real>& theRange,
+  TColStd_Array1OfReal&                          theIntervals) const
+{
+  Standard_Integer aIntervalsNb = isU ? 
+    theSurface->NbUIntervals(theContinuity) :
+    theSurface->NbVIntervals(theContinuity);
+
+  if (aIntervalsNb == 1)
+  {
+    aIntervalsNb = getUndefinedIntervalNb(theSurface, isU, theContinuity);
+    if (aIntervalsNb > 1)
+    {
+      theIntervals = TColStd_Array1OfReal(1, aIntervalsNb - 1);
+      const Standard_Real aDiff = (theRange.second - theRange.first) / aIntervalsNb;
+      for (Standard_Integer i = theIntervals.Lower(); i <= theIntervals.Upper(); ++i)
+      {
+        theIntervals.SetValue(i, theRange.first + i * aDiff);
+      }
+    }
+  }
+
+  if (theIntervals.IsEmpty())
+  {
+    theIntervals = TColStd_Array1OfReal(1, aIntervalsNb + 1);
+    if (isU)
+    {
+      theSurface->UIntervals(theIntervals, theContinuity);
+    }
+    else
+    {
+      theSurface->VIntervals(theIntervals, theContinuity);
+    }
+  }
+}
+
 //=======================================================================
 // Function: initParameters
 // Purpose : 
 //=======================================================================
 Standard_Boolean BRepMesh_NURBSRangeSplitter::initParameters() const
 {
-  const Handle(BRepAdaptor_Surface)& aSurface = GetSurface();
-
   const GeomAbs_Shape aContinuity = GeomAbs_CN;
-  const std::pair<Standard_Integer, Standard_Integer> aIntervalsNb(
-    aSurface->NbUIntervals(aContinuity),
-    aSurface->NbVIntervals(aContinuity)
-  );
-
-  TColStd_Array1OfReal aIntervals[2] = {
-    TColStd_Array1OfReal(1, aIntervalsNb.first  + 1),
-    TColStd_Array1OfReal(1, aIntervalsNb.second + 1)
-  };
+  const Handle(BRepAdaptor_Surface)& aSurface = GetSurface();
 
-  aSurface->UIntervals(aIntervals[0], aContinuity);
-  aSurface->VIntervals(aIntervals[1], aContinuity);
+  TColStd_Array1OfReal aIntervals[2];
+  getUndefinedInterval(aSurface, Standard_True,  aContinuity, GetRangeU(), aIntervals[0]);
+  getUndefinedInterval(aSurface, Standard_False, aContinuity, GetRangeV(), aIntervals[1]);
 
   const Standard_Boolean isSplitIntervals = toSplitIntervals (aSurface->Surface().Surface(), aIntervals);
 
index 9dfc40973b5f97758456b9d84eac6c9fd9e3b947..525b44a4f3f9a8e325f238f212eb5772d2b91e52 100644 (file)
@@ -49,7 +49,21 @@ protected:
   //! Initializes U and V parameters lists using CN continuity intervals.
   Standard_EXPORT virtual Standard_Boolean initParameters() const;
 
+  //! Returns number of intervals computed using available geometrical parameters.
+  Standard_EXPORT virtual Standard_Integer getUndefinedIntervalNb(
+    const Handle(Adaptor3d_Surface)& theSurface,
+    const Standard_Boolean           isU,
+    const GeomAbs_Shape              theContinuity) const;
+
 private:
+  //! Tries to compute intervals even for cases with no intervals 
+  //! at all using available geometrical parameters.
+  void getUndefinedInterval(
+    const Handle(Adaptor3d_Surface)&               theSurface,
+    const Standard_Boolean                         isU,
+    const GeomAbs_Shape                            theContinuity,
+    const std::pair<Standard_Real, Standard_Real>& theRange,
+    TColStd_Array1OfReal&                          theIntervals) const;
 
   //! Computes parameters of filter and applies it to the source parameters.
   Handle(IMeshData::SequenceOfReal) computeGrainAndFilterParameters(
diff --git a/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx b/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx
new file mode 100644 (file)
index 0000000..4e0c8ab
--- /dev/null
@@ -0,0 +1,28 @@
+// Created on: 2022-09-07
+// Copyright (c) 2022 OPEN CASCADE SAS
+// Created by: Oleg AGASHIN
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <BRepMesh_UndefinedRangeSplitter.hxx>
+
+//=======================================================================
+// Function: getUndefinedIntervalNb
+// Purpose : 
+//=======================================================================
+Standard_Integer BRepMesh_UndefinedRangeSplitter::getUndefinedIntervalNb(
+  const Handle(Adaptor3d_Surface)& /*theSurface*/,
+  const Standard_Boolean           /*isU*/,
+  const GeomAbs_Shape              /*theContinuity*/) const
+{
+  return 1;
+}
diff --git a/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx b/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx
new file mode 100644 (file)
index 0000000..2ca7ec0
--- /dev/null
@@ -0,0 +1,46 @@
+// Created on: 2022-09-07
+// Copyright (c) 2022 OPEN CASCADE SAS
+// Created by: Oleg AGASHIN
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _BRepMesh_UndefinedRangeSplitter_HeaderFile
+#define _BRepMesh_UndefinedRangeSplitter_HeaderFile
+
+#include <BRepMesh_NURBSRangeSplitter.hxx>
+
+//! Auxiliary class provides safe value for surfaces that looks like NURBS 
+//! but has no poles or other characteristics.
+class BRepMesh_UndefinedRangeSplitter : public BRepMesh_NURBSRangeSplitter
+{
+public:
+
+  //! Constructor.
+  BRepMesh_UndefinedRangeSplitter()
+  {
+  }
+
+  //! Destructor.
+  virtual ~BRepMesh_UndefinedRangeSplitter()
+  {
+  }
+
+protected:
+
+  //! Returns number of intervals computed using available geometrical parameters.
+  Standard_EXPORT virtual Standard_Integer getUndefinedIntervalNb(
+    const Handle(Adaptor3d_Surface)& theSurface,
+    const Standard_Boolean           isU,
+    const GeomAbs_Shape              theContinuity) const Standard_OVERRIDE;
+};
+
+#endif
index d1d2fa3511ff4a65780b840c390ed104793b517e..07fbe7e0dd66d004797d0134370b660c0d81ae3d 100755 (executable)
@@ -40,6 +40,8 @@ BRepMesh_EdgeDiscret.hxx
 BRepMesh_EdgeParameterProvider.hxx
 BRepMesh_EdgeTessellationExtractor.cxx
 BRepMesh_EdgeTessellationExtractor.hxx
+BRepMesh_ExtrusionRangeSplitter.cxx
+BRepMesh_ExtrusionRangeSplitter.hxx
 BRepMesh_FaceChecker.cxx
 BRepMesh_FaceChecker.hxx
 BRepMesh_FaceDiscret.cxx
@@ -80,6 +82,8 @@ BRepMesh_SphereRangeSplitter.hxx
 BRepMesh_TorusRangeSplitter.cxx
 BRepMesh_TorusRangeSplitter.hxx
 BRepMesh_Triangle.hxx
+BRepMesh_UndefinedRangeSplitter.cxx
+BRepMesh_UndefinedRangeSplitter.hxx
 BRepMesh_UVParamRangeSplitter.hxx
 BRepMesh_Vertex.hxx
 BRepMesh_VertexInspector.hxx
index ff82704d2c63dab27c55a6cf46bfcc40f1a40dab..9abdd7c07c55a55f104648f82fba24d321714009 100755 (executable)
@@ -12,5 +12,5 @@ tclean result
 incmesh result 0.1
 triangles result
 
-checktrinfo result -tri 638 -nod 564
+checktrinfo result -tri 736 -nod 613
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 2ceebe03c0c7a779480bff22141fc64f588483dd..06cfcf9687407cbeb78550aeab4bfc2d3e812ec1 100755 (executable)
@@ -13,6 +13,6 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-checktrinfo result -tri 200 -nod 215
+checktrinfo result -tri 202 -nod 216
 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index e80b533a8688ad919ca1ea1ba794f7b060f52307..70902ee48c02a59393a7e28d898024a4e617ee81 100755 (executable)
@@ -14,6 +14,6 @@ vdisplay result
 vsetdispmode result 1
 vfit
 
-checktrinfo result -tri 2722 -nod 2618
+checktrinfo result -tri 3496 -nod 3005
 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 0e844344e34a102dd1b994c088347ef422821697..a772296c974b4e3ece608b431e1204efa54be5c8 100755 (executable)
@@ -20,7 +20,7 @@ vsetdispmode result 1
 vdisplay result
 vfit
 
-checktrinfo result -tri 5812 -nod 5809
+checktrinfo result -tri 6014 -nod 5910
 
 checkmaxtol result -ref 0.92213088179312575
 checknbshapes result -shell 1
index 2c2e7bda24c8d9de590b34e30f0f744df9a4da8d..d90bc3406648590b9cdc06c97987baa335c2c005 100644 (file)
@@ -13,7 +13,7 @@ restore [locate_data_file OCC396_f2903.brep] result
 incmesh result 0.01
 triangles result 
 
-checktrinfo result -tri 57 -nod 59
+checktrinfo result -tri 75 -nod 68
 
 vinit
 vdisplay result
index 80336f81b3e47800e0f8e442ae4e9b622d681209..2905c180573e3d3b7dbedbce23404bb4f7afab7d 100644 (file)
@@ -11,7 +11,7 @@ renamevar a_1 result
 
 incmesh result 0.0001 -a 30 -force_face_def -parallel
 
-checktrinfo result -tri 12512 -nod 8519 -defl 0.00031502118964205414 -tol_abs_defl 1e-6
+checktrinfo result -tri 14494 -nod 9510 -defl 0.00031502118964205414 -tol_abs_defl 1e-6
 
 vinit
 vsetdispmode 1
index ce91dc3ea4e5aea117df8db78a28c3e45bf21d78..62877019238bab4171e426918902ef3a5f31748f 100644 (file)
@@ -14,7 +14,7 @@ vdisplay result
 vfit 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
 
-checktrinfo result -tri 3006 -nod 4360 -defl 3.0544822246414993 -tol_abs_defl 1e-6
+checktrinfo result -tri 3828 -nod 4771 -defl 3.0544822246414993 -tol_abs_defl 1e-6
 
 set log [tricheck result]
 if { [llength $log] != 0 } {
index dacd0d686cc492ff7999d96687afc00abc9c632b..1581ca660e0d81b5026a6d0a499e06c3b06cfecb 100644 (file)
@@ -7,7 +7,7 @@ restore [locate_data_file bug29149.brep] result
 tclean result
 incmesh result 0.1
 
-checktrinfo result -tri 7998 -nod 4931 -defl 1.9852316024615062 -tol_abs_defl 1e-6
+checktrinfo result -tri 8972 -nod 5418 -defl 1.4639409344792007 -tol_abs_defl 1e-6
 
 # Reduce shape tolerance in order to hard check of mesh quality
 settolerance result 1.0e-7
diff --git a/tests/bugs/mesh/bug29641 b/tests/bugs/mesh/bug29641
new file mode 100644 (file)
index 0000000..f6c75ad
--- /dev/null
@@ -0,0 +1,20 @@
+puts "========"
+puts "0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient"
+puts "========"
+puts ""
+
+restore [locate_data_file bug29641.brep] result
+tclean result
+
+vinit
+vdefaults -devCoeff 0.0001
+
+vsetdispmode 1
+vdisplay result
+vtop
+vrotate -0.1 0.1 1 0 0 0
+vfit
+
+checktrinfo result -tri 29040 -nod 15358
+
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 16804a4c3d0239ed307dfebb37e69a874d3d5c05..034531a702fd1af9f77c8b5e16031c5f45f93b05 100644 (file)
@@ -12,6 +12,6 @@ vdisplay result
 vviewparams -scale 8.46292 -proj 0.653203 -0.644806 0.396926 -up -0.0109833 0.51609 0.856464 -at 347.559 1026.89 219.262 -eye 2080.75 -684.022 1272.45
 
 tricheck result
-checktrinfo result -tri 6978 -nod 4890 -defl 8.4394056682382157 -tol_abs_defl 1e-6
+checktrinfo result -tri 6996 -nod 4899 -defl 8.4394056682382157 -tol_abs_defl 1e-6
 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 74edff3f44e61476de7ff06cf37fdbd588fa3ad2..70932914c24cd91596ceab3a7c272166c76b93cc 100644 (file)
@@ -12,6 +12,6 @@ vdisplay result
 vfit
 
 tricheck result
-checktrinfo result -tri 3424 -nod 1801 -max_defl 0.55846824898476011 -tol_abs_defl 1.0e-6
+checktrinfo result -tri 2954 -nod 1566 -max_defl 0.66166700094601016 -tol_abs_defl 1.0e-6
 
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 923d621ba884b27035fdab58ce396fa374d463f0..d1af096e3548c027d6d861a2354554e7db845948 100644 (file)
@@ -15,7 +15,7 @@ vdefaults -autoTriang 0
 
 tclean result
 incmesh result 0.004 -a 14
-checktrinfo result -tri 70556 -nod 39944 -defl 0.24607185555570676 -tol_abs_defl 1e-6
+checktrinfo result -tri 72522 -nod 40927 -defl 0.24607185555570676 -tol_abs_defl 1e-6
 
 vdisplay result -redisplay
 vfit
@@ -23,7 +23,7 @@ checkview -screenshot -3d -path ${imagedir}/${test_image}_default.png
 
 tclean result
 incmesh result 0.004 -a 14 -force_face_def
-checktrinfo result -tri 292556 -nod 150944 -defl 0.16388671063364907 -tol_abs_defl 1e-6
+checktrinfo result -tri 288022 -nod 148677 -defl 0.16388671063364907 -tol_abs_defl 1e-6
 
 vdisplay result -redisplay
 vfit
diff --git a/tests/bugs/mesh/bug32241 b/tests/bugs/mesh/bug32241
new file mode 100644 (file)
index 0000000..9eab9b1
--- /dev/null
@@ -0,0 +1,31 @@
+puts "========"
+puts "0032241: Mesh - wrong shading display of thrusections"
+puts "========"
+puts ""
+
+pload MODELING VISUALIZATION
+
+circle c0 0 0 0 0 0 1 30
+circle c1 0 0 0 0 0 1 30
+rotate c1 2000 0 0 0 1 0 15
+circle c2 0 0 0 0 0 1 30
+rotate c2 2000 0 0 0 1 0 30
+circle c3 0 0 0 0 0 1 30
+rotate c3 2000 0 0 0 1 0 45
+circle c4 0 0 0 0 0 1 30
+rotate c4 2000 0 0 0 1 0 60
+mkedge e0 c0
+mkedge e1 c1
+mkedge e2 c2
+mkedge e3 c3
+mkedge e4 c4
+wire w0 e0
+wire w1 e1
+wire w2 e2
+wire w3 e3
+wire w4 e4
+thrusections result issolid w0 w1 w2 w3 w4 
+
+checkview -display result -3d -path ${imagedir}/${test_image}.png
+
+checktrinfo result -tri 2744 -nod 1420
diff --git a/tests/bugs/mesh/bug32422 b/tests/bugs/mesh/bug32422
new file mode 100644 (file)
index 0000000..c665745
--- /dev/null
@@ -0,0 +1,32 @@
+puts "========"
+puts "0032422: Mesh - Weird rendering"
+puts "========"
+puts ""
+
+pload MODELING VISUALIZATION
+
+pbsplinecurve sp1 3 9 0 2 73.198335334976 1 109.22594821708 1 168.29694729401 1 244.58155163942 1 307.53411471698 1 344.2978168401 1 379.98768527731 1 399.75469301329 2 77.34874687409 77.303696496535 0 1 -37.404350826922 66.469283013615 0 1 -38.129049645989 51.427809605917 0 1 45.003598352348 23.760586819334 0 1 -76.009618710498 -14.499612221562 0 1 44.396611605217 -43.851734118626 0 1 119.71153838454 27.656796734959 0 1 38.244406969565 24.98300747794 0 1 68.787902964874 60.998473938995 0 1
+mkedge eg1 sp1
+wire wr1 eg1
+mkplane fc1 wr1
+prism result fc1 0 0 100
+checkshape result
+
+vinit
+vdisplay -dispMode 1 result
+vfit
+
+checktrinfo result -tri 1286 -nod 863
+
+explode result F
+tessellate r result_1 50 50
+
+vdisplay r -dispMode 1
+vaspects r -material STONE -color GREEN
+vlocation r -location 0 0 -100
+vleft
+vfit
+
+checktrinfo r -tri 5000 -nod 2601
+
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png
index 3377959ff77fc7c4a3f42edeac2cab6b4c7cbc09..8816be638af2cad2e8be2536c1bb73fc44c0aa8e 100755 (executable)
@@ -15,6 +15,6 @@ vclear
 isos result 0
 triangles result
 
-checktrinfo result -tri 10 -nod 12
+checktrinfo result -tri 14 -nod 14
 checkprops result -s 1.3135 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 2060e1a3d25b0f038a0d435e5356546f40d91b3f..dbb567ff419b8cf1ad5e07b595f34be81d9b4be9 100755 (executable)
@@ -19,6 +19,6 @@ vsetdispmode result 1
 isos result 0
 triangles result
 
-checktrinfo result -tri 10 -nod 12
+checktrinfo result -tri 14 -nod 14
 checkprops result -s 1.3135 
 checkview -display result -3d -path ${imagedir}/${test_image}.png
index 620f1470917eedb303d16b9ae3aafcc45627d9a8..dc4d9f4d19501620aad74dd98c27e17adb3f46e7 100755 (executable)
@@ -6,6 +6,14 @@ puts "========================"
 puts "The helical pipe is not shaded in AISViewer"
 #####
 
+if { [regexp {Windows} [dversion]] } {
+  set tri_n 19922
+  set nod_n 10395
+} else {
+  set tri_n 19882
+  set nod_n 10375
+}
+  
 restore [locate_data_file OCC358a.brep] f 
 checkshape f
 
@@ -19,7 +27,7 @@ vdisplay result
 vfit
 vsetdispmode result 1
 
-checktrinfo result -tri 21654 -nod 11261
+checktrinfo result -tri $tri_n -nod $nod_n
 checkprops result -s 24861.2 
 checkshape result
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 4474ff3231faed2df77d4852de40689fbde8663b..d7ade0deef95bb79d7e0b9112dc490cc281bc0e6 100755 (executable)
@@ -14,5 +14,5 @@ tclean result
 set Deflection 1.
 catch {incmesh result ${Deflection} }
 
-checktrinfo result -tri 52956 -nod 46525 -defl 1.2592398118022043 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
+checktrinfo result -tri 59881 -nod 49987 -defl 1.6213275001104823 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index e4f497619332e7d031f2d6bcde73869e0a1c12c6..e3d701b477fd92b03d6f6ed65b4f9380a72f7117 100755 (executable)
@@ -19,7 +19,7 @@ tclean result
 set Deflection 0.001
 incmesh result ${Deflection}
 
-checktrinfo result -tri 375392 -nod 190670 -defl 0.080199363667810539 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
+checktrinfo result -tri 326712 -nod 166330 -defl 0.080199363667810539 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
 
 vinit
 vdisplay result
index 559d0ddb6ff1295ca9ba18f6d5a7ee211e8f06a0..db0bba7e45749db8b918d427316f403308d6ae69 100755 (executable)
@@ -19,5 +19,5 @@ isos result 0
 triangles result
 fit
 
-checktrinfo result -tri 7863 -nod 6342
+checktrinfo result -tri 7769 -nod 6295
 checkview -screenshot -2d -path ${imagedir}/${test_image}_axo.png
index 07615815556601ebf728d06b141a2d48a575bc81..3cfd7b57edbc8d712f9a140c98064a2870fdc48a 100644 (file)
@@ -9,7 +9,7 @@ writestl m $imagedir/${casename}
 readstl res $imagedir/${casename}
 file delete $imagedir/${casename}
 
-checktrinfo res -tri 58 -nod 31
+checktrinfo res -tri 60 -nod 32
 
 # Visual check
 checkview -display res -2d -path ${imagedir}/${test_image}.png
index 80520051a38b6b3ece316862445025b0fb368500..706db284cd5712ae2a76e8b81789ae0875602553 100644 (file)
@@ -9,7 +9,7 @@ writestl m $imagedir/${casename}
 readstl res $imagedir/${casename}
 file delete $imagedir/${casename}
 
-checktrinfo res -tri 106 -nod 55
+checktrinfo res -tri 110 -nod 57
 
 # Visual check
 checkview -display res -2d -path ${imagedir}/${test_image}.png
index 3495b2dafc69c8e73d7d171a9e9a173b7562ce2a..69baa1a86d0b5cb569a841c12a6c9f2c7fe1d23d 100644 (file)
@@ -1,5 +1,5 @@
 set viewname "vright"
-set length 514.884
+set length 516.649
 
 testreadstep [locate_data_file bug27341_Adapter_Zylinder_2_CAD.stp] a
 COMPUTE_HLR $viewname $algotype
index 5fde7169f647d9329895c94dbceca2436190fe5b..7d32bbf75730144372757c97663dc77f1e6f0cb7 100644 (file)
@@ -1,7 +1,5 @@
-puts "TODO OCC30286 ALL: Error : The length of result shape is 5499.*, expected 5934.34"
-
 set viewname "vright"
-set length 5934.34
+set length 5502.06
 
 testreadstep [locate_data_file bug27341_Assembly_BILZ_WFL2_1_CAD.stp] a
 COMPUTE_HLR $viewname $algotype
index 08111c4f0895798adfd6cca923b9e6188fc2738e..526f80eca3e4f76177608a18475e3d0d08dc64cf 100644 (file)
@@ -1,5 +1,5 @@
 set viewname "vright"
-set length 5117.25
+set length 5102.18
 
 testreadstep [locate_data_file bug27341_Assembly_GMS_Kurz_CAD.stp] a
 COMPUTE_HLR $viewname $algotype
index aed240802e4a887f1e11af3a6c0b634891242de6..4c2ecbe5c2727832b9d289bfb1a29f1b0c70620e 100644 (file)
@@ -1,7 +1,5 @@
-puts "TODO OCC30286 ALL: Error : The length of result shape is 1664.\\d+, expected 1664.48"
-
 set viewname "vright"
-set length 1664.48
+set length 1662.85
 
 testreadstep [locate_data_file bug27341_CCS_Adapter_CAD.stp] a
 COMPUTE_HLR $viewname $algotype
index 028db8b5d39a31c6e8cddce2498f75fd5841e1df..bca493e4e6fe8387b115a551f2ca641f429e46a1 100644 (file)
@@ -1,5 +1,5 @@
 set viewname "vright"
-set length 2234.38
+set length 2239.23
 
 testreadstep [locate_data_file bug27341_CCT_PMK_32_L_o_CAD.stp] a
 COMPUTE_HLR $viewname $algotype
index 9c0397e884f7ab99d7dad8baddd5cc3c78822422..6efe35f15c7d75075893a85057f71eb95cbdcd3f 100644 (file)
@@ -1,5 +1,5 @@
 set viewname "vright"
-set length 3060.33
+set length 3059.05
 
 testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a
 COMPUTE_HLR $viewname $algotype
index 74ed18c56378cd34f4bac5230425706a8ae1bbef..471a9cd4eff8f60efa625920009dd4df29df476d 100644 (file)
@@ -1,5 +1,5 @@
 set viewname "vright"
-set length 2257
+set length 2261.22
 
 testreadstep [locate_data_file bug27341_AIF_Grundhalter_GR1_CAD.stp] a
 COMPUTE_HLR $viewname $algotype
index 9484d873818d17b1e49e280c579539c94ebbb1e5..49d3709ec7bfbd7591ef5076df9e442e6ba41374 100644 (file)
@@ -6,7 +6,7 @@ puts ""
 puts "REQUIRED All: Meshing statuses: SelfIntersectingWire Failure"
 
 set viewname "vfront"
-set length 28388
+set length 26881.1
 
 restore [locate_data_file bug23625_a1.brep] a
 
index 10b31c6352a95544e7ccba7ceca1648f4b85afca..af647e97e0015dd5d4aa946f98daadedf1daa922 100644 (file)
@@ -4,7 +4,7 @@ puts "============"
 puts ""
 
 set viewname "vfront"
-set length 29113.3
+set length 27461.9
 
 restore [locate_data_file bug23625_a2.brep] a
 COMPUTE_HLR $viewname $algotype
index 264015f5c83580f9283a4dbb44a8d61824731e43..904e40f26132b796d8becb114ad5a489ed4410a0 100644 (file)
@@ -4,7 +4,7 @@ puts "============"
 puts ""
 
 set viewname "vtop"
-set length 19604.4
+set length 19259.1
 
 restore [locate_data_file bug23625_a3.brep] a
 COMPUTE_HLR $viewname $algotype
index 6c3dd212bce6387d4ce8be590e0db9bee3caed8b..05492298d2400e9dfe1c91ec0fa1143d624d733a 100644 (file)
@@ -4,7 +4,7 @@ puts "====================================="
 puts ""
 
 set viewname "vtop"
-set length 5.7955
+set length 5.79554
 
 restore [locate_data_file bug27719_Extruded.brep] a
 COMPUTE_HLR $viewname $algotype
index 1487c3285f6ae42ce3d84f3727488e4ace3c9621..03581f927483be35a6f0c3b2bbd6cf3f9eb92080 100644 (file)
@@ -4,7 +4,7 @@ puts "====================================="
 puts ""
 
 set viewname "vbottom"
-set length 6.14978
+set length 6.14989
 
 restore [locate_data_file bug27719_Extruded.brep] a
 COMPUTE_HLR $viewname $algotype
index 20d2811270e69d4f6cfac31f7d3138bbe1cbf6ed..23f60bcc586dcc7244ec70520860de5901a0efff 100644 (file)
@@ -4,7 +4,7 @@ puts "====================================="
 puts ""
 
 set viewname "vfront"
-set length 7.4551
+set length 7.45513
 
 restore [locate_data_file bug27719_Extruded.brep] a
 COMPUTE_HLR $viewname $algotype
index ffdd518e825de618ece19c24d9da7e12aae7ac93..81fe405518af0ba633f22d40fef6dfc0e60b4a09 100644 (file)
@@ -4,7 +4,7 @@ puts "====================================="
 puts ""
 
 set viewname "vback"
-set length 7.48367
+set length 7.48374
 
 restore [locate_data_file bug27719_Extruded.brep] a
 COMPUTE_HLR $viewname $algotype
index 62f5350c5db2649091fb0ecd2040f37b9c340c6a..87bf1b5e3cd30befa5200b665396043b1c52d439 100755 (executable)
@@ -2,5 +2,5 @@ set TheFileName OCC357.brep
 if { [string compare $command "shading"] == 0 } {
   #set bug_area "OCC22687"
   set max_rel_tol_diff 0.25
-  set rel_tol 1.7957583466671934
+  set rel_tol 1.299910771524823
 }
index ac3c9608532e6a5ff8755ac0f944b9d307523279..6973536383d66ceae293654b59d9716a45f98fe0 100755 (executable)
@@ -1,5 +1,5 @@
 set TheFileName shading_101.brep
 if { [string compare $command "shading"] != 0 } {
    set max_rel_tol_diff 0.1
-   set rel_tol 1.2162834127672983
+   set rel_tol 0.3408446823303861
 }
index 76e189fee312f7809f65062cf656013aa5abc4c9..bbf534ac91f2e472ea969aef8ff04e16cad92f85 100755 (executable)
@@ -3,7 +3,7 @@ set max_rel_tol_diff 1
 if { [string compare $command "shading"] == 0 } {
   set rel_tol 0.241
 } else {
-  set rel_tol 6.376860334255998
+  set rel_tol 3.2394842919345677
 }
 #set bug_freenodes "M8"
 #set nbfreenodes(All) 1
index e8a44d2e653c911ee099a8b506d1eb3129f7da31..ad0d84206518bf0c63eaa3cfed29791794597cd7 100755 (executable)
@@ -1,5 +1,5 @@
 set TheFileName shading_147.brep
 if { [string compare $command "shading"] == 0 } {
-  set rel_tol 0.8791879462861206
+  set rel_tol 0.8369721827353692
   set max_rel_tol_diff 0.001
 }
index f5c48950beeee4ef4bcba3a9e2f7e830aa697850..9f1f17bc81cf5c639487f91a3a8568433b48042c 100755 (executable)
@@ -1,9 +1,9 @@
 set TheFileName shading_wrongshape_004.brep
 ###set bug_area "OCC22687"
 if { [string compare $command "shading"] == 0 } {
-  set rel_tol 0.06073194250400039
+  set rel_tol 0.07204699336483454
 } else {
-  set rel_tol 0.003702162749171707
+  set rel_tol 0.008767384551980804
 }
 set max_rel_tol_diff 0.001
 ###set bug_withouttri "OCC22687"
index 44e267dd7e8c8396ff74f4209b478c7636853b9f..c74273990ce657592de20f047e57770d9c89f798 100755 (executable)
@@ -1,6 +1,6 @@
 set TheFileName shading_wrongshape_026.brep
 if { [string compare $command "shading"] == 0 } {
-  set rel_tol 0.06893312870606805
+  set rel_tol 0.08526389274308782
 } else {
   set rel_tol 0.0020125629706199506
 }
index e6df883e0afa2c934c34a188fbc5b58a7d22b37c..d7130aea93233e9f552c60e5660b4aa27c6d71c3 100755 (executable)
@@ -7,5 +7,5 @@ if { [string compare $command "shading"] != 0 } {
   set rel_tol 0.19838215623500813
 } else {
   set max_rel_tol_diff 0.01
-  set rel_tol 0.12561722204279838
+  set rel_tol 0.18116134043436827
 }
index 2c66fdf8824304c4ce4b5dbb8768300b807a5df1..cca36dd09f316f23200832cfff47fc725f7b7853 100755 (executable)
@@ -6,8 +6,8 @@ set TheFileName shading_wrongshape_030.brep
 set bug_cross "OCC22687"
 set nbcross(All) 4
 if { [string compare $command "shading"] == 0 } {
-  set rel_tol 0.5456843734442471
+  set rel_tol 0.5225697108844659
 } else {
-  set rel_tol 0.1783852555846471
+  set rel_tol 0.1856053577754922
 }
 set max_rel_tol_diff 0.001
index 6adc45da7c5ede06e47463b403f7c2b8361afbbc..8eda1a2b860b2c7daff7447a63fce1157ff3eda3 100644 (file)
@@ -16,4 +16,4 @@ dchrono h
 vfit
 checkview -screenshot -3d -path ${imagedir}/${test_image}.png
 
-checktrinfo a -tri 14764 -nod 7587 -defl 0.29573935005082458 -tol_abs_defl 1e-6
+checktrinfo a -tri 15564 -nod 7987 -defl 0.25696012112765304 -tol_abs_defl 1e-6
index 0486edd2bcab275a12fab8d6c47b31d3683a0bf2..729d25add8d8199ff6b9af3b815caf108ff66754 100644 (file)
@@ -14,5 +14,5 @@ isos result 0
 triangles result
 vfit
 
-checktrinfo result -tri 8048 -nod 8247
+checktrinfo result -tri 8130 -nod 8288
 vdump $imagedir/${casename}.png