I have currently obtained a proximity network for an area in grasshopper. I am now wanting to change the thickness of these curves depending on the length of the curves (eg. if the length of the curve is less than 5 than the curves will be thin. If they are larger than 5 in length they will be thicker).
I have arranged the lengths of the curves in order but am struggling to break the list into two inorder to add the different thicknesses and then convert the number back into a curve to be shown in rhino again.
A prox Graph, or ANY Graph in fact is described (if we forget Islands) by a List of Edges (E) AND a List of Vertices (V). The way that these are connected is a matter of Connectivity Trees of Type int (notably VV, VE and EV - in real life we rarely use EE). Paths have 1 dim or 2 dims (case Islands). For instance an EV Connectivity tree has paths where the 1st dim (no Islands) or the last (case Islands) is the index of an Edge (in E) and the items are the indices of the related Vertices (in V) … blah, blah. Meaning that an EV has always 2 items per path.
So given the E List you can extract (on a 1:1 basis) the Lengths in a List (say the L) and them find the Lmin /Lmax. Or … you can use Attractors (any List of pts, crvs etc etc) and some dist mode (push/pull).
So for your Pipes you just Loop into E (and at the same time into L) using some sort of formula for the radii, say, LCurrent/LMax * some user variable. Meaning that your List of Pipes is 1:1 to your E List.
Bad news: I don’t work with components (at all) nor with any add-on (other than K2). If on the other hand you think that a C# tht does prox graphs (+ connectivity) could mean anything to you … notify.
See a rather entry level C# (out of many) that does prox graphs (as trusses) using Meshes as rnd Pts containers. Spot the classic output: the 2 Lists (V, E) mentioned and the 3 Conn Trees (VV, VE, EV).
Funny saying that : EVERY component that you use is made that way. The only difference is that the component is a closed box (you can’t edit anything) while the C# is exactly the opposite. But … well … one can argue that the component is kinda a word in a language thus you can combine them etc etc (for me this means nothing).
Maybe this helps. I noticed you have lots of duplicate lines, so I culled them; it’s up to you. For the line thicknesses I used the Preview Lineweight component from the Human plugin.
Hi Ethan! Just looking at this again, would there be a way to alter the script to apply three different thickness to the curve lengths depending on lengths instead of just two thicknesses?