Subtracting coordinates using dynamo

Hi guys!

I’m trying to make a vector between two coordinates, but in this case, I have two lists of coordinates and, because of that, it doesn’t work to use the blocks. Does anyone know how I can do this from python script?

I need to subtract the two coordinates for each line in the list.

Can someone help me please?

To substract Points in Dynamo you’ll have to first extract the X,Y and Z-value of those points.
Something like this (I wrote it in Code Block to prevent cluttering):

xValue = Point.X(point1)-Point.X(point2);
yValue = Point.Y(point1)-Point.Y(point2);
zValue = Point.Z(point1)-Point.Z(point2);
Point.ByCoordinates(xValue,yValue,zValue);

PS: What about the node Vector.ByPoints for this question?

2 Likes

This is the way.

2 Likes