mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-07-10 04:17:44 +08:00
0028053: Regressions in HLR when FPE signals are enabled
Protect Contap_Contour from creation of null-length curves.
This commit is contained in:
@@ -308,9 +308,14 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin,
|
||||
//-- cout<<"ContapWLine : firtsp="<<firstp<<" lastp="<<lastp<<" Vtx:"<<i<<","<<i+1<<endl;
|
||||
Handle(IntSurf_LineOn2S) LineOn2S = new IntSurf_LineOn2S();
|
||||
Contap_Line Line;
|
||||
Standard_Real aLen = 0.;
|
||||
for(Standard_Integer j=firstp; j<=lastp; j++) {
|
||||
LineOn2S->Add(L.Point(j));
|
||||
if (j > firstp)
|
||||
aLen += L.Point(j).Value().Distance(L.Point(j - 1).Value());
|
||||
}
|
||||
if (aLen < Precision::Confusion())
|
||||
continue;
|
||||
Line.SetLineOn2S(LineOn2S);
|
||||
Contap_Point pvtx = L.Vertex(i);
|
||||
pvtx.SetParameter(1);
|
||||
|
||||
@@ -21,6 +21,6 @@ build3d result
|
||||
fit
|
||||
|
||||
checkprops result -l 0.841499
|
||||
checknbshapes result -vertex 92 -edge 46
|
||||
checknbshapes result -vertex 94 -edge 47
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||
|
||||
Reference in New Issue
Block a user