Calculates the intersection of two spheres.
rhinoscript.surface.IntersectSpheres (sphere_plane0, sphere_radius0, sphere_plane1, sphere_radius1)
rhinoscriptsyntax.IntersectSpheres (sphere_plane0, sphere_radius0, sphere_plane1, sphere_radius1)
sphere_plane0 |
Required. Plane. An equatorial plane of the first sphere. The origin of the plane will be the center point of the sphere. |
sphere_radius0 |
Required. Number. The radius of the first sphere. |
sphere_plane1 |
Required. Plane. An equatorial plane of the second sphere. The origin of the plane will be the center point of the sphere. |
sphere_radius1 |
Required. Number. The radius of the second sphere. |
List |
A list of intersection results, if successful. The results are as follows:
|
||||||||||||
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
plane0 = rs.WorldXYPlane()
plane1 = rs.MovePlane(plane0, (10,0,0))
radius = 10
results = rs.IntersectSpheres(plane0, radius, plane1, radius)
if results:
if results[0] == 0: rs.AddPoint(results[1])
else: rs.AddCircle( results[1], results[2])