Skip to content

Commit

Permalink
implemented Element extension method GetCurve
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Tammik committed Oct 31, 2014
1 parent 4bbf328 commit d63adbf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions BuildingCoder/BuildingCoder/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,26 @@ public static void Connect(
}

#region Extension Method Classes
public static class JtElementExtensionMethods
{
/// <summary>
/// Return the signed distance from
/// a plane to a given point.
/// </summary>
public static Curve GetCurve( this Element e )
{
Debug.Assert( null != e.Location,
"expected an element with a valid Location" );

LocationCurve lc = e.Location as LocationCurve;

Debug.Assert( null != lc,
"expected an element with a valid LocationCurve" );

return lc.Curve;
}
}

public static class JtPlaneExtensionMethods
{
/// <summary>
Expand Down

0 comments on commit d63adbf

Please sign in to comment.