计算一个平面和一个球体的相交。
rhinoscriptsyntax.PlaneSphereIntersection(plane, sphere_plane, sphere_radius)
rhinoscript.plane.PlaneSphereIntersection(plane, sphere_plane, sphere_radius)
plane |
必须参数。要求交的平面。 |
sphere_plane |
必须参数。球体的赤道平面。平面的原点将作为球体的中心点。 |
sphere_radius |
必须参数。数字。球体的半径。 |
列表 |
执行成功,返回相交计算结果组成的列表。计算结果如下:
|
||||||||||||
None |
如果执行不成功或出错,返回空值。 |
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])