How to get new points offset along wall direction from point

How to get new points offset along wall direction from point

frankholidayjunior
Advocate Advocate
1,360 Views
2 Replies
Message 1 of 3

How to get new points offset along wall direction from point

frankholidayjunior
Advocate
Advocate

I have a point and want to offset in the positive and negative direction along the wall a set distance say 450mm and then create lines perpendicular from those points to an offset

 

XYZ centre = (location as LocationPoint).Point;
XYZ direction = GetDirection(wall);
return Line.CreateBound(centre, direction);

 

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

RPTHOMAS108
Mentor
Mentor
Accepted solution

I assume you've solved it now from other post? XYZ implements operators that make such things straightforward.

 

Obtain the unit vector of the direction you want to move the point:

C1 = GetDirection(wall).Normalise

Probably should already be normalised in this case but doing it again doesn't hurt (assume you used location line direction).

 

Multiply it by the distance you want to move the point in feet:

C2=C1 * 450/304.8

 

Add the vector to the original centre:

Result = centre + C2

 

To move in opposite direction

Result = centre - C2

 

 

Message 3 of 3

frankholidayjunior
Advocate
Advocate

Thanx RPThomas,

I mostly wanted to know I was on the right track to solving this problem and not doing it the difficult way.

 

0 Likes