Skip to content

Commit

Permalink
iimplementing and testing custom exporter OnPolymesh method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Tammik committed May 17, 2014
1 parent 4f32148 commit 3fa1a1e
Show file tree
Hide file tree
Showing 7 changed files with 976 additions and 249 deletions.
1 change: 1 addition & 0 deletions RvtVa3c/RvtVa3c.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<Compile Include="App.cs" />
<Compile Include="Command.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Util.cs" />
<Compile Include="Va3cExportContext.cs" />
<Compile Include="Va3cFace.cs" />
<Compile Include="Va3cMaterial.cs" />
Expand Down
30 changes: 30 additions & 0 deletions RvtVa3c/Util.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Autodesk.Revit.DB;
using System;

namespace RvtVa3c
{
class Util
{
/// <summary>
/// Return a string for a real number
/// formatted to two decimal places.
/// </summary>
public static string RealString( double a )
{
return a.ToString( "0.##" );
}

/// <summary>
/// Return a string for an XYZ point
/// or vector with its coordinates
/// formatted to two decimal places.
/// </summary>
public static string PointString( XYZ p )
{
return string.Format( "({0},{1},{2})",
RealString( p.X ),
RealString( p.Y ),
RealString( p.Z ) );
}
}
}
Loading

0 comments on commit 3fa1a1e

Please sign in to comment.