mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0024463: BRepAlgo_Section::Build hangs
Added test case bugs/modalg_5/bug24463
This commit is contained in:
parent
ceaa5e27eb
commit
9c06009aa5
@ -34,6 +34,7 @@
|
|||||||
#include <BRep_TEdge.hxx>
|
#include <BRep_TEdge.hxx>
|
||||||
#include <TColgp_SequenceOfPnt2d.hxx>
|
#include <TColgp_SequenceOfPnt2d.hxx>
|
||||||
#include <TColStd_SequenceOfReal.hxx>
|
#include <TColStd_SequenceOfReal.hxx>
|
||||||
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
#include <TColGeom2d_SequenceOfCurve.hxx>
|
#include <TColGeom2d_SequenceOfCurve.hxx>
|
||||||
#include <TopTools_SequenceOfShape.hxx>
|
#include <TopTools_SequenceOfShape.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
@ -176,9 +177,23 @@ void BRepTools::AddUVBounds(const TopoDS_Face& F,
|
|||||||
gp_Pnt2d Pa,Pb,Pc;
|
gp_Pnt2d Pa,Pb,Pc;
|
||||||
|
|
||||||
|
|
||||||
Standard_Real i, nbp = 20;
|
Standard_Integer i, j, k, nbp = 20;
|
||||||
if (PC.GetType() == GeomAbs_Line) nbp = 2;
|
if (PC.GetType() == GeomAbs_Line) nbp = 2;
|
||||||
Standard_Real step = (pl - pf) / nbp;
|
Standard_Integer NbIntC1 = PC.NbIntervals(GeomAbs_C1);
|
||||||
|
if (NbIntC1 > 1)
|
||||||
|
nbp = 10;
|
||||||
|
TColStd_Array1OfReal SharpPoints(1, NbIntC1+1);
|
||||||
|
PC.Intervals(SharpPoints, GeomAbs_C1);
|
||||||
|
TColStd_Array1OfReal Parameters(1, nbp*NbIntC1+1);
|
||||||
|
k = 1;
|
||||||
|
for (i = 1; i <= NbIntC1; i++)
|
||||||
|
{
|
||||||
|
Standard_Real delta = (SharpPoints(i+1) - SharpPoints(i))/nbp;
|
||||||
|
for (j = 0; j < nbp; j++)
|
||||||
|
Parameters(k++) = SharpPoints(i) + j*delta;
|
||||||
|
}
|
||||||
|
Parameters(nbp*NbIntC1+1) = SharpPoints(NbIntC1+1);
|
||||||
|
|
||||||
gp_Pnt2d P;
|
gp_Pnt2d P;
|
||||||
PC.D0(pf,P);
|
PC.D0(pf,P);
|
||||||
Baux.Add(P);
|
Baux.Add(P);
|
||||||
@ -187,11 +202,11 @@ void BRepTools::AddUVBounds(const TopoDS_Face& F,
|
|||||||
Standard_Real dv=0.0;
|
Standard_Real dv=0.0;
|
||||||
|
|
||||||
Pc=P;
|
Pc=P;
|
||||||
for (i = 1; i < nbp; i++) {
|
for (i = 2; i < Parameters.Upper(); i++) {
|
||||||
pf += step;
|
pf = Parameters(i);
|
||||||
PC.D0(pf,P);
|
PC.D0(pf,P);
|
||||||
Baux.Add(P);
|
Baux.Add(P);
|
||||||
if(i==1) { Pb=Pc; Pc=P; }
|
if(i==2) { Pb=Pc; Pc=P; }
|
||||||
else {
|
else {
|
||||||
//-- Calcul de la fleche
|
//-- Calcul de la fleche
|
||||||
Pa=Pb; Pb=Pc; Pc=P;
|
Pa=Pb; Pb=Pc; Pc=P;
|
||||||
|
11
tests/bugs/modalg_5/bug24463
Normal file
11
tests/bugs/modalg_5/bug24463
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC24463"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
####################################
|
||||||
|
# BRepAlgo_Section::Build hangs
|
||||||
|
####################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug24463_TK0000000000480_109.brep] a
|
||||||
|
plane p 0 7000 0 0 -1 0 0 0 -1
|
||||||
|
psection r a p
|
Loading…
x
Reference in New Issue
Block a user