Added Bounds.Length, Width, Height

This commit is contained in:
Michael Smith 2016-02-21 15:20:27 -08:00
parent 28bb1736e9
commit 135ab5072a
2 changed files with 19 additions and 0 deletions

View File

@ -316,6 +316,8 @@ namespace OSCADSharp
/// <summary> /// <summary>
/// Writes the script for this OSCADObject to the file specified /// Writes the script for this OSCADObject to the file specified
///
/// (This is just a shortcut for File.WriteAllLines)
/// </summary> /// </summary>
/// <param name="filePath">Path for the file to write. Including filename and (optionally) file extension</param> /// <param name="filePath">Path for the file to write. Including filename and (optionally) file extension</param>
public void ToFile(string filePath) public void ToFile(string filePath)

View File

@ -63,8 +63,24 @@ namespace OSCADSharp.Spatial
/// Z position with the smallest value /// Z position with the smallest value
/// </summary> /// </summary>
public double Z_Min { get { return TopRight.Z < BottomLeft.Z ? TopRight.Z : BottomLeft.Z; } } public double Z_Min { get { return TopRight.Z < BottomLeft.Z ? TopRight.Z : BottomLeft.Z; } }
/// <summary>
/// Size on the X axis
/// </summary>
public double Length { get { return this.X_Max - this.X_Min; } }
/// <summary>
/// Size on the Y axis
/// </summary>
public double Width { get { return this.Y_Max - this.Y_Min; } }
/// <summary>
/// Size on the Z axis
/// </summary>
public double Height { get { return this.Z_Max - this.Z_Min; } }
#endregion #endregion
#region Overrides
/// <summary> /// <summary>
/// Compares a set of bounds to another object /// Compares a set of bounds to another object
/// </summary> /// </summary>
@ -84,5 +100,6 @@ namespace OSCADSharp.Spatial
{ {
return String.Format("TR: {0}, BL: {1}", this.TopRight.ToString(), this.BottomLeft.ToString()).GetHashCode(); return String.Format("TR: {0}, BL: {1}", this.TopRight.ToString(), this.BottomLeft.ToString()).GetHashCode();
} }
#endregion
} }
} }