I currently working on a script to automize my rhino workflow.
The first part of the script creates multiple polylines and stores them in the array arrChosenLines(i) . The second part creates a set of CutPlanes with multiple AddCutPlane commands. The planes are all saved to the array arrFrames(i).
In the next step i need to create the intersection (points and possibly curves) of these two sets of objects. In the normal workflow i use the command IntersectTwoSets. Because I could not find any rhinoscript-command with the same functionality, I tried the rhino.command(" ") approach. Until now I could not find a working syntax to call this command with my two arrays of objects. I hope somebody can help with this.
Hey there!
If you want to use rhinoscriptsyntax I think you can use this function in the link below which intersects the planes with the curves: RhinoCommon - curveplaneintersection
I think this will be the proper script:
List Point3d = new List Point3d {PlaneCurveIntersection(arrFrames(i), arrChosenLines(i), tolerance=None)};
thank you for your help. As far as I know your solution works only for a single plane and a single line. I am looking for a command to intersect a set of multiple planes with a set of multiple curves.
import Rhino
planes=[]
for i in range(10):
pt = Rhino.Geometry.Point3d(0,0,i)
vec = Rhino.Geometry.Vector3d(0,0,1)
plane = Rhino.Geometry.Plane(pt, vec)
planes.append(plane)
lines = []
for i in range(20):
pt0 = Rhino.Geometry.Point3d(0,i,-20)
pt1 = Rhino.Geometry.Point3d(0,i,20)
line = Rhino.Geometry.Line(pt0,pt1)
lines.append(line)
for plane in planes:
for line in lines:
print Rhino.Geometry.Intersect.Intersection.LinePlane(line, plane)