geom
Geometric utilities for Revit.
Attributes
Functions:
intersect_curves(curve1, curve2)
Intersects two curves on any engine and host API generation.
Hosts still shipping the Curve.Intersect(Curve, ref array) overload
marshal the out-param engine-specifically (explicit clr.Reference
under IronPython, direct tuple under CPython/pythonnet). Revit 2026+
removed that overload in favor of Curve.Intersect(Curve,
CurveIntersectResultOption), detected here by TypeError fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
curve1
|
Curve
|
first curve |
required |
curve2
|
Curve
|
second curve |
required |
Returns:
| Type | Description |
|---|---|
tuple[SetComparisonResult, list[XYZ] | None]
|
comparison result, and the intersection points (None when the curves do not intersect). |
Source code in pyrevitlib/pyrevit/revit/geom.py
convert_point_coord_system(rvt_point, rvt_transform)
Return coordinates of point in another coordinate system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rvt_point
|
XYZ
|
Revit point |
required |
rvt_transform
|
Transform
|
Revit transform for target coord system |
required |
Returns:
| Type | Description |
|---|---|
XYZ
|
Point coordinates in new coordinate system. |