Skip to content

Commit

Permalink
removed unused namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremytammik committed Jun 11, 2021
1 parent cc55834 commit 2b4f558
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions BuildingCoder/BuildingCoder/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using System.Linq;
using System.Reflection;
using WinForms = System.Windows.Forms;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
Expand Down Expand Up @@ -651,7 +650,7 @@ bool Intersect<T>(T x1, T y1,
/// case it is empty.
/// https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
/// </summary>
public static XYZ LineLineIntersection(
public static XYZ LineLineIntersection(
XYZ p1, XYZ v1, XYZ p2, XYZ v2 )
{
XYZ w = p2 - p1;
Expand Down Expand Up @@ -680,8 +679,8 @@ public static XYZ LineLineIntersection(
/// case it is empty.
/// https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
/// </summary>
public static XYZ LineLineIntersection(
Curve c1,
public static XYZ LineLineIntersection(
Curve c1,
Curve c2 )
{
XYZ p1 = c1.GetEndPoint( 0 );
Expand Down Expand Up @@ -723,7 +722,7 @@ public static XYZ LinePlaneIntersection(
XYZ planeNormal = plane.Normal;
XYZ linePoint = line.GetEndPoint( 0 );

XYZ lineDirection = (line.GetEndPoint( 1 )
XYZ lineDirection = (line.GetEndPoint( 1 )
- linePoint).Normalize();

// Is the line parallel to the plane, i.e.,
Expand All @@ -735,8 +734,8 @@ public static XYZ LinePlaneIntersection(
return null;
}

lineParameter = (planeNormal.DotProduct( planePoint )
- planeNormal.DotProduct( linePoint ))
lineParameter = (planeNormal.DotProduct( planePoint )
- planeNormal.DotProduct( linePoint ))
/ planeNormal.DotProduct( lineDirection );

// Test whether the line parameter is inside
Expand Down Expand Up @@ -1046,7 +1045,7 @@ static public Solid CreateArcSolid( Arc arc )
XYZ q = arc.GetEndPoint( 1 );
XYZ r = q - q.Z * XYZ.BasisZ;

Frame frame = new Frame( r,
Frame frame = new Frame( r,
-XYZ.BasisX, -XYZ.BasisY, XYZ.BasisZ );

Line line2 = Line.CreateBound( q, r );
Expand All @@ -1061,7 +1060,7 @@ static public Solid CreateArcSolid( Arc arc )
loops.Add( loop );

return GeometryCreationUtilities
.CreateRevolvedGeometry( frame,
.CreateRevolvedGeometry( frame,
loops, 0, 2 * Math.PI );
}

Expand Down Expand Up @@ -1325,17 +1324,17 @@ public static void ListForgeTypeIds()

// Sort properties alphabetically by name

Array.Sort( ps,
delegate( PropertyInfo p1, PropertyInfo p2 )
{ return p1.Name.CompareTo( p2.Name ); } );
Array.Sort( ps,
delegate ( PropertyInfo p1, PropertyInfo p2 )
{ return p1.Name.CompareTo( p2.Name ); } );

Debug.Print( "{0} properties:", ps.Length );

foreach( PropertyInfo pi in ps )
{
if( pi.PropertyType == typeof( ForgeTypeId ) )
{
object obj = pi.GetValue( null, null);
object obj = pi.GetValue( null, null );

ForgeTypeId fti = obj as ForgeTypeId;

Expand All @@ -1350,8 +1349,8 @@ public static void ListForgeTypeIds()

foreach( ForgeTypeId fti in specs )
{
Debug.Print( "{0}: {1}, {2}",
fti.ToString(), fti.TypeId,
Debug.Print( "{0}: {1}, {2}",
fti.ToString(), fti.TypeId,
UnitUtils.GetTypeCatalogStringForSpec( fti ) );
}

Expand All @@ -1368,8 +1367,8 @@ public static void ListForgeTypeIds()
}

#region Conditional compilation using ifdef to handle ForgeTypeId
public static double InternalUnitToMillimetres(
double a,
public static double InternalUnitToMillimetres(
double a,
bool roundup = false )
{
double mm;
Expand All @@ -1378,7 +1377,7 @@ public static double InternalUnitToMillimetres(
mm = UnitUtils.ConvertFromInternalUnits(
a, DisplayUnitType.DUT_MILLIMETERS );
#else
mm = UnitUtils.ConvertFromInternalUnits(
mm = UnitUtils.ConvertFromInternalUnits(
a, UnitTypeId.Millimeters );
#endif

Expand Down Expand Up @@ -3201,7 +3200,7 @@ public static void Delete2(
Element e )
{
object obj = doc;
MethodInfo m = obj.GetType().GetMethod(
MethodInfo m = obj.GetType().GetMethod(
"Delete", new Type[] { typeof( Element ) } );

if( m != null )
Expand All @@ -3210,7 +3209,7 @@ public static void Delete2(
}
else
{
m = obj.GetType().GetMethod(
m = obj.GetType().GetMethod(
"Delete", new Type[] { typeof( ElementId ) } );

m.Invoke( obj, new object[] { e.Id } );
Expand Down

0 comments on commit 2b4f558

Please sign in to comment.