Place points on surface on a new coordinates system

Hello Everybody!
I’m new here, I find there are many interesting and useful tips in this forum, and many people well prepared (for sure many better than me)
I need your help!
I need to place a grid of points with a step of 0,6 m on a surface. This grid should be placed on a new system of coordinates xy that I want Dynamo to detect, following my two vector’s direction ( see the image).

What I was able to do:
Intersect a grid of point with the surface
Define vectors
generate lines passing through the vectors (I want them to correspond to “x”, “y” coordinates system)

What I’m not able to do (and I kindly need your help):
To generate the new coordinates system xy on the vectors’ lines
Orientate the previous grid of points on this coordinates system, changing the step of the point to 0,6 meters, with the 0,0 on the new xy system.

I thank you in advance

There is a node CoordinateSystem.ByOriginVectors that will take your vectors and an origin point and create a coordinate system.

You can then use Transform to transform your point grid to the new coordinate system

1 Like

Thank you very much @Thomas_Corrie your advice was very helpful!!!

Now I am able to fix the new coordinate system, but when I run the script Dynamo gives me errors, (
something is missing. Maybe I haven’t used the code Transform in the proper way,
I tried to find in other posts an other solution from other people’s issue, but I can see everybody has a different situation…

I need your opinion if you already deal with it.

Do anybody have idea?

Thank you!

Excuse my bad translating, but it looks like the “dereferencing a non-pointer” error which is probably due to the empty list at the front of your list of points.

What is the output of the Geometry.Transform node?

Hey @Thomas_Corrie thank you very much for your quick answer!
The output at the Geometric.Transform node is “null” value.

You are right, the error must be due to the empty list in front of my points, do you have any idea how I can workaround this issue?


Use List.Clean with preserveIndices set to false to remove the empty list


Thank you again @Thomas_Corrie!
Now it works , and this is something

the only problem is that it doesn’t work how it should '-.-

Actually the grid of point didn’t move to the desired coordinate system and the z value changed.
I’m sure I’m missing something in my script, the problem is that I don’t know what it is… :confused:

I can see you have a good experience, @Thomas_Corrie, do you have suggestions regarding it?

Right now I can see it has changed, not properly in the good way '-.-
My aim is to align the points on the vector lines of the left element in the picture

You’re translating from the original coordinate system to your new coordinate system so the points then move by the same distance and direction

I’m not quite sure what you’re aiming for because we can’t see the beginnings of your graph (it would be helpful to share the dyn), but if you want the points to be on a grid on your surface that is aligned with a particular coordinate system then you could:

  • establish coordinate system
  • move surface from new coordinate system to origin
  • use PointAtParameter
  • translate points back to original surface location

Thank you @Thomas_Corrie!

Here I share my dyn.

Actually you’re right! with my new coordinates system everything changes from the original one .
My aim is to stay on the same z plane, with a rotation and translation of points (staying on the plan xy). (z=0), like I would do in autocad using ucs command.
I think I should fix the original coordinate system (the existing one), like I made for the new one.

About your suggestion, thank you for the clear synthesis!
The only thing is that I need the surface to stay at his place, because it is well placed in the project.

Position de vérins sur une grille de points8.dyn (17.6 KB)


I have had a quick look at your dyn and attach a revised version. I’m afraid I don’t have 1.3 installed so I have done this in Dynamo 2.0.3 but attach a screengrab of the nodes. Your script uses Surface.PointAtParameter with a step of 0.6 which is not the same as 0.6m spacing if that is what you want, if you look closely the points are not equally spaced in x and y. I have used 6m for convenience of display, but could easily be changed to 0.6m.

The surface would only be copied to the origin for ease of calculating minimum and maximum extents with the desired alignment, not moved permanently.

  • Define coordinate system
  • Transform surface to origin from new coordinate system
  • use bounding box to establish min/max limits of surface
  • within limits array points at desired spacing in x and y
  • check points intersection with surface and discard points not on surface
  • transform points from origin to coordinate system

It assumes the surface is level and at the height of your defined coordinate system (otherwise you’ll need to project the points onto the surface)

p.dyn (63.6 KB)

Hope this helps,

Wow Thank you @Thomas_Corrie you are a genius !
I copied it on my dyn file, the only thing is that my points don’t cover all the surface when Copying surface back to original location.
Maybe I missed something from your script… I send you here hereby so maybe you can check…
in any case thank you soooo much for your brillant intuition!

Position de vérins sur une grille de points10.dyn (25.5 KB)


Glad to be of assistance. The problem is that the lacing on Geometry.DoesIntersect is set to Auto but needs to be longest. You can see in the number of results that it is returning far fewer than you would expect

1 Like

Hey @Thomas_Corrie you are absolutely right!!!
Thank you soooo much!!!
And I confirm, you are a GENIUS!!


1 Like

@PPF I wish, but thank you anyway

Hello @Thomas_Corrie , it’s me again,
I want to ask, by chance, do you know how I can tell dynamo to place elements (points and family instance.ByPoint) on the right level in Revit (-0.35 from level 40)?

I tried to insert the node “Level.Elevation” on the z Translation, but it’s incorrect because I can see that it translates points too hight rather than placing them on the right reference plan . (which is not right cause the point are already placed on the surface in the model, the surface is placed on the 40th level, so the points are logically placed on the 40 level , which is right).

In fact the points are already in the good location with the dynamo file, but when lancing the script in Revit, Revit can’t recognize the right level of the points. The family Instances by point are not placed on the level. They have a good elevation parameter , but wrong reference plan (the z elevation is taken from the origin (0,0,0) .
Now, how can I tell Revit to place points on the the good reference level (-0.35) and not on an elevation taken from the project origin point?

Thank you in advance

For me it will be important that the family Instances are hosted by the surface
Maybe this could be helpful…

If you’re placing a face-based family then best to use FamilyInstance.ByFace rather than FamilyInstance.ByPoint. Here’s a simple example:

The face input should be the original surface. The vector input controls the direction of the family so would probably be one of the vectors you created to construct the coordinate system

1 Like

@Thomas_Corrie thank you!!!
helful as always :slight_smile: !!!