Create FamiliesByPoint on a Curve -Duplicate Geometry on Points

I managed to cobble together something to place families along a path, with a randomized spacing (woo!), but for some reason it is dumping multiple instances of the family on points - upwards of 30 instances. I’m completely lost to what I’m doing wrong… Any guidance on how to get one family instance per point would be appreciated.

DynamoRandomOnPath

Is your graph in automatic mode or have you run it successively without closing the graph? Some nodes don’t clear content created on prior runs.

@Chad_Clary Important to expand/expose the lists generated by most/significant nodes.
Seems like you have one curve, but have several sublists of parameters

Assuming you intend to have 65 points placed randomly along a curve, you could try something like this …

2 Likes

Graph was in manual mode but I probably didn’t clear any content before secondary testing which doesn’t help.

The curve is a property boundary that I need some trees down and it’s pretty long (800 feet or so) which is why the array count is high. The random number values were set to provide a reasonable space between trees without cramping or having huge open gaps. The more I look into it I I can see that the method used isn’t quite what I intended and I think some of the doubling is because the points are next to one another giving the effect of doubling.

That said - I’ve got it placing families scattered around but have a slightly different problem. When placing the trees there are a couple different types. If I feed the different types into the Family.ByPoint it will cycle through the types once but then just sticks with the last one it encounters and places it at all of the remaining points. I’ve messed with the lacing and shortest only places 7 instances. longest places 7 and then repeats one and cross-product places 7 at each point. Is there a way to have it keep cycling through the list of families (hopefully randomly) instead of sticking at the last type?

Thanks for the help so far!

Assuming you want a random distribution of tree types (call them A and B) spread across the list of points.

  1. Create a list of elements which is equal to the floor of the length of the list of points (List.OfRepeatedElements node, Math.Floor node, and a List.Count node). The input element should the the first type of tree you want.

  2. Do this a second time for the second type of tree, but instead of using a floor use the difference of the total number of points and the number created in the first step.

  3. Join and flatten those two lists - should look like this {a,a,a…,b,b,b…}

  4. List.SHuffle the series of element types to get a randomization of the list. Will become a random series of A’s and B’s, which has a total 1d length that is equal to the length of the 1D list of points. Use shortest lacing and call it a day.

Thanks. I got it to work using that but didn’t quite follow and had to fake it in at least one place - not sure what I did wrong.

The function that (I believe) should be returning a value equal to the number of points I have is taking the number of points and multiplying it by the number of types, giving me a rather large value. If it makes a difference - I have 1 family with 7 types, rather than multiple families.


The whole graph if you are so inclined.

Thanks again!