]> OCCT Git - occt-copy.git/commitdiff
0027341: Incorrect exact HLR results
authoraml <aml@opencascade.com>
Wed, 25 May 2016 09:19:24 +0000 (12:19 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 27 May 2016 08:57:50 +0000 (11:57 +0300)
- removal of excess interferences in case of simple hiding face
- correct processing of boundary edges coinciding with outlines
- change of API for testing Draw Command
- correction of Draw command "build3d"
- test cases are added.

Linux reference data is changed.

Partially fixed 0027340: Insufficient exact HLR speed

Number of samples in PolyPoly intersection algorithm tuned in each instance of generic class.
Default number of the samples in Geom2dAdaptor is changed according to the Adaptor2d_Curve2d class.
Minimal number of points in case of B-Spline is changed.
Minimal number of samples support is added in intersection algorithms.

61 files changed:
src/BRepTest/BRepTest_CurveCommands.cxx
src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx
src/Geom2dInt/Geom2dInt_GInter.hxx
src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx
src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx
src/HLRAppli/HLRAppli_ReflectLines.cxx
src/HLRAppli/HLRAppli_ReflectLines.hxx
src/HLRBRep/HLRBRep_CInter.hxx
src/HLRBRep/HLRBRep_Data.cxx
src/HLRBRep/HLRBRep_Hider.cxx
src/HLRBRep/HLRBRep_Intersector.cxx
src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx
src/HLRTest/HLRTest.cxx
src/IntCurve/IntCurve_IntCurveCurveGen.gxx
src/IntCurve/IntCurve_IntPolyPolyGen.gxx
src/QABugs/QABugs_20.cxx
tests/bugs/modalg_5/bug25838
tests/bugs/modalg_6/bug27341_101 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_102 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_103 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_104 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_105 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_106 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_107 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_201 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_202 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_203 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_204 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_205 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_206 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_207 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_301 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_302 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_303 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_304 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_305 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_306 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_307 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_308 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_309 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_310 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_311 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_312 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_313 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_314 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_315 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_316 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_317 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_318 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_319 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_320 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_321 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_322 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_323 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_324 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_325 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_326 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_327 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_328 [new file with mode: 0644]
tests/bugs/modalg_6/bug27341_329 [new file with mode: 0644]
tests/de/iges_1/R8

index 05834ea03d0ae7dae85e4edbf0971d7e9a7cec39..b12838855596ffe66cdeae0059d17086db3c5b46 100644 (file)
@@ -1792,7 +1792,7 @@ Standard_Integer  build3d(Draw_Interpretor& di,
   }
 
   Standard_Boolean Ok;
-  TopoDS_Shape S = DBRep::Get(a[1],TopAbs_FACE);
+  TopoDS_Shape S = DBRep::Get(a[1]);
   if (S.IsNull()) return 1;
 
   if (n==2) { Ok = BRepLib::BuildCurves3d(S); }
index 3b6c9451736f44f06264bba655406c4af0e3e5e4..047faa2b2b159e2e6d6ad58989cc84fb4f8b05f7 100644 (file)
@@ -991,7 +991,7 @@ Handle(Geom2d_BSplineCurve) Geom2dAdaptor_Curve::BSpline() const
 static Standard_Integer nbPoints(const Handle(Geom2d_Curve)& theCurve) 
 {
  
-  Standard_Integer nbs = 10;
+  Standard_Integer nbs = 20;
   
   if(theCurve->IsKind(STANDARD_TYPE( Geom2d_Line)) )
     nbs = 2;
index 8b3892a3dcaac568cdbbecb193dd96c834b844f3..5d0babdc036d36cb19fa97049156c0e7d1f3087b 100644 (file)
@@ -95,7 +95,9 @@ public:
   //! Create a domain from a curve
   Standard_EXPORT IntRes2d_Domain ComputeDomain (const Adaptor2d_Curve2d& C1, const Standard_Real TolDomain) const;
 
-
+  //! Set / get minimum number of points in polygon intersection.
+  Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
+  Standard_EXPORT Standard_Integer GetMinNbSamples () const;
 
 
 protected:
index 970c5c315245861b33abae66d46167194625fa30..cdeca87d103eef39064e4126ef7d145909b455fa 100644 (file)
 
 //============================================================
 Standard_Integer Geom2dInt_Geom2dCurveTool::NbSamples (const Adaptor2d_Curve2d& C,
-  const Standard_Real U0,
-  const Standard_Real U1) 
+                                                       const Standard_Real U0,
+                                                       const Standard_Real U1)
 {
   GeomAbs_CurveType typC = C.GetType();
   Standard_Integer nbs = C.NbSamples();
 
-  if(typC == GeomAbs_BSplineCurve) { 
-    Standard_Real t=C.LastParameter()-C.FirstParameter();
-    Standard_Real t1=U1-U0;
-    if(t1<0.0) t1=-t1;
+  if(typC == GeomAbs_BSplineCurve)
+  {
+    Standard_Real t = C.LastParameter() - C.FirstParameter();
+    Standard_Real t1 = U1 - U0;
+    if(t1 < 0.0) t1 = -t1;
     nbs = C.NbKnots();
     nbs*= C.Degree();
-    Standard_Real anb = t1/t * nbs;
+    Standard_Real anb = t1 / t * nbs;
     nbs = (Standard_Integer)anb;
-    if(nbs < 4) nbs=4;
+
+    Standard_Integer aMinPntNb = Max(C.Degree() + 1, 4);
+    if(nbs < aMinPntNb)
+      nbs = aMinPntNb;
   }
   else if (typC == GeomAbs_Circle)
   {
index 261684cc153bec5b990d3cb6865fd3c96c32703a..7f587e858e50fdabcba8f97792527f64b9590af1 100644 (file)
@@ -42,14 +42,15 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
   Standard_EXPORT Geom2dInt_TheIntPCurvePCurveOfGInter();
-  
+
   Standard_EXPORT void Perform (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Adaptor2d_Curve2d& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol);
   
   Standard_EXPORT void Perform (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Standard_Real TolConf, const Standard_Real Tol);
 
-
+  //! Set / get minimum number of points in polygon for intersection.
+  Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
+  Standard_EXPORT Standard_Integer GetMinNbSamples () const;
 
 
 protected:
@@ -59,9 +60,6 @@ protected:
   
   Standard_EXPORT void Perform (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV);
 
-
-
-
 private:
 
   
@@ -72,10 +70,11 @@ private:
   //! : during prelimanary search for line (case of bad paramerization of Bspline for example).
   Standard_EXPORT Standard_Boolean findIntersect (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Adaptor2d_Curve2d& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly1, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly2, const Standard_Boolean isFullRepresentation);
 
-
   IntRes2d_Domain DomainOnCurve1;
   IntRes2d_Domain DomainOnCurve2;
 
+  //! Minimal number of sample points
+  Standard_Integer myMinPntNb;
 
 };
 
index 9f1a0e95b28f528142065c5b369e0372193a8369..9a6fe77211581622e299696c632074ae16cbb039 100644 (file)
@@ -91,11 +91,12 @@ void HLRAppli_ReflectLines::Perform()
 //=======================================================================
 
 TopoDS_Shape HLRAppli_ReflectLines::GetCompoundOf3dEdges(const HLRBRep_TypeOfResultingEdge type,
-                                                         const Standard_Boolean            visible)
+                                                         const Standard_Boolean            visible,
+                                                         const Standard_Boolean            In3d)
 {
   HLRBRep_HLRToShape aHLRToShape( myHLRAlgo );
 
-  TopoDS_Shape theCompound = aHLRToShape.CompoundOfEdges(type, visible, Standard_True);
+  TopoDS_Shape theCompound = aHLRToShape.CompoundOfEdges(type, visible, In3d);
 
   BRepLib::SameParameter(theCompound,Precision::PConfusion(),Standard_False);
 
@@ -109,5 +110,5 @@ TopoDS_Shape HLRAppli_ReflectLines::GetCompoundOf3dEdges(const HLRBRep_TypeOfRes
 
 TopoDS_Shape HLRAppli_ReflectLines::GetResult()
 {
-  return GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True);
+  return GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True, Standard_True);
 }
index bedbcc7898b9fda85b3d2c9a39d3408b9e98149a..2ad5326913b53cdb9915ff9f2cb65ee34c53c937 100644 (file)
@@ -55,9 +55,10 @@ public:
 
   //! returns resulting compound of lines
   //! of specified type and visibility
-  //! represented by edges in 3d
+  //! represented by edges in 3d or 2d
   Standard_EXPORT TopoDS_Shape GetCompoundOf3dEdges(const HLRBRep_TypeOfResultingEdge type,
-                                                    const Standard_Boolean            visible);
+                                                    const Standard_Boolean            visible,
+                                                    const Standard_Boolean            In3d);
 
 
 
index ace29d5a4c5053fadc88ab460a71e29b69dfd884..77003b6d3d50a828d644751c5b1b80a4ad638b0f 100644 (file)
@@ -95,7 +95,9 @@ public:
   //! Create a domain from a curve
   Standard_EXPORT IntRes2d_Domain ComputeDomain (const Standard_Address& C1, const Standard_Real TolDomain) const;
 
-
+  //! Set / get minimum number of points in polygon intersection.
+  Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
+  Standard_EXPORT Standard_Integer GetMinNbSamples () const;
 
 
 protected:
index a895b812aec0726ef97754fa6ef6d08f9c7548ba..4f6ac729c217510a26b5e9943f71496cce5caa0b 100644 (file)
@@ -1223,7 +1223,7 @@ void HLRBRep_Data::NextInterference ()
     if (myFEOri == TopAbs_FORWARD ||
        myFEOri == TopAbs_REVERSED) {
       // Edge from the boundary
-      if (!((HLRBRep_EdgeData*)myFEData)->Vertical() && !myFEDouble) {
+      if (!((HLRBRep_EdgeData*)myFEData)->Vertical() && !(myFEDouble && !myFEOutLine)) {
        // not a vertical edge and not a double Edge
        Standard_Address MinMaxFEdg = ((HLRBRep_EdgeData*)myFEData)->MinMax();
        //-- -----------------------------------------------------------------------
index b0d99381f5a51f7005a2bf04caa846a3defd27bc..86b75137877f9a0956600e3ba9318165999468b1 100644 (file)
@@ -28,6 +28,7 @@
 #include <HLRBRep_EdgeInterferenceTool.hxx>
 #include <HLRBRep_Hider.hxx>
 #include <HLRBRep_VertexList.hxx>
+#include <TColStd_SequenceOfReal.hxx>
 #include <Standard_ErrorHandler.hxx>
 
 //=======================================================================
@@ -350,8 +351,56 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
          Standard_Integer level = 0;
          if (!myDS->SimpleHidingFace())                    // Level at Start
            level = myDS->HidingStartLevel(E,ed,ILHidden);  // **************
-                 HLRAlgo_ListIteratorOfInterferenceList It(ILHidden); 
-         
+
+          HLRAlgo_ListIteratorOfInterferenceList It(ILHidden);
+          if (myDS->SimpleHidingFace()) //remove excess interferences
+          {
+            TColStd_SequenceOfReal ToRemove;
+            TopAbs_Orientation PrevTrans = TopAbs_EXTERNAL;
+            Standard_Real PrevParam = 0.;
+            for (; It.More(); It.Next())
+            {
+              const HLRAlgo_Interference& Int = It.Value();
+              TopAbs_Orientation aTrans = Int.Transition();
+              if (aTrans == PrevTrans)
+              {
+                if (aTrans == TopAbs_FORWARD)
+                {
+                  ToRemove.Append(Int.Intersection().Parameter());
+#ifdef OCCT_DEBUG
+                  cout<<"Two adjacent interferences with transition FORWARD"<<endl;
+#endif
+                }
+                else if (aTrans == TopAbs_REVERSED)
+                {
+                  ToRemove.Append(PrevParam);
+#ifdef OCCT_DEBUG
+                  cout<<"Two adjacent interferences with transition REVERSED"<<endl;
+#endif
+                }
+              }
+              PrevTrans = aTrans;
+              PrevParam = Int.Intersection().Parameter();
+            }
+            It.Initialize(ILHidden);
+            while (It.More())
+            {
+              Standard_Real aParam = It.Value().Intersection().Parameter();
+              Standard_Boolean found = Standard_False;
+              for (Standard_Integer i = 1; i <= ToRemove.Length(); i++)
+                if (aParam == ToRemove(i))
+                {
+                  found = Standard_True;
+                  ILHidden.Remove(It);
+                  ToRemove.Remove(i);
+                  break;
+                }
+              if (!found)
+                It.Next();
+            }
+          } //remove excess interferences
+          
+          It.Initialize(ILHidden);
          while(It.More()) {           // suppress multi-inside Intersections
                                       // ***********************************
          
@@ -361,16 +410,20 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
            case TopAbs_FORWARD  :
              {
                Standard_Integer decal = Int.Intersection().Level();
-               if (level > 0) ILHidden.Remove(It);
-               else           It.Next();
+               if (level > 0)
+                  ILHidden.Remove(It);
+               else
+                  It.Next();
                level = level + decal;
              }
              break;
            case TopAbs_REVERSED : 
              { 
                level = level - Int.Intersection().Level();
-               if (level > 0) ILHidden.Remove(It);
-               else           It.Next();
+               if (level > 0)
+                  ILHidden.Remove(It);
+               else
+                  It.Next();
              }
              break;
            case TopAbs_EXTERNAL :
index c1ce1a71478fa98a6e32acbf5a28dd58672807db..bc18c7e78895d8d6ab3957fc3ff38cbe779cca47 100644 (file)
@@ -84,6 +84,10 @@ myPolyhedron(NULL)
   =NbInters=NbIntersVides=NbInters1Segment=NbInters1Point=NbIntersNPoints
   = NbIntersNSegments=NbIntersPointEtSegment=NbIntersCSVides=0;
 #endif
+
+  // Set minimal number of samples in case of HLR polygonal intersector.
+  const Standard_Integer aMinNbHLRSamples = 4;
+  myIntersector.SetMinNbSamples(aMinNbHLRSamples);
 }
 
 //=======================================================================
index 89af5bd1a921831cbaf24ac73958773c86ff6466..bf7df7bb7b60af44edd585131af909976494b9ea 100644 (file)
@@ -49,8 +49,9 @@ public:
   
   Standard_EXPORT void Perform (const Standard_Address& Curve1, const IntRes2d_Domain& Domain1, const Standard_Real TolConf, const Standard_Real Tol);
 
-
-
+  //! Set / get minimum number of points in polygon for intersection.
+  Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
+  Standard_EXPORT Standard_Integer GetMinNbSamples () const;
 
 protected:
 
@@ -76,7 +77,8 @@ private:
   IntRes2d_Domain DomainOnCurve1;
   IntRes2d_Domain DomainOnCurve2;
 
-
+  //! Minimal number of sample points
+  Standard_Integer myMinPntNb;
 };
 
 
index 84c492a9d1487da77330bc6747b6ce77add42566..891dc058678905fe4e1edf87314408114493ff19 100644 (file)
@@ -486,11 +486,11 @@ static Standard_Integer hlrin3d(Draw_Interpretor& , Standard_Integer n, const ch
   BRep_Builder BB;
   BB.MakeCompound(Result);
   
-  TopoDS_Shape SharpEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Sharp, Standard_True);
+  TopoDS_Shape SharpEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Sharp, Standard_True, Standard_True);
   BB.Add(Result, SharpEdges);
-  TopoDS_Shape OutLines = Reflector.GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True);
+  TopoDS_Shape OutLines = Reflector.GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True, Standard_True);
   BB.Add(Result, OutLines);
-  TopoDS_Shape SmoothEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Rg1Line, Standard_True);
+  TopoDS_Shape SmoothEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Rg1Line, Standard_True, Standard_True);
   BB.Add(Result, SmoothEdges);
   
   DBRep::Set(a[1], Result);
index 6a3d98eabf5b219b9744e88aefcc8b388d20feca..bc00859aad67cfabe4439f5b4894a2ca7d472498 100644 (file)
@@ -1116,57 +1116,20 @@ IntCurve_IntCurveCurveGen::InternalCompositePerform(const TheCurve& C1,
   }
 }
 
-       
-       
-       
-       
-
-
-
-       
-       
-       
-
+//=======================================================================
+//function : SetMinNbSamples
+//purpose  : 
+//=======================================================================
+void IntCurve_IntCurveCurveGen::SetMinNbSamples(const Standard_Integer theMinNbSamples)
+{
+  intcurvcurv.SetMinNbSamples(theMinNbSamples);
+}
 
-//----------------------------------------------------------------------
-//--   InterComposite ( C1 , Num1 , C2 , Num2 , Recursion_sur_C2 )
-//--    
-//--       Boolean Arret = False
-//--
-//--       Si C2.Type() == Composite   Max2 = C2.GetIntervals() Sinon Max2=2
-//-- 
-//--       Si C1.Type() == Composite   Max1 = C1.GetIntervals() Sinon Max1=2
-//--
-//--       Si Num2 > Max2  RETURN; 
-//--
-//--       Sinon
-//--
-//--          Si Recursion_sur_C2 == True 
-//--
-//--               for i = Num1  -->  Max1
-//--
-//--                   Num1 = i
-//--
-//--                   InterComposite(C2,Num2,C1,Num1,False);
-//-- 
-//--               Si Num2 < Max2
-//--
-//--                    Num2++ 
-//--
-//--                    Num1 = 1 
-//--
-//--                    InterComposite(C1,Num1,C2,Num2,True);
-//--
-//--          Sinon
-//--
-//--               *** INTERSECTION ENTRE C2[num2] et C1[Num1] ***
-//--
-//--      Fin
-//--
-//--
-//-- (( Appel avec C1 , 1 , C2 , 1 , True))
-//--
-//--  Exemple :     C1 = ABCD   C2= 12
-//-- 
-//--             donne :      A,1  B,1  C,1  D,1   A,2  B,2  C,2  D,2  
-//----------------------------------------------------------------------
+//=======================================================================
+//function : GetMinNbSamples
+//purpose  : 
+//=======================================================================
+Standard_Integer IntCurve_IntCurveCurveGen::GetMinNbSamples() const
+{
+  return intcurvcurv.GetMinNbSamples();
+}
index 31308b24631c0522ea8d473ae3032c60f1bac16f..aa868050c43777300be599e1bb304450cf4d47e0 100644 (file)
 
 //======================================================================
 
-//  Modified by skv - Tue Mar  1 14:22:09 2005 OCC8169 Begin
-// #define NBITER_MAX_POLYGON 3
 #define NBITER_MAX_POLYGON 10
-//  Modified by skv - Tue Mar  1 14:22:09 2005 OCC8169 End
 #define TOL_CONF_MINI   0.0000000001
 #define TOL_MINI        0.0000000001
 
@@ -84,7 +81,10 @@ Standard_Boolean HeadOrEndPoint( const IntRes2d_Domain& D1
 
 
 //======================================================================
-IntCurve_IntPolyPolyGen::IntCurve_IntPolyPolyGen(void) {
+IntCurve_IntPolyPolyGen::IntCurve_IntPolyPolyGen()
+{
+  const Standard_Integer aMinPntNb = 20; // Minimum number of samples.
+  myMinPntNb = aMinPntNb;
   done = Standard_False;
 }
 //======================================================================
@@ -631,50 +631,43 @@ Standard_Boolean HeadOrEndPoint( const IntRes2d_Domain& D1
     return(Standard_False);
 }
 
-
-//======================================================================
-void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
-                                     ,const IntRes2d_Domain& D1
-                                     ,const TheCurve& C2
-                                     ,const IntRes2d_Domain& D2
-                                     ,const Standard_Real TolConf
-                                     ,const Standard_Real Tol
-                                     ,const Standard_Integer NbIter
-                                     ,const Standard_Real DeltaU
-                                     ,const Standard_Real DeltaV) {
-
+//=======================================================================
+//function : Perform
+//purpose  : Base method to perform polyline / polyline intersection for
+//           pair of curves.
+//=======================================================================
+void IntCurve_IntPolyPolyGen::Perform(const TheCurve& C1,
+                                      const IntRes2d_Domain& D1,
+                                      const TheCurve& C2,
+                                      const IntRes2d_Domain& D2,
+                                      const Standard_Real TolConf,
+                                      const Standard_Real Tol,
+                                      const Standard_Integer NbIter,
+                                      const Standard_Real DeltaU,
+                                      const Standard_Real DeltaV)
+{
   Standard_Integer nbsamplesOnC1,nbsamplesOnC2;
   done = Standard_False;
 
   if(NbIter>NBITER_MAX_POLYGON) return;
 
-  nbsamplesOnC1 = TheCurveTool::NbSamples(C1,D1.FirstParameter(),D1.LastParameter());      
-
-  if (NbIter == 0) // first time
-  {
-    if (nbsamplesOnC1 < 20)
-      nbsamplesOnC1 = 20;
-  }
-  else // NbIter > 0
-  {
-    nbsamplesOnC1=(5*(nbsamplesOnC1*NbIter))/4;
-  }
-  /////////////////////////////////////////////
-
+  // Number of samples tunning.
+  nbsamplesOnC1 = TheCurveTool::NbSamples(C1,D1.FirstParameter(),D1.LastParameter());
   nbsamplesOnC2 = TheCurveTool::NbSamples(C2,D2.FirstParameter(),D2.LastParameter());
-  
-  if (NbIter == 0) // first time
+
+  if (NbIter == 0)
   {
-    if (nbsamplesOnC2 < 20)
-      nbsamplesOnC2 = 20;
+    // Minimal number of points.
+    nbsamplesOnC1 = Max(nbsamplesOnC1, myMinPntNb);
+    nbsamplesOnC2 = Max(nbsamplesOnC2, myMinPntNb);
   }
-  else // NbIter > 0
+  else
   {
-    nbsamplesOnC2=(5*(nbsamplesOnC2*NbIter))/4;
+    // Increase number of samples in second and next iterations.
+    nbsamplesOnC1=(5 * (nbsamplesOnC1 * NbIter)) / 4;
+    nbsamplesOnC2=(5 * (nbsamplesOnC2 * NbIter)) / 4;
   }
-  /////////////////////////////////////////////
 
-  
   NCollection_Handle<IntCurve_ThePolygon2d>
     aPoly1 = new IntCurve_ThePolygon2d(C1,nbsamplesOnC1,D1,Tol),
     aPoly2 = new IntCurve_ThePolygon2d(C2,nbsamplesOnC2,D2,Tol);
@@ -1184,3 +1177,21 @@ void GetIntersection(const TheCurve& theC1, const Standard_Real theT1f, const St
   }
 
 }
+
+//=======================================================================
+//function : GetMinNbPoints
+//purpose  : 
+//=======================================================================
+Standard_Integer IntCurve_IntPolyPolyGen::GetMinNbSamples() const
+{
+  return myMinPntNb;
+}
+
+//=======================================================================
+//function : SetMinNbPoints
+//purpose  : 
+//=======================================================================
+void IntCurve_IntPolyPolyGen::SetMinNbSamples(const Standard_Integer theMinNbSamples)
+{
+  myMinPntNb = theMinNbSamples;
+}
index 15e795787b564d327d6d105c0f688d17a46d3f49..438046cd809c7694eb3f522b9f8b23268da311cc 100644 (file)
@@ -54,6 +54,9 @@
 #include <XCAFDoc_DocumentTool.hxx>
 #include <XCAFDoc_GeomTolerance.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
+
+#include <HLRAppli_ReflectLines.hxx>
+
 //=======================================================================
 //function : SurfaceGenOCC26675_1 
 //purpose  : Generates a surface for intersect (in corresponding
@@ -1573,6 +1576,90 @@ static Standard_Integer OCC26930(Draw_Interpretor& theDI,
   return 0;
 }
 
+//=======================================================================
+//function : OCC27341
+//purpose : check exact HLR algorighm's work
+//=======================================================================
+static Standard_Integer OCC27341 (Draw_Interpretor& , Standard_Integer n, const char** a)
+{
+  if (n != 4)
+  {
+    cout << "Use: OCC27341 res shape axo/top/bottom/front/back/left/right" << endl;
+    return 1;
+  }
+
+  TopoDS_Shape aShape =  DBRep::Get(a[2]);
+  if (aShape.IsNull())
+    return 1;
+
+  gp_Pnt anOrigin(0.,0.,0.);
+  gp_Dir aNormal(0.57735026918962573, -0.57735026918962573, 0.57735026918962573);
+  gp_Ax2 anAxes(anOrigin, aNormal);
+  gp_Dir aDX = anAxes.XDirection();
+  
+  HLRAppli_ReflectLines Reflector(aShape);
+
+  if (strcmp(a[3],"axo") == 0)
+  {
+    aNormal.SetCoord(0.57735026918962573, -0.57735026918962573, 0.57735026918962573);
+    aDX.SetCoord(-0.40824829046386307, 0.40824829046386307, 0.81649658092772615);
+  }
+  else if (strcmp(a[3],"top") == 0)
+  {
+    aNormal.SetCoord(0,0,1);
+    aDX.SetCoord(0,1,0);
+  }
+  else if (strcmp(a[3],"bottom") == 0)
+  {
+    aNormal.SetCoord(0,0,-1);
+    aDX.SetCoord(0,-1,0);
+  }
+  else if (strcmp(a[3],"front") == 0)
+  {
+    aNormal.SetCoord(0,-1,0);
+    aDX.SetCoord(0,0,1);
+  }
+  else if (strcmp(a[3],"back") == 0)
+  {
+    aNormal.SetCoord(0,1,0);
+    aDX.SetCoord(0,0,1);
+  }
+  else if (strcmp(a[3],"left") == 0)
+  {
+    aNormal.SetCoord(-1,0,0);
+    aDX.SetCoord(0,0,1);
+  }
+  else if (strcmp(a[3],"right") == 0)
+  {
+    aNormal.SetCoord(1,0,0);
+    aDX.SetCoord(0,0,1);
+  }
+    
+  Reflector.SetAxes(aNormal.X(), aNormal.Y(), aNormal.Z(),
+                    anOrigin.X(), anOrigin.Y(), anOrigin.Z(),
+                    aDX.X(), aDX.Y(), aDX.Z());
+
+  Reflector.Perform();
+
+  TopoDS_Compound Result;
+  BRep_Builder BB;
+  BB.MakeCompound(Result);
+  
+  TopoDS_Shape SharpEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Sharp, Standard_True, Standard_False);
+  if (!SharpEdges.IsNull())
+    BB.Add(Result, SharpEdges);
+  TopoDS_Shape OutLines = Reflector.GetCompoundOf3dEdges(HLRBRep_OutLine, Standard_True, Standard_False);
+  if (!OutLines.IsNull())
+    BB.Add(Result, OutLines);
+  TopoDS_Shape SmoothEdges = Reflector.GetCompoundOf3dEdges(HLRBRep_Rg1Line, Standard_True, Standard_False);
+  if (!SmoothEdges.IsNull())
+    BB.Add(Result, SmoothEdges);
+  
+  DBRep::Set(a[1], Result);
+
+  return 0;
+}
+
 //=======================================================================
 //function : OCC27466
 //purpose :
@@ -1631,6 +1718,9 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
   theCommands.Add("OCC27235", "OCC27235", __FILE__, OCC27235, group);
   theCommands.Add("OCC26930", "OCC26930", __FILE__, OCC26930, group);
   theCommands.Add("OCC27466", "OCC27466", __FILE__, OCC27466, group);
+  theCommands.Add("OCC27341",
+                  "OCC27341 res shape axo/top/bottom/front/back/left/right",
+                  __FILE__, OCC27341, group);
 
   return;
 }
index 708889e074e53f1eda5f1a7c9a411f6f464bb79d..c499c8b7e56965f8f6c67bb3d6e5917c70115e56 100644 (file)
@@ -6,7 +6,6 @@ puts ""
 # Wrong result obtained by General Fuse operator.
 ###############################################
 puts "TODO #OCC26816 ALL: Error : Result done by General Fuse operator is WRONG because number of"
-puts "TODO #OCC26816 ALL: Faulty shapes in variables faulty_1 to faulty_"
 
 restore [locate_data_file bug25715_p02c3s1.brep] b1
 restore [locate_data_file bug25838_p02c3s2.brep] b2
diff --git a/tests/bugs/modalg_6/bug27341_101 b/tests/bugs/modalg_6/bug27341_101
new file mode 100644 (file)
index 0000000..9515a0c
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "axo"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 319.505
+checknbshapes result -vertex 16 -edge 8
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_102 b/tests/bugs/modalg_6/bug27341_102
new file mode 100644 (file)
index 0000000..b96ea1b
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "top"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 291.117
+checknbshapes result -vertex 18 -edge 9
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_103 b/tests/bugs/modalg_6/bug27341_103
new file mode 100644 (file)
index 0000000..8876798
--- /dev/null
@@ -0,0 +1,33 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "bottom"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 334.113
+
+# 0027526: Excess micro-edge in HLR visualization of a torus
+if { [regexp {Windows} [dversion]] } {
+   checknbshapes result -vertex 24 -edge 12
+} else {
+   checknbshapes result -vertex 26 -edge 13
+}
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_104 b/tests/bugs/modalg_6/bug27341_104
new file mode 100644 (file)
index 0000000..59ebd6e
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "front"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 361.806
+checknbshapes result -vertex 12 -edge 6
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_105 b/tests/bugs/modalg_6/bug27341_105
new file mode 100644 (file)
index 0000000..9283ec3
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "back"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 430.307
+checknbshapes result -vertex 20 -edge 10
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_106 b/tests/bugs/modalg_6/bug27341_106
new file mode 100644 (file)
index 0000000..cee0220
--- /dev/null
@@ -0,0 +1,26 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "left"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 278.784
+checknbshapes result -vertex 14 -edge 7
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_107 b/tests/bugs/modalg_6/bug27341_107
new file mode 100644 (file)
index 0000000..a13224a
--- /dev/null
@@ -0,0 +1,26 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_save.brep] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 337.535
+checknbshapes result -vertex 20 -edge 10
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_201 b/tests/bugs/modalg_6/bug27341_201
new file mode 100644 (file)
index 0000000..3c52bab
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "axo"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 6.34998
+checknbshapes result -vertex 73 -edge 37
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_202 b/tests/bugs/modalg_6/bug27341_202
new file mode 100644 (file)
index 0000000..62ebf86
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "top"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 8.05281
+checknbshapes result -vertex 126 -edge 63
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_203 b/tests/bugs/modalg_6/bug27341_203
new file mode 100644 (file)
index 0000000..7b651fe
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "bottom"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 8.40409
+checknbshapes result -vertex 90 -edge 45
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_204 b/tests/bugs/modalg_6/bug27341_204
new file mode 100644 (file)
index 0000000..e02645d
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "front"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 7.39488
+checknbshapes result -vertex 46 -edge 23
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_205 b/tests/bugs/modalg_6/bug27341_205
new file mode 100644 (file)
index 0000000..0546f32
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "back"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 9.47163
+checknbshapes result -vertex 94 -edge 47
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_206 b/tests/bugs/modalg_6/bug27341_206
new file mode 100644 (file)
index 0000000..90c9979
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "left"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 7.42565
+checknbshapes result -vertex 64 -edge 32
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_207 b/tests/bugs/modalg_6/bug27341_207
new file mode 100644 (file)
index 0000000..634d8df
--- /dev/null
@@ -0,0 +1,27 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27341_hlrsave.brep] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 8.92009
+checknbshapes result -vertex 74 -edge 37
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_301 b/tests/bugs/modalg_6/bug27341_301
new file mode 100644 (file)
index 0000000..c94be6e
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_15.3020_16B1_B3=90.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1188.11
+checknbshapes result -vertex 324 -edge 163
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_302 b/tests/bugs/modalg_6/bug27341_302
new file mode 100644 (file)
index 0000000..a4efaf4
--- /dev/null
@@ -0,0 +1,34 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_211808_PCLNL12K8-15x32.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 425.969
+
+# 0027526: Excess micro-edge in HLR visualization of a torus
+if { [regexp {Windows} [dversion]] } {
+   checknbshapes result -vertex 198 -edge 99
+} else {
+   checknbshapes result -vertex 200 -edge 100
+}
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_303 b/tests/bugs/modalg_6/bug27341_303
new file mode 100644 (file)
index 0000000..38d8dc1
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 3299.23
+checknbshapes result -vertex 648 -edge 324
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_304 b/tests/bugs/modalg_6/bug27341_304
new file mode 100644 (file)
index 0000000..ac74a3e
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_82-01_Solid_End_Mill_Radius_with_Shrink_Fit_and_extension_HeavyModel.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 3016.59
+checknbshapes result -vertex 1388 -edge 696
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_305 b/tests/bugs/modalg_6/bug27341_305
new file mode 100644 (file)
index 0000000..919c0ed
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_ABS_Adapter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1760.66
+checknbshapes result -vertex 508 -edge 254
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_306 b/tests/bugs/modalg_6/bug27341_306
new file mode 100644 (file)
index 0000000..bea0290
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_ABS_Grundhalter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 2893.98
+checknbshapes result -vertex 725 -edge 363
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_307 b/tests/bugs/modalg_6/bug27341_307
new file mode 100644 (file)
index 0000000..50e8e2f
--- /dev/null
@@ -0,0 +1,34 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_AIF_Grundhalter_GR1_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+# 0027526: Excess micro-edge in HLR visualization of a torus
+if { [regexp {Windows} [dversion]] } {
+   checkprops result -l 2377.14
+   checknbshapes result -vertex 1008 -edge 507
+} else {
+   checkprops result -l 2345.73
+   checknbshapes result -vertex 1007 -edge 506
+}
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_308 b/tests/bugs/modalg_6/bug27341_308
new file mode 100644 (file)
index 0000000..ee1ea92
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_AWN_Adapter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1260.37
+checknbshapes result -vertex 527 -edge 264
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_309 b/tests/bugs/modalg_6/bug27341_309
new file mode 100644 (file)
index 0000000..140784c
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Adapter_MKG_SWS_CGS_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 2040.68
+checknbshapes result -vertex 344 -edge 172
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_310 b/tests/bugs/modalg_6/bug27341_310
new file mode 100644 (file)
index 0000000..68b7681
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Adapter_VDI_MKG_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 808.299
+checknbshapes result -vertex 578 -edge 289
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_311 b/tests/bugs/modalg_6/bug27341_311
new file mode 100644 (file)
index 0000000..cb19133
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Adapter_VLS_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1124.09
+checknbshapes result -vertex 354 -edge 177
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_312 b/tests/bugs/modalg_6/bug27341_312
new file mode 100644 (file)
index 0000000..f9296c6
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Adapter_Zylinder_2_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 520.703
+checknbshapes result -vertex 310 -edge 155
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_313 b/tests/bugs/modalg_6/bug27341_313
new file mode 100644 (file)
index 0000000..8010ba3
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Assembly_ABS_1_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 9662.5
+checknbshapes result -vertex 4531 -edge 2272
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_314 b/tests/bugs/modalg_6/bug27341_314
new file mode 100644 (file)
index 0000000..f85af44
--- /dev/null
@@ -0,0 +1,34 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Assembly_BILZ_WFL2_1_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 5910.01
+
+# 0027526: Excess micro-edge in HLR visualization of a torus
+if { [regexp {Windows} [dversion]] } {
+   checknbshapes result -vertex 1461 -edge 731
+} else {
+   checknbshapes result -vertex 1460 -edge 730
+}
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_315 b/tests/bugs/modalg_6/bug27341_315
new file mode 100644 (file)
index 0000000..371de00
--- /dev/null
@@ -0,0 +1,34 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Assembly_GMS_Kurz_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 5343.53
+
+# 0027526: Excess micro-edge in HLR visualization of a torus
+if { [regexp {Windows} [dversion]] } {
+   checknbshapes result -vertex 1813 -edge 909
+} else {
+   checknbshapes result -vertex 1812 -edge 908
+}
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_316 b/tests/bugs/modalg_6/bug27341_316
new file mode 100644 (file)
index 0000000..084b3a5
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_CCS_Adapter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1764.64
+checknbshapes result -vertex 353 -edge 177
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_317 b/tests/bugs/modalg_6/bug27341_317
new file mode 100644 (file)
index 0000000..b678670
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_CCT_PMK_32_L_o_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 2647.04
+checknbshapes result -vertex 614 -edge 307
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_318 b/tests/bugs/modalg_6/bug27341_318
new file mode 100644 (file)
index 0000000..24fcd64
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_CDI_Grundhalter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 2429.7
+checknbshapes result -vertex 387 -edge 194
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_319 b/tests/bugs/modalg_6/bug27341_319
new file mode 100644 (file)
index 0000000..7b8fbd6
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_CKB_Adapter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 792.344
+checknbshapes result -vertex 410 -edge 205
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_320 b/tests/bugs/modalg_6/bug27341_320
new file mode 100644 (file)
index 0000000..798d120
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Drehkopf_HSK_Gewinde_R_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1751.95
+checknbshapes result -vertex 867 -edge 434
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_321 b/tests/bugs/modalg_6/bug27341_321
new file mode 100644 (file)
index 0000000..a08bbb9
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Einsatz_BILZ_SEK_BFA_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 949.574
+checknbshapes result -vertex 220 -edge 110
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_322 b/tests/bugs/modalg_6/bug27341_322
new file mode 100644 (file)
index 0000000..abdf1bd
--- /dev/null
@@ -0,0 +1,34 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_HEE_Grundhalter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 6584.94
+
+# 0027526: Excess micro-edge in HLR visualization of a torus
+if { [regexp {Windows} [dversion]] } {
+   checknbshapes result -vertex 819 -edge 410
+} else {
+   checknbshapes result -vertex 818 -edge 409
+}
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_323 b/tests/bugs/modalg_6/bug27341_323
new file mode 100644 (file)
index 0000000..c04566c
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_KMM_Adapter_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 838.306
+checknbshapes result -vertex 478 -edge 239
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_324 b/tests/bugs/modalg_6/bug27341_324
new file mode 100644 (file)
index 0000000..edd427b
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_MZX_01_1_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 220.507
+checknbshapes result -vertex 110 -edge 55
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_325 b/tests/bugs/modalg_6/bug27341_325
new file mode 100644 (file)
index 0000000..17c80ff
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_Rundrohrverteiler.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 6115.27
+checknbshapes result -vertex 206 -edge 103
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_326 b/tests/bugs/modalg_6/bug27341_326
new file mode 100644 (file)
index 0000000..d760d25
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_SKJ_07_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 565.837
+checknbshapes result -vertex 324 -edge 162
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_327 b/tests/bugs/modalg_6/bug27341_327
new file mode 100644 (file)
index 0000000..0656bb6
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_conboom.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 23600.7
+checknbshapes result -vertex 174 -edge 87
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_328 b/tests/bugs/modalg_6/bug27341_328
new file mode 100644 (file)
index 0000000..cb3a3d9
--- /dev/null
@@ -0,0 +1,28 @@
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_rhombisch_Form_V_IC_476_L_CAD.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 47.1886
+checknbshapes result -vertex 70 -edge 35
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_6/bug27341_329 b/tests/bugs/modalg_6/bug27341_329
new file mode 100644 (file)
index 0000000..9c9d9b7
--- /dev/null
@@ -0,0 +1,30 @@
+puts "TODO OCC27532 ALL: Error on Record"
+
+puts "============"
+puts "OCC27341"
+puts "============"
+puts ""
+######################################################
+# Incorrect exact HLR results
+######################################################
+
+pload XDE
+pload QAcommands
+
+testreadstep [locate_data_file bug27341_stp_ML_MN5260-18-K.stp] a
+
+set viewname "right"
+
+smallview
+top
+clear
+
+OCC27341 result a ${viewname}
+build3d result
+
+fit
+
+checkprops result -l 1147.49
+checknbshapes result -vertex 298 -edge 149
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
index b69c32f7b7b27fcfa621af03c0b68b5e82f983e3..a15075e22bf293b2caa208f9c9dd6613d0d1d9ad 100755 (executable)
@@ -8,11 +8,11 @@ set filename BUC60743.igs
 set ref_data {
 DATA        : Faulties = 0  ( 2 )  Warnings = 0  ( 0 )  Summary  = 0  ( 2 )
 TPSTAT      : Faulties = 3  ( 59 )  Warnings = 2203  ( 4655 )  Summary  = 2206  ( 4714 )
-CHECKSHAPE  : Wires    = 7  ( 18 )  Faces    = 7  ( 13 )  Shells   = 0  ( 0 )   Solids   = 0 ( 0 )
-NBSHAPES    : Solid    = 0  ( 0 )  Shell    = 0  ( 0 )  Face     = 3350  ( 2837 )   Summary  = 45925  ( 39210 )
-STATSHAPE   : Solid    = 0  ( 0 )  Shell    = 0  ( 0 )  Face     = 3350  ( 3349 )   FreeWire = 6  ( 6 )   FreeEdge  = 67 ( 67 )   SharedEdge = 19603  ( 16778 )
+CHECKSHAPE  : Wires    = 8  ( 18 )  Faces    = 7  ( 13 )  Shells   = 0  ( 0 )   Solids   = 0 ( 0 )
+NBSHAPES    : Solid    = 0  ( 0 )  Shell    = 0  ( 0 )  Face     = 3350  ( 2837 )   Summary  = 45945  ( 39211 )
+STATSHAPE   : Solid    = 0  ( 0 )  Shell    = 0  ( 0 )  Face     = 3350  ( 3349 )   FreeWire = 6  ( 6 )   FreeEdge  = 67 ( 67 )   SharedEdge = 19616  ( 16778 )
 TOLERANCE   : MaxTol   =    4.854604894  (    5.769095076 )  AvgTol   =   0.01628658326  (   0.01747356296 )
-LABELS      : N0Labels = 11  ( 11 )  N1Labels = 2891  ( 6329 )  N2Labels = 0  ( 0 )   TotalLabels = 2902  ( 6340 )   NameLabels = 2900  ( 5879 )   ColorLabels = 2891  ( 6329 )   LayerLabels = 2411  ( 5259 )
+LABELS      : N0Labels = 11  ( 11 )  N1Labels = 2891  ( 6329 )  N2Labels = 0  ( 0 )   TotalLabels = 2902  ( 6340 )   NameLabels = 2900  ( 5879 )   ColorLabels = 2891  ( 6329 )   LayerLabels = 2411  ( 5260 )
 PROPS       : Centroid = 0  ( 0 )  Volume   = 0  ( 0 )  Area     = 0  ( 0 )
 NCOLORS     : NColors  = 4  ( 4 )
 COLORS      : Colors   = BLACK BLUE1 RED YELLOW  ( BLACK BLUE1 RED YELLOW )