How to create Bound line by start point, distance and normalized direction?

How to create Bound line by start point, distance and normalized direction?

Anonymous
Not applicable
2,594 Views
2 Replies
Message 1 of 3

How to create Bound line by start point, distance and normalized direction?

Anonymous
Not applicable

Feel like simple but i cant think how.

0 Likes
Accepted solutions (1)
2,595 Views
2 Replies
Replies (2)
Message 2 of 3

BenoitE&A
Collaborator
Collaborator
Accepted solution

So you have :

XYZ startPoint;

XYZ direction;

double distance;

 

Maybe you can compute :

direction = direction / direction.GetLength();

XYZ endPoint = startPoint+distance * direction;

 

And that's it :

Line myLine= Line.CreateBound(startPoint, endPoint);

 

But I guess now you have it you Wonder why you did ask...


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
Message 3 of 3

Anonymous
Not applicable

Thanks a lot. I love your simple solution. Lucky i have asked.. Smiley Very Happy

0 Likes