Geometry nodes - how do i determine the x position of a tangent

Heey Blender users,

i have a question about geometry nodes.

I want to determine the position of the x axis based on the Bezier spline tangent i have drawn.

the values in the upper corner are the x position of the spline tangent or point… and if i bring the exact same values over the mesh circle fits perfectly to close the gap…

Is there a way to automatically let it calculate… for when i draw a Bezier spline again it will calculates the position of it.

for as far i know in my head 0 is the center position so it needs to calculate from 0 to the spline position right ?

With kind of regards Les!

Not sure I got what you mean, but there’s a curve handle positions node that you can pipe into a separate XYZ node and retrieve the x position this way

i did try that but the problem is, i need to get the attributes of the geometry input because that’s the spline i have drawn, The mesh circle would need to have a size based of the position of that spline

Sure, capture/store a float attribute on the point domain with the x position of every point handle, use a field at index node on the resulting attribute to target the last point’s data (index=-1) and pipe it into your circle radius.

Actually on second thought you don’t even need to capture the attribute, you just need a field at index node

Thanks i’ll try that and see if that does solve my problem :smiley: but i did try the capture methode but it did’nt do anything at all…

Maybe my knowledge is just lacking like alot, and need a good learning method and way of what and how things do and react and why

Field at index extracts a value from an attribute at a specific element (point, edge, face…). You specify what’s the index of the element you want to extract it from and it returns it to you as output. If you’re using a spline as a sort of lathe profile, and you want to know the x position of a point, you use field at index on that spline, specify the point index (first point in spline=0) and plug in the attribute you want to look up, in your case using a position node separated into XYZ. The output value of field at index should be the position of your first point.

Heey Hadriscus,

Sorry for the late reply i did somehow fix it a little with capture attribute because the field at index did give me nothing…

I did succeed the place my mesh circle in the exact middle position everytime… but it still has some small scaling issues on some curve drawings.

most of them are going oké with a small error between 0 -1 max and not like 10 in value most of the time it’s 0.2 - 0.5

Underneath you can see what i did

I’m almost to the point where i want to be if i can draw a spline and the mesh circle fits always perfect for every shape then my goal is accomplished

Also a lot of thanks for helping me out on this post previous answers made me think from another perspective

The range node is a node that calculates the values of the xyz in range position