Intersect Method (Curve)


Calculates the intersection of this curve with the specified curve.

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
)
Visual Basic
Public Function Intersect ( _
	curve As Curve _
) As SetComparisonResult
Visual C++
public:
SetComparisonResult Intersect(
	Curve^ curve
)

Parameters

curve
Type: Autodesk.Revit.DBCurve
The specified curve to intersect with this curve.

Return Value

  • SetComparisonResult.Overlap - One or more intersections were encountered.
  • 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.
  • 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.

Exceptions

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

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →