1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

...

3 Commits

Author SHA1 Message Date
mkv
79af72de75 Adding test cases for issue CR24103 2013-08-07 16:12:24 +04:00
jgv
e00087ccd8 Correction of comment 2013-08-06 18:13:19 +04:00
jgv
6ccc9c06eb 0024103: Infinite loop in HLR algorithm on the customer's shape 2013-08-06 17:06:10 +04:00
3 changed files with 69 additions and 1 deletions

View File

@@ -36,9 +36,12 @@
#include <BndLib_AddSurface.hxx>
#include <Bnd_Box.hxx>
#include <ElSLib.hxx>
#include <BRepAdaptor_HCurve2d.hxx>
#include <Geom_Curve.hxx>
#include <BRep_Tool.hxx>
#define tole 5.e-6
@@ -385,6 +388,23 @@ static void ComputeTangency (const Contap_TheSearch& solrst,
const TheArc& thearc = PStart.Arc();
theparam = PStart.Parameter();
gp_Pnt2d Ptoproj=TheArcTool::Value(thearc,theparam);
//jgv: for the issue 24103 to exclude points that are not same parameter:
//these points can be out of the surface's domain and lead to failure of Walking algorithm.
gp_Pnt PointFromSurf = TheSurfaceTool::Value(Surf, Ptoproj.X(), Ptoproj.Y());
Handle(BRepAdaptor_HCurve2d) brhc = Handle(BRepAdaptor_HCurve2d)::DownCast(thearc);
TopoDS_Edge theedge = ((BRepAdaptor_Curve2d *)&(brhc->Curve2d()))->Edge();
Standard_Real fpar, lpar;
Handle(Geom_Curve) thecurve = BRep_Tool::Curve(theedge, fpar, lpar);
if (!thecurve.IsNull())
{
gp_Pnt PointFromEdge = thecurve->Value(theparam);
Standard_Real TolEdge = BRep_Tool::Tolerance(theedge);
if (PointFromSurf.Distance(PointFromEdge) > 2.*TolEdge)
continue;
}
//////////////////////////////////////////////////////////
//-- lbr le 15 mai 97
//-- On elimine les points qui sont egalement present sur une restriction solution
Standard_Boolean SurUneRestrictionSolution = Standard_False;

24
tests/bugs/modalg_5/bug24103_1 Executable file
View File

@@ -0,0 +1,24 @@
puts "============"
puts "OCC24103"
puts "============"
puts ""
######################################################
# Infinite loop in HLR algorithm on the customer's shape
######################################################
pload XDE
smallview
right
stepread [locate_data_file bug24100_REFLECT_CURVE_PART_5_SOL_ohne_Metadaten.stp] a *
explode a_1
donly a_1_1
fit
reflectlines result a_1_1 1 0 0
set length 4217.78
set only_screen_axo 1

24
tests/bugs/modalg_5/bug24103_2 Executable file
View File

@@ -0,0 +1,24 @@
puts "============"
puts "OCC24103"
puts "============"
puts ""
######################################################
# Infinite loop in HLR algorithm on the customer's shape
######################################################
pload XDE
smallview
top
stepread [locate_data_file bug24100_REFLECT_CURVE_PART_5_SOL_ohne_Metadaten.stp] a *
explode a_1
donly a_1_1
fit
reflectlines result a_1_1 0 0 1
set length 6385.96
set only_screen_axo 1