Avoid adding an apex of cone as singular pole, which is lying on torus surface
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
//(lies in the quadric and the parametric surface)
--- /dev/null
+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
--- /dev/null
+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