How to make a translation vector based on a line?

I have two lines in 3D space: one that’s tacked to a block and one that’s in free space.

I would like to translate the block to the free space, utilizing both lines and creating a translation vector. Unfortunately due to the nature of the project, I cannot attach files.

Does anyone have any idea how to go about this? Do I translate point start to point start and point end to point end?

TIA

Why can’t you create a simplified version / use some other geometry and upload it?

1 Like

I don’t understand how this is supposed to work geometrically. Do you want to align the block using the two lines as guides? That won’t work. You need three points.

1 Like

Using 3 points…

1 Like

Yes. This or the Triangle Mapping component. It’s what it is there for.

test.3dm (164.8 KB)

I suppose this is a good summary of kind of what I want to do. And I followed a reply by HS_Kim which seemed to work: Translation of object to set of vectors - #2 by HS_Kim

However, this idea did not work for me T _ T

I think it’s what Volker mentioned with regards to the 3 point thing so, I’ll look into that! Thank you.

This turned out super helpful (I ended up adapting the entire thing to suit my code) so thank you!

Sorry, am back as now, doing this to another part of the model has failed to work, somehow, my geoms are flying all over the place. If it’s a plane > plane translation, why is my origins not matching?

Post some code.

truncated code.gh (84.7 KB)
I only have this, if it doesn’t make sense it’s because they’re oriented to some other geoms which I can’t disclose. But basically when I press the flipper to False, geoms fly all over the place…(Not at the plane?)