From 5ae6e53decf10a0130112cc56c336296fbddd560 Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 25 May 2016 12:19:24 +0300 Subject: [PATCH] 0027341: Incorrect exact HLR results - 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. --- src/BRepTest/BRepTest_CurveCommands.cxx | 2 +- src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 2 +- src/Geom2dInt/Geom2dInt_GInter.hxx | 4 +- src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx | 20 +++-- .../Geom2dInt_TheIntPCurvePCurveOfGInter.hxx | 13 ++- src/HLRAppli/HLRAppli_ReflectLines.cxx | 7 +- src/HLRAppli/HLRAppli_ReflectLines.hxx | 5 +- src/HLRBRep/HLRBRep_CInter.hxx | 4 +- src/HLRBRep/HLRBRep_Data.cxx | 2 +- src/HLRBRep/HLRBRep_Hider.cxx | 65 ++++++++++++-- src/HLRBRep/HLRBRep_Intersector.cxx | 4 + .../HLRBRep_TheIntPCurvePCurveOfCInter.hxx | 8 +- src/HLRTest/HLRTest.cxx | 6 +- src/IntCurve/IntCurve_IntCurveCurveGen.gxx | 69 ++++---------- src/IntCurve/IntCurve_IntPolyPolyGen.gxx | 85 ++++++++++-------- src/QABugs/QABugs_20.cxx | 90 +++++++++++++++++++ tests/bugs/modalg_5/bug25838 | 1 - tests/bugs/modalg_6/bug27341_101 | 27 ++++++ tests/bugs/modalg_6/bug27341_102 | 27 ++++++ tests/bugs/modalg_6/bug27341_103 | 33 +++++++ tests/bugs/modalg_6/bug27341_104 | 27 ++++++ tests/bugs/modalg_6/bug27341_105 | 27 ++++++ tests/bugs/modalg_6/bug27341_106 | 26 ++++++ tests/bugs/modalg_6/bug27341_107 | 26 ++++++ tests/bugs/modalg_6/bug27341_201 | 27 ++++++ tests/bugs/modalg_6/bug27341_202 | 27 ++++++ tests/bugs/modalg_6/bug27341_203 | 27 ++++++ tests/bugs/modalg_6/bug27341_204 | 27 ++++++ tests/bugs/modalg_6/bug27341_205 | 27 ++++++ tests/bugs/modalg_6/bug27341_206 | 27 ++++++ tests/bugs/modalg_6/bug27341_207 | 27 ++++++ tests/bugs/modalg_6/bug27341_301 | 28 ++++++ tests/bugs/modalg_6/bug27341_302 | 34 +++++++ tests/bugs/modalg_6/bug27341_303 | 28 ++++++ tests/bugs/modalg_6/bug27341_304 | 28 ++++++ tests/bugs/modalg_6/bug27341_305 | 28 ++++++ tests/bugs/modalg_6/bug27341_306 | 28 ++++++ tests/bugs/modalg_6/bug27341_307 | 34 +++++++ tests/bugs/modalg_6/bug27341_308 | 28 ++++++ tests/bugs/modalg_6/bug27341_309 | 28 ++++++ tests/bugs/modalg_6/bug27341_310 | 28 ++++++ tests/bugs/modalg_6/bug27341_311 | 28 ++++++ tests/bugs/modalg_6/bug27341_312 | 28 ++++++ tests/bugs/modalg_6/bug27341_313 | 28 ++++++ tests/bugs/modalg_6/bug27341_314 | 34 +++++++ tests/bugs/modalg_6/bug27341_315 | 34 +++++++ tests/bugs/modalg_6/bug27341_316 | 28 ++++++ tests/bugs/modalg_6/bug27341_317 | 28 ++++++ tests/bugs/modalg_6/bug27341_318 | 28 ++++++ tests/bugs/modalg_6/bug27341_319 | 28 ++++++ tests/bugs/modalg_6/bug27341_320 | 28 ++++++ tests/bugs/modalg_6/bug27341_321 | 28 ++++++ tests/bugs/modalg_6/bug27341_322 | 34 +++++++ tests/bugs/modalg_6/bug27341_323 | 28 ++++++ tests/bugs/modalg_6/bug27341_324 | 28 ++++++ tests/bugs/modalg_6/bug27341_325 | 28 ++++++ tests/bugs/modalg_6/bug27341_326 | 28 ++++++ tests/bugs/modalg_6/bug27341_327 | 28 ++++++ tests/bugs/modalg_6/bug27341_328 | 28 ++++++ tests/bugs/modalg_6/bug27341_329 | 30 +++++++ tests/de/iges_1/R8 | 8 +- 61 files changed, 1489 insertions(+), 132 deletions(-) create mode 100644 tests/bugs/modalg_6/bug27341_101 create mode 100644 tests/bugs/modalg_6/bug27341_102 create mode 100644 tests/bugs/modalg_6/bug27341_103 create mode 100644 tests/bugs/modalg_6/bug27341_104 create mode 100644 tests/bugs/modalg_6/bug27341_105 create mode 100644 tests/bugs/modalg_6/bug27341_106 create mode 100644 tests/bugs/modalg_6/bug27341_107 create mode 100644 tests/bugs/modalg_6/bug27341_201 create mode 100644 tests/bugs/modalg_6/bug27341_202 create mode 100644 tests/bugs/modalg_6/bug27341_203 create mode 100644 tests/bugs/modalg_6/bug27341_204 create mode 100644 tests/bugs/modalg_6/bug27341_205 create mode 100644 tests/bugs/modalg_6/bug27341_206 create mode 100644 tests/bugs/modalg_6/bug27341_207 create mode 100644 tests/bugs/modalg_6/bug27341_301 create mode 100644 tests/bugs/modalg_6/bug27341_302 create mode 100644 tests/bugs/modalg_6/bug27341_303 create mode 100644 tests/bugs/modalg_6/bug27341_304 create mode 100644 tests/bugs/modalg_6/bug27341_305 create mode 100644 tests/bugs/modalg_6/bug27341_306 create mode 100644 tests/bugs/modalg_6/bug27341_307 create mode 100644 tests/bugs/modalg_6/bug27341_308 create mode 100644 tests/bugs/modalg_6/bug27341_309 create mode 100644 tests/bugs/modalg_6/bug27341_310 create mode 100644 tests/bugs/modalg_6/bug27341_311 create mode 100644 tests/bugs/modalg_6/bug27341_312 create mode 100644 tests/bugs/modalg_6/bug27341_313 create mode 100644 tests/bugs/modalg_6/bug27341_314 create mode 100644 tests/bugs/modalg_6/bug27341_315 create mode 100644 tests/bugs/modalg_6/bug27341_316 create mode 100644 tests/bugs/modalg_6/bug27341_317 create mode 100644 tests/bugs/modalg_6/bug27341_318 create mode 100644 tests/bugs/modalg_6/bug27341_319 create mode 100644 tests/bugs/modalg_6/bug27341_320 create mode 100644 tests/bugs/modalg_6/bug27341_321 create mode 100644 tests/bugs/modalg_6/bug27341_322 create mode 100644 tests/bugs/modalg_6/bug27341_323 create mode 100644 tests/bugs/modalg_6/bug27341_324 create mode 100644 tests/bugs/modalg_6/bug27341_325 create mode 100644 tests/bugs/modalg_6/bug27341_326 create mode 100644 tests/bugs/modalg_6/bug27341_327 create mode 100644 tests/bugs/modalg_6/bug27341_328 create mode 100644 tests/bugs/modalg_6/bug27341_329 diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 05834ea03d..b128388555 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -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); } diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 3b6c945173..047faa2b2b 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -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; diff --git a/src/Geom2dInt/Geom2dInt_GInter.hxx b/src/Geom2dInt/Geom2dInt_GInter.hxx index 8b3892a3dc..5d0babdc03 100644 --- a/src/Geom2dInt/Geom2dInt_GInter.hxx +++ b/src/Geom2dInt/Geom2dInt_GInter.hxx @@ -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: diff --git a/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx b/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx index 970c5c3152..cdeca87d10 100644 --- a/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx +++ b/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx @@ -25,21 +25,25 @@ //============================================================ 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) { diff --git a/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx index 261684cc15..7f587e858e 100644 --- a/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx @@ -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; }; diff --git a/src/HLRAppli/HLRAppli_ReflectLines.cxx b/src/HLRAppli/HLRAppli_ReflectLines.cxx index 9f1a0e95b2..9a6fe77211 100644 --- a/src/HLRAppli/HLRAppli_ReflectLines.cxx +++ b/src/HLRAppli/HLRAppli_ReflectLines.cxx @@ -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); } diff --git a/src/HLRAppli/HLRAppli_ReflectLines.hxx b/src/HLRAppli/HLRAppli_ReflectLines.hxx index bedbcc7898..2ad5326913 100644 --- a/src/HLRAppli/HLRAppli_ReflectLines.hxx +++ b/src/HLRAppli/HLRAppli_ReflectLines.hxx @@ -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); diff --git a/src/HLRBRep/HLRBRep_CInter.hxx b/src/HLRBRep/HLRBRep_CInter.hxx index ace29d5a4c..77003b6d3d 100644 --- a/src/HLRBRep/HLRBRep_CInter.hxx +++ b/src/HLRBRep/HLRBRep_CInter.hxx @@ -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: diff --git a/src/HLRBRep/HLRBRep_Data.cxx b/src/HLRBRep/HLRBRep_Data.cxx index a895b812ae..4f6ac729c2 100644 --- a/src/HLRBRep/HLRBRep_Data.cxx +++ b/src/HLRBRep/HLRBRep_Data.cxx @@ -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(); //-- ----------------------------------------------------------------------- diff --git a/src/HLRBRep/HLRBRep_Hider.cxx b/src/HLRBRep/HLRBRep_Hider.cxx index b0d99381f5..86b7513787 100644 --- a/src/HLRBRep/HLRBRep_Hider.cxx +++ b/src/HLRBRep/HLRBRep_Hider.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include //======================================================================= @@ -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"< 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 : diff --git a/src/HLRBRep/HLRBRep_Intersector.cxx b/src/HLRBRep/HLRBRep_Intersector.cxx index c1ce1a7147..bc18c7e788 100644 --- a/src/HLRBRep/HLRBRep_Intersector.cxx +++ b/src/HLRBRep/HLRBRep_Intersector.cxx @@ -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); } //======================================================================= diff --git a/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx index 89af5bd1a9..bf7df7bb7b 100644 --- a/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx @@ -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; }; diff --git a/src/HLRTest/HLRTest.cxx b/src/HLRTest/HLRTest.cxx index 84c492a9d1..891dc05867 100644 --- a/src/HLRTest/HLRTest.cxx +++ b/src/HLRTest/HLRTest.cxx @@ -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); diff --git a/src/IntCurve/IntCurve_IntCurveCurveGen.gxx b/src/IntCurve/IntCurve_IntCurveCurveGen.gxx index 6a3d98eabf..bc00859aad 100644 --- a/src/IntCurve/IntCurve_IntCurveCurveGen.gxx +++ b/src/IntCurve/IntCurve_IntCurveCurveGen.gxx @@ -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(); +} diff --git a/src/IntCurve/IntCurve_IntPolyPolyGen.gxx b/src/IntCurve/IntCurve_IntPolyPolyGen.gxx index 31308b2463..aa868050c4 100644 --- a/src/IntCurve/IntCurve_IntPolyPolyGen.gxx +++ b/src/IntCurve/IntCurve_IntPolyPolyGen.gxx @@ -50,10 +50,7 @@ //====================================================================== -// 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 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; +} diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 15e795787b..438046cd80 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -54,6 +54,9 @@ #include #include #include + +#include + //======================================================================= //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; } diff --git a/tests/bugs/modalg_5/bug25838 b/tests/bugs/modalg_5/bug25838 index 708889e074..c499c8b7e5 100644 --- a/tests/bugs/modalg_5/bug25838 +++ b/tests/bugs/modalg_5/bug25838 @@ -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 index 0000000000..9515a0c5c4 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_101 @@ -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 index 0000000000..b96ea1bc20 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_102 @@ -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 index 0000000000..88767982a8 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_103 @@ -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 index 0000000000..59ebd6e3d5 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_104 @@ -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 index 0000000000..9283ec3600 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_105 @@ -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 index 0000000000..cee0220439 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_106 @@ -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 index 0000000000..a13224acd5 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_107 @@ -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 index 0000000000..3c52bab75a --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_201 @@ -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 index 0000000000..62ebf86f6b --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_202 @@ -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 index 0000000000..7b651fe48c --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_203 @@ -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 index 0000000000..e02645dc60 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_204 @@ -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 index 0000000000..0546f329ae --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_205 @@ -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 index 0000000000..90c9979f21 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_206 @@ -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 index 0000000000..634d8df59e --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_207 @@ -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 index 0000000000..c94be6eedd --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_301 @@ -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 index 0000000000..a4efaf4810 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_302 @@ -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 index 0000000000..38d8dc1c78 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_303 @@ -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 index 0000000000..ac74a3ed71 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_304 @@ -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 index 0000000000..919c0edbc8 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_305 @@ -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 index 0000000000..bea0290da5 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_306 @@ -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 index 0000000000..50e8e2fa1d --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_307 @@ -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 index 0000000000..ee1ea92858 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_308 @@ -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 index 0000000000..140784c2e7 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_309 @@ -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 index 0000000000..68b7681313 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_310 @@ -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 index 0000000000..cb19133eb5 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_311 @@ -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 index 0000000000..f9296c62df --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_312 @@ -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 index 0000000000..8010ba3ac9 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_313 @@ -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 index 0000000000..f85af44e91 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_314 @@ -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 index 0000000000..371de00d38 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_315 @@ -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 index 0000000000..084b3a5d97 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_316 @@ -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 index 0000000000..b678670dae --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_317 @@ -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 index 0000000000..24fcd64a72 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_318 @@ -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 index 0000000000..7b8fbd6d89 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_319 @@ -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 index 0000000000..798d120395 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_320 @@ -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 index 0000000000..a08bbb9872 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_321 @@ -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 index 0000000000..abdf1bd70c --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_322 @@ -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 index 0000000000..c04566cded --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_323 @@ -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 index 0000000000..edd427bc40 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_324 @@ -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 index 0000000000..17c80ff6e5 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_325 @@ -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 index 0000000000..d760d25d14 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_326 @@ -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 index 0000000000..0656bb67f1 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_327 @@ -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 index 0000000000..cb3a3d99f7 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_328 @@ -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 index 0000000000..9c9d9b7330 --- /dev/null +++ b/tests/bugs/modalg_6/bug27341_329 @@ -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 diff --git a/tests/de/iges_1/R8 b/tests/de/iges_1/R8 index b69c32f7b7..a15075e22b 100755 --- a/tests/de/iges_1/R8 +++ b/tests/de/iges_1/R8 @@ -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 ) -- 2.20.1