4 #include <BRepPrimAPI_MakeCone.hxx>
15 gp_Pnt apex = cone.Apex();
16 gp_Ax1 axis = cone.Axis();
17 gp_Ax2 ax2(apex, axis.Direction());
19 double dist_to_sphere = apex.Distance(*bcenter);
21 double safe_dimension = dist_to_sphere + bradius;
22 double semiAngle = cone.SemiAngle(), r0 = 0.0,
r1 = safe_dimension*tan(semiAngle);
24 mCone =
new gp_Cone(gp_Ax3(ax2), semiAngle, r0);
26 mSolid =
new TopoDS_Shape(BRepPrimAPI_MakeCone(ax2, r0,
r1, safe_dimension).Solid());
35 if (!other)
return false;
37 const gp_Cone *col =
mCone, *cor = other->
mCone;
48 double dc = sqrt(
SQR(col->Location().X() - cor->Location().X()) +
49 SQR(col->Location().Y() - cor->Location().Y()) +
50 SQR(col->Location().Z() - cor->Location().Z()));