I use GH and Python Scripting for intersecting planes.
If planes are created directly from points and vectors, it works perfectly:
Snippet 1:
import Rhino.Geometry as rg
from System.IO import File
A=rg.Plane(rg.Point3d(0,x,0),rg.Vector3d(1,y,y))
B=rg.Plane(rg.Point3d(0,x,0),rg.Vector3d(0,0,1))
C=rg.Intersect.Intersection.PlanePlane(A,B)
If planes are previously obtained by the method FitPlane, it does not work. It seems there is a problem with the IGH GOO wrapping.
Snippet 2:
import Rhino.Geometry as rg
from System.IO import File
texts1 = File.ReadAllLines(r"C:\Part1.txt")
points1 =
texts2 = File.ReadAllLines(r"C:\Part2.txt")
points2 =
for text in texts1:
subtexts1 = text.split(’ ')
points1.append(rg.Point3d(float(subtexts1[0]), float(subtexts1[1]), float(subtexts1[2])))
for text in texts2:
subtexts2 = text.split(’ ')
points2.append(rg.Point3d(float(subtexts2[0]), float(subtexts2[1]), float(subtexts2[2])))
fitPlane1=rg.Plane.FitPlaneToPoints(points1)
oFit1=fitPlane1
fitPlane2=rg.Plane.FitPlaneToPoints(points2)
oFit2=fitPlane2
int12=rg.Intersect.Intersection.PlanePlane(oFit1,oFit1)-------------------CRASH
EXPECTED PLANE GOT TUPLE