Skip to content

Commit b332761

Browse files
astromkodpasukhi
astromko
authored andcommitted
0033648: Modeling Algorithms - Bad partition result
Removed unnecessary tolerance increase for Line\Line intersection. Tolerance increasing logic for some specific curve types was added with #26619. Original fix had no test for Line/Line case and theoretically was added as a possible issue. After research Line/Line case doesn't need a special tolerance case.
1 parent da71394 commit b332761

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx

+3-7
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,8 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
341341
GeomAbs_CurveType aType1 = aBAC1.GetType();
342342
GeomAbs_CurveType aType2 = aBAC2.GetType();
343343
//
344-
bAnalytical = (((aType1 == GeomAbs_Line) &&
345-
(aType2 == GeomAbs_Line ||
346-
aType2 == GeomAbs_Circle)) ||
347-
((aType2 == GeomAbs_Line) &&
348-
(aType1 == GeomAbs_Line ||
349-
aType1 == GeomAbs_Circle)));
344+
bAnalytical = (aType1 == GeomAbs_Line && aType2 == GeomAbs_Circle) ||
345+
(aType1 == GeomAbs_Circle && aType2 == GeomAbs_Line);
350346
}
351347
//
352348
for (i=1; i<=aNbCPrts; ++i) {
@@ -443,7 +439,7 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange)
443439

444440
Standard_Real aTolVnew = BRep_Tool::Tolerance(aVnew);
445441
if (bAnalytical) {
446-
// increase tolerance for Line/Line intersection, but do not update
442+
// increase tolerance for Line/Circle intersection, but do not update
447443
// the vertex till its intersection with some other shape
448444
Standard_Real aTolMin = (BRepAdaptor_Curve(aE1).GetType() == GeomAbs_Line) ?
449445
(aCR1.Last() - aCR1.First()) / 2. : (aCR2.Last() - aCR2.First()) / 2.;

tests/bugs/modalg_8/bug33648

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
puts "==================================================="
2+
puts "0033648: Modeling Algorithms - Bad partition result"
3+
puts "==================================================="
4+
puts ""
5+
6+
pload MODELING
7+
restore [locate_data_file bug33648_1.brep] s1
8+
restore [locate_data_file bug33648_2.brep] s2
9+
10+
baddobjects s1 s2
11+
bfillds
12+
bbuild result
13+
14+
checkprops result -s 87.2813
15+
checknbshapes result -vertex 58 -edge 97 -wire 44 -face 44 -shell 4 -solid 4 -compsolid 0 -compound 2 -shape 253
16+
17+
set expected_MaxTolerance 0.05
18+
regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTolerance
19+
if { $MaxTolerance > $expected_MaxTolerance } {
20+
puts "Error : too big tolerance for the shape (should be less than $expected_MaxTolerance, now $MaxTolerance)"
21+
}
22+
23+
vinit
24+
vdisplay result
25+
vfit
26+
checkview -screenshot -3d -path ${imagedir}/${test_image}.png

0 commit comments

Comments
 (0)