Copying a set of points to another set of points

Hello.
I am trying to put a grid of points on a surface that can be selected from Revit. The important thing is that I want the points to be at a specific distance from the start point of the surface’s horizontal edge, which I call the A set. After creating the A set, I want the A set to be copied or multiplied to another set of points that are on the surface’s vertical edge from the start point of the vertical edge with a specific distance, which I call the B set. To cut it short I want the A set to be copied to the B set.

What solutions are possible for the rest of the node scripts to solve this issue?

Nodes:


Surface:
Target:

Hi @farbod_bvb ,

When you already know the X,Y and Z-values of your points you could do something like this:

1 Like

Thank you, Daan,
but my points’ coordinates rely on the surface’s edge that can be selected from a Revit project, which is being divided into a desired segment length from the start point of the line, so if the length of the edge changes, the last segment might not be equal to the other segments. This is true on both of the edges, Vertical and Horizontal.

Another thing is that the selected face might be located on be on the Y/Z or it might have X/Y/Z coordinates or the face’s edge might be an arc. It depends on the form, the length and the position of the face at the coordinate system.

I see, you could however approach a surface, even a curved one, in the same way.
Using, for example, the Surface.PointAtParameter node you could place points (transformed to parameters along your edges) as parameter-values (from 0 to 1).

The method I showed you is one of many.

1 Like

My first suggestion would be to echo @Daan and use PointAtParameter to create the whole array based on U,V locations. If that’s not possible you could create Lines at each point (as long as you know their direction) and find the intersections.

2 Likes

The second suggestion of yours is very productive and useful, Thank you.

thank you @Nick_Boyts and @Daan. UV’s is the best solution, however, my issue with UVs is that I cannot determine the distance between lines of Us and Vs and it doesn’t have properties of Autocad’s measure command.
Is it possible to determine the distance between lines of Us and Vs. I don’t want them to divide a surface into equal divisions, I need equal segment length, and if the final part is not equal to other segments it would not be important.

We’d likely have to know how you’re initially getting the edge points, but you should be able to base it off the same logic. The difference between equal divisions and equal segments is just in how you create your U,V sequences.

Is it possible to determine the distance between Us or Vs?
if it is possible, can show me how? with regard to the measure like behavior?

UVs are relative to the geometry, meaning they range from 0 to 1. You don’t really use a length directly when dealing with UVs. You would convert the length to relative parameter or percentage of the geometry.

Just like you can use PointAtParameter to define a point at a given relative location, you can go the opposite direction with UVParameterAtPoint to get the relative UV location from a given point. So in your case you would get the parameters from the points and then create a new UV array using those parameters.

1 Like

I would recommend you find the points based on length first, pretty much as you are. However you should have only one continuous list of nodes for the isocurves and point generation, which can readily be accomplished by list lacing and levels. Those extra nodes are costing you in performance, which may not yet be an issue but it will as things scale.

That said, with a surface and some points:

  • Surface.UVParameterAtPoint will let you know what the UV value of each point is.

  • Pull the U and V values from the respective sub lists.

  • Surface.PointAtParameter will allow you to readily generate the rest of the points.

2 Likes

Done. Beautiful.
Thank you @Daan , @Nick_Boyts , @jacob.small for your time and help.