 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.) Parents
• 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);
}
}  • • • 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);
}
}  • • Children