Intersection line and line - HiStructClient/femcad-doc GitHub Wiki

inters2 := Fcs.Geometry.Intersection.Lines2( point, vector, point, vector)

inters2 := Fcs.Geometry.Intersection.Lines2( lcs3.Origin, lcs3.Axes.X, lcs4.Origin, lcs4.Axes.X)

Output parameters:

       inters2.A1;
       inters2.B1;
       inters2.P1;
       inters2.t2;
       inters2.A2;
       inters2.B2;
       inters2.P2;

Pokud jsou mimoběžné, tak P1, P2 tvoří příčku

       inters2.Exists;

If the P1 and P2 are the same, the AB lines cross each other.

Parameters t1 and t2 are defined:

    P1 = A1 + t1 * (B1-A1)
    t1 is 0 for point A1 and 1 for B1.

    public bool AreParallel=>!Exists;

    public bool AreOrthogonal => Space.IsZero( (B1-A1).GetNormalized() | (B2-A1).GetNormalized(), Space.ZeroCurveParam);

    public bool AreColinear => AreParallel && Space.IsZeroDistance(Distance);

    public double Distance;

    public static bool IsParameterOnCurve(double parameter)
      {
       return (parameter >= 0.0 - Space.ZeroCurveParam && parameter <= 1.0 + Space.ZeroCurveParam);
      }

    public bool AreParametersOnCurves()
    	{
    	return IsParameterOnCurve(t1) && IsParameterOnCurve(t2);
    	}

    public bool AreInternalNonEndParameterOnCurve()
    	{
    		return IsInternalNonEndParameterOnCurve(t1) && IsInternalNonEndParameterOnCurve(t2);
    	}

    IsParameterOnCurve(double parameter)
      {
       return (parameter >= 0.0 - Space.ZeroCurveParam && parameter <= 1.0 + Space.ZeroCurveParam);
      }

    public static bool IsInternalNonEndParameterOnCurve(double parameter)
     {
      return (parameter >= 0.0 + Space.ZeroCurveParam && parameter <= 1.0 - Space.ZeroCurveParam);
     }