Calculates the intersection of a plane and a sphere.
rhinoscriptsyntax.PlaneSphereIntersection(plane, sphere_plane, sphere_radius)
rhinoscript.plane.PlaneSphereIntersection(plane, sphere_plane, sphere_radius)
plane |
Required. The plane to intersect. |
sphere_plane |
Required. An equatorial plane of the sphere. The origin of the plane will be the center point of the sphere. |
sphere_radius |
Required. Number. The radius of the 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
plane = rs.WorldXYPlane()
radius = 10
results = rs.PlaneSphereIntersection(plane, plane, radius)
if results:
if results[0]==0:
rs.AddPoint(results[1])
else:
rs.AddCircle(results[1], results[2])