Home › Forums › Problems and solutions in GDL › Others › BasicGeometricCalc Intersect_circle_line bad results › Reply To: BasicGeometricCalc Intersect_circle_line bad results
July 16, 2019 at 16:14
#4849
Péter Baksa
Keymaster
Hi John,
The vector is not the endpoint of the vector, just the vector itself. So in your case if (0.5, 0) and (0.5, 1) are two points on the line, the vector is (0, 1).
BasicGeometricCalc can return the unit vector between two points:
call "BasicGeometricCalc" parameters iFunction = 1,
Point1X = toX, Point1Y = toY, Point1Z = toZ,
Point2X = fromX, Point2Y = fromY, Point2Z = fromZ,
returned_parameters Vx, Vy, Vz, distance
Vx, Vy, Vz will be the unit vector, and distance will be the distance between Point1 and Point2.
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE