How to place points equally along a path?

Two quick questions. One I’m stuck with the other I’m curious about:

  1. I have created a logarithmic spiral using points defined by polar coordinates. Dividing the path equally was simple enough but what I'm really looking for is a way to place points equally along a the curve (as the points made to define the curve are unequally spaced). I've checked many functions of dynamo and can't seem to find what I'm looking for; dividedpath.points being the closest. Dynamo seems to be wanting a REVIT element inputed at that node but when I put in the model curve it gives the error, "Warning: No function called %get_Points on a Revit.Elements.ModelCurve that takes __array could be found" and I'm not sure how to grab the full divided path.
  2. I'd like to be able to use a formula or code block to define the mathematical function. I'm assuming some python scripting can be used in a code block? This in the long run seems to be the more powerful way to mathematically generate architecture in dynamo but where can I find a good resource for this method?
 

Sorry. Reposting Dynamo image for clarity. I edited the post but the changes were not reflected in the forum.
15-09-23 family instance issue

As long as you have a dynamo curve then something as follows should work for you, just put your curve element into the top and change the number on the far right and then you should be good to go.

 

Point along curve

 

Note: you do not need the “lst1=” line i accidentally left that in.

1 Like

Heya. It works. I will set this question to resolved once I understand how the code block is a parameter. What does “List.Count(lst)-2” do? Why is List.RemoveItematIndex needed? And how is this even a parameter to divide anything?

Firstly i best explain the arrangement of list index’s which always start at a index of “0” so if you have 40 items in a list with the last list index is at 39 not 40.

 

List count just counts the amount of items within a list.

 

The remove index is required to remove the first and last points to stop any duplication of points and also because there may be a need that you will not require them The first remove index item removes the first index item at 0. With the second remove index hhaving to remove the last item which you would think is at 40 but it is at two places below because of how list starts and because i have already taken a item away.

 

This image will show you a expanded version of my previous image to show you all the individual nodes that are used and how they are connected.

 

Expanded point along curve

 

1 Like

Super cool! Thanks for expanded the code block into nodes.

Ok. The script is working pretty well but how does one control the Z-axis thereafter? Specifying a Z height in the initial list makes the cross-product lacing go crazy but after playing with the script I will definitely need to adjust the z-offset for the grid.