From d63adbf77c7443cf511ed8930b46eb612307c8f0 Mon Sep 17 00:00:00 2001 From: Jeremy Tammik Date: Fri, 31 Oct 2014 09:03:14 +0100 Subject: [PATCH] implemented Element extension method GetCurve --- BuildingCoder/BuildingCoder/Util.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/BuildingCoder/BuildingCoder/Util.cs b/BuildingCoder/BuildingCoder/Util.cs index e8e422a1..47ad99f9 100644 --- a/BuildingCoder/BuildingCoder/Util.cs +++ b/BuildingCoder/BuildingCoder/Util.cs @@ -1065,6 +1065,26 @@ public static void Connect( } #region Extension Method Classes + public static class JtElementExtensionMethods + { + /// + /// Return the signed distance from + /// a plane to a given point. + /// + 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 { ///