From 7702a5f7815c00f7b1cadf700e42d05aac0d3315 Mon Sep 17 00:00:00 2001 From: Jeremy Tammik Date: Fri, 31 Oct 2014 09:04:08 +0100 Subject: [PATCH] fixed erroneous format string and added calls to Element.GetCurve extension method --- BuildingCoder/BuildingCoder/CmdRollingOffset.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BuildingCoder/BuildingCoder/CmdRollingOffset.cs b/BuildingCoder/BuildingCoder/CmdRollingOffset.cs index eae24c2d..5c6b7912 100644 --- a/BuildingCoder/BuildingCoder/CmdRollingOffset.cs +++ b/BuildingCoder/BuildingCoder/CmdRollingOffset.cs @@ -81,7 +81,7 @@ static double GetWallThickness( Pipe pipe ) /// /// Allow selection of pipe elements only. /// - class PipeElementSelectionFilter : ISelectionFilter + public class PipeElementSelectionFilter : ISelectionFilter { public bool AllowElement( Element e ) { @@ -214,12 +214,12 @@ ICollection ids double wall_thickness = GetWallThickness( pipes[0] ); - Debug.Print( "{0} has wall thickness {1}, so can label it '{2}'", + Debug.Print( "{0} has wall thickness {1}", Util.ElementDescription( pipes[0] ), Util.RealString( wall_thickness ) ); - Curve c0 = ( pipes[0].Location as LocationCurve ).Curve; - Curve c1 = ( pipes[1].Location as LocationCurve ).Curve; + Curve c0 = pipes[0].GetCurve(); + Curve c1 = pipes[1].GetCurve(); if( !( c0 is Line ) || !( c1 is Line ) ) {