mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-11 21:48:34 +00:00
Added a couple new constructors and updated comments on new box / cube classes.
This commit is contained in:
parent
c7a992cb6d
commit
b48d57cf39
@ -8,7 +8,7 @@ using OSCADSharp.Spatial;
|
||||
namespace OSCADSharp.Solids.Compound
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a four-sided container, by default it has a solid bottom and an open top.
|
||||
/// A four-sided container, by default it has a solid bottom and an open top.
|
||||
/// </summary>
|
||||
public class Box : OSCADObject
|
||||
{
|
||||
@ -42,6 +42,23 @@ namespace OSCADSharp.Solids.Compound
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// A new Box object with custom configuration specified
|
||||
/// </summary>
|
||||
/// <param name="length"></param>
|
||||
/// <param name="width"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <param name="wallThickness"></param>
|
||||
/// <param name="center">Indicates whether the cube should be centered on the origin</param>
|
||||
public Box(double length = 1, double width = 1, double height = 1, double wallThickness = .1, bool center = false)
|
||||
{
|
||||
this.Size.X = length;
|
||||
this.Size.Y = width;
|
||||
this.Size.Z = height;
|
||||
this.WallThickness = wallThickness;
|
||||
this.Center = center;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a box with the default initialization values
|
||||
/// </summary>
|
||||
|
||||
@ -8,7 +8,7 @@ using OSCADSharp.Spatial;
|
||||
namespace OSCADSharp.Solids.Compound
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a cylindrical container, by default it has a solid bottom and an open top.
|
||||
/// A cylindrical container, by default it has a solid bottom and an open top.
|
||||
/// </summary>
|
||||
public class Tube : OSCADObject
|
||||
{
|
||||
@ -25,12 +25,12 @@ namespace OSCADSharp.Solids.Compound
|
||||
public double WallThickness { get; set; } = .1;
|
||||
|
||||
/// <summary>
|
||||
/// Height of the cylinder or cone
|
||||
/// Height of the tube
|
||||
/// </summary>
|
||||
public double Height { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Radius of cylinder. r1 = r2 = r.
|
||||
/// Radius of tube. r1 = r2 = r.
|
||||
/// </summary>
|
||||
public double Radius
|
||||
{
|
||||
@ -56,7 +56,7 @@ namespace OSCADSharp.Solids.Compound
|
||||
public double Radius2 { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Diameter of cylinder. r1 = r2 = d /2.
|
||||
/// Diameter of tube. r1 = r2 = d /2.
|
||||
/// </summary>
|
||||
public double Diameter
|
||||
{
|
||||
@ -101,6 +101,25 @@ namespace OSCADSharp.Solids.Compound
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// Creates a tube with the specified dimensions / configuration
|
||||
/// </summary>
|
||||
/// <param name="diameter"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <param name="wallThickness"></param>
|
||||
/// <param name="bottom"></param>
|
||||
/// <param name="top"></param>
|
||||
/// <param name="center"></param>
|
||||
public Tube(double diameter, double height, double wallThickness = .1, bool bottom = false, bool top = false, bool center = false)
|
||||
{
|
||||
this.Diameter = diameter;
|
||||
this.Height = height;
|
||||
this.WallThickness = wallThickness;
|
||||
this.Bottom = bottom;
|
||||
this.Top = top;
|
||||
this.Center = center;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a tube with the default initialization values
|
||||
/// </summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user