Intersect Method (Curve, IntersectionResultArray)


Calculates the intersection of this curve with the specified curve and returns the intersection results.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public SetComparisonResult Intersect(
	Curve curve,
	out IntersectionResultArray resultArray
)
Visual Basic
Public Function Intersect ( _
	curve As Curve, _
	<OutAttribute> ByRef resultArray As IntersectionResultArray _
) As SetComparisonResult
Visual C++
public:
SetComparisonResult Intersect(
	Curve^ curve, 
	[OutAttribute] IntersectionResultArray^% resultArray
)

Parameters

curve
Type: Autodesk.Revit.DB Curve
The specified curve to intersect with this curve.
resultArray
Type: Autodesk.Revit.DB IntersectionResultArray %
Provides more information about the intersection.

Return Value

  • SetComparisonResult.Overlap - One or more intersections were encountered. The output argument has the details.
  • SetComparisonResult.Subset - The inputs are parallel lines with only one common intersection point, or the curve used to invoke the intersection check is a line entirely within the unbound line passed as argument curve. If the former, the output argument has the details of the intersection point.
  • SetComparisonResult.Superset - The input curve is entirely within the unbound line used to invoke the intersection check.
  • SetComparisonResult.Disjoint - There is no intersection found between the two curves.
  • SetComparisonResult.Equal - The two curves are identical.

Remarks

The array of the intersection results contains one entry for each point where curves intersect. The following is the meaning of IntersectionResult members:
  • XYZPoint is the evaluated intersection point
  • UVPoint.U is the unnormalized parameter on this curve (use ComputeNormalizedParameter to compute the normalized value).
  • UVPoint.V is the unnormalized parameter on the specified curve (use ComputeNormalizedParameter to compute the normalized value).

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when the specified curve is a null reference ( Nothing in Visual Basic) .
Autodesk.Revit.Exceptions InvalidOperationException Thrown when failed to calculate the intersection.

See Also