yep, but these events are apparently intersection results. according to RhinoCommon dictionary
I can use .PointA, but I have to loop to get it I can’t just pick one out of the insect_event
import System
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
import time
tol = sc.doc.ModelAbsoluteTolerance
def TST():
curves_ids = rs.GetObjects("get curves: ",rs.filter.curve)
if curves_ids == None: return
curves = [rs.coercecurve(id) for id in curves_ids if id is not None]
for i in range(-1,len(curves)-1):
#print curves[i]
curve_0 = curves[i-1]
curve_1 = curves[i]
curve_2 = curves[i+1]
pt_01 = None
pt_12 = None
if not curve_0 or not curve_1 or not curve_2: return
# Calculate the intersection
intersection_tolerance = tol
overlap_tolerance = 0.0
insect_event_01 = Rhino.Geometry.Intersect.Intersection.CurveCurve(curve_0, curve_1, intersection_tolerance, overlap_tolerance)
insect_event_12 = Rhino.Geometry.Intersect.Intersection.CurveCurve(curve_1, curve_2, intersection_tolerance, overlap_tolerance)
pt_lst = []
#print insect_event_01
#pt_01 = Rhino.Geometry.Point3d(insect01.Item(0).PointA)
#pt_12 = Rhino.Geometry.Point3d(insect12.Item(0).PointA)
print insect_event_01.Count
if insect_event_01.Count > 1:
#print insect_event_01.Item(0)
print insect_event_01[1]
for event in insect_event_01:
print event.PointA2
print event.PointB2
Question is why do I have to do that for event in insect_event: loop?
I want to just take the first event in insect_event:
like so: insect_event[0].PointA but I can’t