Curve Parameterisation

This is part 2 of Scott Conover's AU 2009 class on analysing building geometry.

Curves in the Revit API can be described as mathematical functions of an input parameter 'u', where the location of the curve at any given point in XYZ space is a function of 'u'. In Revit, the parameter can be represented in two ways:

The methods Curve.ComputeNormalizedParameter and Curve.ComputeRawParameter automatically scale between the two parameter types. The method Curve.IsInside evaluates a raw parameter to see if it lies within the bounds of the curve.

You can use the parameter to evaluate a variety of properties of the curve at any given location:

All of the vectors returned are non-normalized. You can normalize any vector in the Revit API with XYZ.Normalize.

Note that there will be no value set for the normal and binormal vector when the curve is a straight line. You can calculate a normal vector to the straight line in a given plane using the tangent vector.

In the next post of this series, we will look at an example using the tangent vector to the wall location curve to find exterior walls that face south.