mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0031850: Modeling Algorithms - boolean cut and common generate unexpected result
IntPatch_WLineTool::JoinWLines(): using correct point for the check if WLines may be joined.
This commit is contained in:
parent
135c2bd908
commit
870ae593c3
@ -1643,7 +1643,7 @@ void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin,
|
|||||||
aWLine2->Point(aNbPntsWL2 - 1);
|
aWLine2->Point(aNbPntsWL2 - 1);
|
||||||
|
|
||||||
if (!CheckArgumentsToJoin(theS1, theS2, aPntLWL1, aPt1.Value(),
|
if (!CheckArgumentsToJoin(theS1, theS2, aPntLWL1, aPt1.Value(),
|
||||||
aPntFWL1.Value(), aPt2.Value(), aMinRad))
|
aPntLWL1.Value(), aPt2.Value(), aMinRad))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
47
tests/bugs/modalg_7/bug31850_1
Normal file
47
tests/bugs/modalg_7/bug31850_1
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
puts "======================================================="
|
||||||
|
puts "0031850: Modeling Algorithms - boolean cut and common generate unexpected result"
|
||||||
|
puts "======================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug31850.brep] s
|
||||||
|
explode s
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
baddobjects s_1
|
||||||
|
baddtools s_2
|
||||||
|
bfillds
|
||||||
|
|
||||||
|
bbop r0 0
|
||||||
|
bbop r1 1
|
||||||
|
bbop r2 2
|
||||||
|
bbop r3 3
|
||||||
|
bbop r4 4
|
||||||
|
bbuild rgf
|
||||||
|
|
||||||
|
foreach r {r0 r1 r2 r3 r4 rgf} {
|
||||||
|
checkshape $r
|
||||||
|
if {![regexp "OK" [bopcheck $r]]} {
|
||||||
|
puts "Error: the $r is a self-interfering shape"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checknbshapes r0 -wire 28 -face 28 -shell 1 -solid 1 -t
|
||||||
|
checkprops r0 -s 1107.94 -v 472.151
|
||||||
|
|
||||||
|
checknbshapes r1 -wire 50 -face 45 -shell 1 -solid 1 -t
|
||||||
|
checkprops r1 -s 14959.7 -v 37939.8
|
||||||
|
|
||||||
|
checknbshapes r2 -wire 33 -face 28 -shell 1 -solid 1 -t
|
||||||
|
checkprops r2 -s 5244.61 -v 2516.56
|
||||||
|
|
||||||
|
checknbshapes r3 -wire 45 -face 45 -shell 1 -solid 1 -t
|
||||||
|
checkprops r3 -s 10823 -v 34951.1
|
||||||
|
|
||||||
|
checkprops r4 -l 203.491
|
||||||
|
checksection r4 -r 10
|
||||||
|
|
||||||
|
checknbshapes rgf -wire 78 -face 73 -shell 3 -solid 3 -t
|
||||||
|
checkprops rgf -s 17175.6 -v 37939.8
|
||||||
|
|
||||||
|
checkview -display r0 -2d -path ${imagedir}/${test_image}.png
|
54
tests/bugs/modalg_7/bug31850_2
Normal file
54
tests/bugs/modalg_7/bug31850_2
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
puts "======================================================="
|
||||||
|
puts "0031850: Modeling Algorithms - boolean cut and common generate unexpected result"
|
||||||
|
puts "======================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug31850.brep] s
|
||||||
|
explode s
|
||||||
|
|
||||||
|
bfuzzyvalue 1.e-6
|
||||||
|
bnondestructive 1
|
||||||
|
brunparallel 1
|
||||||
|
setfillhistory 0
|
||||||
|
|
||||||
|
bclearobjects
|
||||||
|
bcleartools
|
||||||
|
baddobjects s_1
|
||||||
|
baddtools s_2
|
||||||
|
bfillds
|
||||||
|
|
||||||
|
bbop r0 0
|
||||||
|
bbop r1 1
|
||||||
|
bbop r2 2
|
||||||
|
bbop r3 3
|
||||||
|
bbop r4 4
|
||||||
|
bbuild rgf
|
||||||
|
|
||||||
|
boptions -default
|
||||||
|
|
||||||
|
foreach r {r0 r1 r2 r3 r4 rgf} {
|
||||||
|
checkshape $r
|
||||||
|
if {![regexp "OK" [bopcheck $r]]} {
|
||||||
|
puts "Error: the $r is a self-interfering shape"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checknbshapes r0 -wire 28 -face 28 -shell 1 -solid 1 -t
|
||||||
|
checkprops r0 -s 1107.94 -v 472.151
|
||||||
|
|
||||||
|
checknbshapes r1 -wire 50 -face 45 -shell 1 -solid 1 -t
|
||||||
|
checkprops r1 -s 14959.7 -v 37939.8
|
||||||
|
|
||||||
|
checknbshapes r2 -wire 33 -face 28 -shell 1 -solid 1 -t
|
||||||
|
checkprops r2 -s 5244.61 -v 2516.56
|
||||||
|
|
||||||
|
checknbshapes r3 -wire 45 -face 45 -shell 1 -solid 1 -t
|
||||||
|
checkprops r3 -s 10823 -v 34951.1
|
||||||
|
|
||||||
|
checkprops r4 -l 203.491
|
||||||
|
checksection r4 -r 10
|
||||||
|
|
||||||
|
checknbshapes rgf -wire 78 -face 73 -shell 3 -solid 3 -t
|
||||||
|
checkprops rgf -s 17175.6 -v 37939.8
|
||||||
|
|
||||||
|
checkview -display r0 -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user