mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-21 18:28:28 +00:00
Added 'sizes' class with some constants and an inches to milimeters function
This commit is contained in:
parent
152a63ee77
commit
0d7eaf89e0
@ -40,6 +40,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Sizes.cs" />
|
||||||
<Compile Include="Transforms\LinearExtrudedObject.cs" />
|
<Compile Include="Transforms\LinearExtrudedObject.cs" />
|
||||||
<Compile Include="Scripting\BlockFormatter.cs" />
|
<Compile Include="Scripting\BlockFormatter.cs" />
|
||||||
<Compile Include="Scripting\BlockStatementObject.cs" />
|
<Compile Include="Scripting\BlockStatementObject.cs" />
|
||||||
|
|||||||
22
OSCADSharp/OSCADSharp/Sizes.cs
Normal file
22
OSCADSharp/OSCADSharp/Sizes.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OSCADSharp
|
||||||
|
{
|
||||||
|
public class Sizes
|
||||||
|
{
|
||||||
|
public const double OneInch = 25.4;
|
||||||
|
public const double HalfInch = OneInch / 2;
|
||||||
|
public const double QuarterInch = HalfInch / 2;
|
||||||
|
public const double EigthInch = QuarterInch / 2;
|
||||||
|
public const double SixteenthInch = EigthInch / 2;
|
||||||
|
|
||||||
|
public double InchesToMilimeters(double inches)
|
||||||
|
{
|
||||||
|
return inches * 0.03937008;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user