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: 24.0.0.0 (24.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.DBCurve
The specified curve to intersect with this curve.
resultArray
Type: Autodesk.Revit.DBIntersectionResultArray%
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

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException Thrown when the specified curve is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsInvalidOperationException Thrown when failed to calculate the intersection.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →