RhinoScript function IntersectSpheres doesn't work

Hi,

I am trying to use Rhino.IntersectSpheres in RhinoScript without success. To test, I have copied this example from the help file page for the function (I just added the Rhino.Print “NULL” in the end:

Dim arrLine, arrPlane0, arrPlane1, dblHeight, dblRadius

Dim arrResults, i

arrPlane0 = Rhino.WorldXYPlane

arrPlane1 = Rhino.MovePlane(arrPlane0, Array(10, 0, 0))

dblRadius = 10

arrResults = Rhino.IntersectSpheres(arrPlane0, dblRadius, arrPlane1, dblRadius)

If IsArray(arrResults) Then

	If arrResults(0) = 0 Then

		Rhino.AddPoint arrResults(1)

	Else

		Rhino.AddCircle arrResults(1), arrResults(2)

	End If

Else
	Rhino.Print "NULL"
	
End If

This always prints NULL although the spheres should clearly intersect. I guess this is a bug report.

Best,
Mathias

Yeah, that looks buggy to me… Added to the bugtrack system.

Working in Python/Rhinoscriptsyntax:

import rhinoscriptsyntax as rs
plane_0 = rs.WorldXYplane()
plane_1 = rs.MovePlane(plane_0,(10, 0, 0))
rad = 10.0
results = rs.IntersectSpheres(plane_0,rad, plane_1,rad)
if results:
    if results[0]==0:
        rs.AddPoint(results[1])
    else:
        rs.AddCircle(results[1],results[2])
else:
    print "Not happening..."

–Mitch