 # Bisector between two 3D lines

I need to locate a CS point at the intersection of two 3D lines that are not in the same plane. The CS point needs to be rotated (around Z) half of the angle of the two 3D lines. in other words it needs to be half the angle of the bearing difference of the two .3D lines. please also refer to bisector.dgn link below, this is a bisector script but it calculates the half angle of 3d lines in any direction

/cfs-file/__key/communityserver-discussions-components-files/360/bisector.dgn

this image shows the CS rotated half the bearing angle between the two lines. looking in plan regardless of lines being 2D or 3D

( bearing is the horizontal angle between the direction of an object and another object, or between it and that of true north.) • Hi Richard,

I think I understand what you are looking for, I could have a look later in the week but I thought I would share a video I did for some facade panels as in example of measuring angels etc. It might give you some clues on how to get it to project onto a common plane regardless of the 3d nature of the lines.

https://youtu.be/r1LvlHbhfig

Hope that helps a bit.

Thanks

Wayne

• • Hi Richard

Is this what you are referring to when you say rotated around the Z? Its taking the original curve and flattening it on a XY plane, then repeating the same operation.

Stuart   • • •   • • • Here a Version using a sheared CS.

function (PolyLine P_track)
{
for (int i = 1; i < P_track.Vertices.Count-1 ; ++i)
{
Point dir_point = new Point(this);
CoordinateSystem shear_cs = new CoordinateSystem(this);
shear_cs.ByOriginPrimarySecondaryDirections(P_track.Vertices[i],P_track.Vertices[i-1],AxisOption.X,P_track.Vertices[i+1],AxisOption.Y,TransformOption.Sheared);
double x1 = shear_cs.ShearAngle/2;
dir_point.ByCartesianCoordinates(shear_cs,1,1,0);
Line angle_line = new Line(this);
angle_line.ByStartPointDirectionLength(P_track.Vertices[i],dir_point, 10);
}
}  • • 