mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
0033639: Modeling Algorithms - Boolean torus cut cone failed
Avoid adding an apex of cone as singular pole, which is lying on torus surface
This commit is contained in:
parent
c726439750
commit
5d3ddec35d
@ -827,6 +827,16 @@ Standard_Boolean IntPatch_SpecialPoints::
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (theQSurf->GetType() == GeomAbs_Cone && thePSurf->GetType() == GeomAbs_Torus)
|
||||||
|
{
|
||||||
|
const gp_Pnt anApex = theQSurf->Cone().Apex();
|
||||||
|
Standard_Real aSqDist = anApex.SquareDistance(aPQuad);
|
||||||
|
if (aSqDist < aTol * aTol)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Pole is an intersection point
|
//Pole is an intersection point
|
||||||
//(lies in the quadric and the parametric surface)
|
//(lies in the quadric and the parametric surface)
|
||||||
|
|
||||||
|
15
tests/bugs/modalg_8/bug33639_1
Normal file
15
tests/bugs/modalg_8/bug33639_1
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
puts "================================"
|
||||||
|
puts " 0033639: Modeling Algorithms - Boolean torus cut cone incorrect"
|
||||||
|
puts "================================"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
ptorus t 750 250 360
|
||||||
|
pcone c 200 0 2000
|
||||||
|
|
||||||
|
trotate c 0 0 0 1 0 0 90
|
||||||
|
ttranslate c 0 1000 0
|
||||||
|
|
||||||
|
bcut result t c
|
||||||
|
|
||||||
|
checknbshapes result -vertex 8 -edge 13 -wire 5 -face 3
|
||||||
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
16
tests/bugs/modalg_8/bug33639_2
Normal file
16
tests/bugs/modalg_8/bug33639_2
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
puts "================================"
|
||||||
|
puts " 0033639: Modeling Algorithms - Boolean torus cut cone incorrect"
|
||||||
|
puts "================================"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
ptorus t 750 250 360
|
||||||
|
pcone c 500 0 2000
|
||||||
|
|
||||||
|
trotate c 0 0 0 1 0 0 90
|
||||||
|
ttranslate c 0 1000 0
|
||||||
|
trotate c 0 -1000 0 1 0 0 45
|
||||||
|
|
||||||
|
bcut result t c
|
||||||
|
|
||||||
|
checknbshapes result -vertex 4 -edge 7 -wire 3 -face 2
|
||||||
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user