# How can I delete all geometry that is more than 1 meter away from the X axis?

I can delete all geometry more than 1m away from the world origin or away from the location of an empty.

How do I delete based on distance away from the X axis line regardless of the geometry’s Y or Z value?

\HPGAMING\Users\thinsoldier\Desktop\Blender Temp Work Folder\2022 new laptop transfer\medicine for pill geometry nodes idea.blend

1 Like

can you explain it?

I guess what I don’t understand is: length is relative to what?

Position is every vertex’s [xyz]

Multiple does something that probably means “ignore the X value”

And then length measures from the position of each vertex to what exactly? It’s not intuitive to me.

Verts with a length less than 1 are selected and separated from the rest of the geometry and then the selected verts are the only ones used. I assume this is somehow faster than deleting the geometry. If so, why?

Sure! since you dont care about any changes on the x axis, only the distance from it, moving along the x axis should have no effect on the outcome. So if we take the position data and flatten it on the x axis (by scaling the position vector to zero on the x axis, but leaving the y and z axes at 1) then we can compare the length of this flattened vector. any point that is more than 1 meter away from the origin (after scaling) is within 1 meter of the x axis, along it’s entire length.

length is measuring the distance from the origin.

Either works just fine, I just started using geo nodes before the delete node was added in, and I forget it’s there sometimes, haha.

I still don’t get it.

Just to be clear, you are looking to understand how to use the distance to an axis, rather than the distance to a point, correct?

Yes. Distance to axis zero line

do you understand how to use the distance to a point?

I think so. If you have a point [x,y,z] and another point [x,y,z] like [0,0,0] then you have a vector between the 2 points and the vector has a length.

Exactly.

now, if you had a point that is at the origin: location = [0,0,0] that point is definitely on the x axis, so it’s distance to the axis is 0. if we take that same point and move it 100 meters away, along the x axis: location = 100,0,0, but it is still on the x axis.

What if we move both of those points up 1 meter? [0,0,1] and [100,0,1] are now both 1 meter away from the x axis.

so no matter what the x value, it doesn’t change the distance from the x axis.

Does that make sense?

Maybe this is more understandable by answering the first question first ( solutions should go to @SterlingRoth anyway because i just changes it a bit ):

And if you want the whole x-axis as refering object then the x coordinate is of no interest in the length because you would measure the distance to the x-axis (length) for every point at that x position… so just multiplying this with 0… or just measure to y and z. ( mult with 1 → no change)…

I’ve slept on it but I still don’t understand. My mind is failing to visualize a diagram or example or experiment that explains what is going on.

You could just select everything you want to keep, and then Select / Invert and delete.

The problem is solved. I’m just too stupid to understand how the solution actually works, which means I’m going to come crawling back here begging for help in the future for things that probably have a similar solution but I’m unaware of how to solve it myself.

is it possible to make a group ?

i mean like select one object call the group to execute it !
and apply it but how ?

thanks
happy bl