Hello, how are you? Good afternoon everyone, again I am struggling with Python within Dynamo
So I wanted to see if any of you can support me
I want to evaluate if a point intersects the line or not and I want to create a dictionary with the points that intersect the line, now I am creating the definition but my question is how I could make these sublists within a general list
My goal is to create a list with the points that intersect the line and then apply the splitCurves.By Points function.
Could you guide me a bit on how to do the syntax to achieve this, I am new to Python and it is difficult for me to change the nodes for the code.
This is the Code
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference('DSCoreNodes')
from DSCore import *
# The inputs to this node will be stored as a list in the IN variables.
Curves = IN[0]
Points = IN[1]
#Obtain the Exterior Columns
def SplitByPoints(Curves,Points):
Count= 0
EvList=[]
for Curve in Curves:
for Point in Points:
Ev= Curve.DoesIntersect(Points)
if Ev:
Ev.append([Count]EvList)
Count =+ 1
return EvList
# Assign your output to the OUT variable.
OUT = 0
This is the context
And here is the File G-Structural-Grid-Forum-Split-ByPoints.dyn (14.6 KB)