y3d(_pt,_v) length = Rhino.Geometry.Intersect.Intersection.MeshRay(_m,ray) print length if length < 0.0: lines=Rhino.Geometry.Line(_pt,_pt+(100*_v)) return lines
if Run == True: if parallel: meshVecTupleL = [] for pt in points: for v in vectors: meshVecTupleL.append((mesh, pt, v)) withNulls = ghpythonlib.parallel.run(intersect, meshVecTupleL, True) a = [item for item in withNulls if item != None]
1. How come we never defined length as an empty list and still it stored all the numbers?
2. If length < 0.0 , lines are being created. How does python/rhino knows which pt to make the line at since we are processing the entire list "length" ?
3. If I add another statement before return lines that would return the startpoint of the line instead of the line itself, it doesn't work. Why is that?
Thanks for your help. …
Added by Apoorv Goyal at 3:41pm on January 13, 2015
. If no values are connected (again, I guess) it's still a valid DataTree, just empty.
case 3: You are trying to add an item using AddRange, which should be used to add a List. Either remove the for loop and the [k] or use Add rather than AddRange. In case you want to keep the for loop substitute k <= PQL.Count for k < PQL.Count.
case 4: I guess the output is empty because the input is empty. PQ outputs stuff when you change the value list to 'case 4'. PT doesn't output anything because it's never assigned in code.…
fore -- it creates a MeshPlane and 4 corner Points in Rhino, but the Pt parameter in the top left of the Grasshopper definition is orange coloured and says "unable to load a series of points" - so the simulation will not run. See the previously sent screenshots.
thanks for your help,
Jeg
…