mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-21 18:28:28 +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
|
namespace OSCADSharp.Solids.Compound
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class Box : OSCADObject
|
public class Box : OSCADObject
|
||||||
{
|
{
|
||||||
@ -42,6 +42,23 @@ namespace OSCADSharp.Solids.Compound
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#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>
|
/// <summary>
|
||||||
/// Creates a box with the default initialization values
|
/// Creates a box with the default initialization values
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ using OSCADSharp.Spatial;
|
|||||||
namespace OSCADSharp.Solids.Compound
|
namespace OSCADSharp.Solids.Compound
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class Tube : OSCADObject
|
public class Tube : OSCADObject
|
||||||
{
|
{
|
||||||
@ -25,12 +25,12 @@ namespace OSCADSharp.Solids.Compound
|
|||||||
public double WallThickness { get; set; } = .1;
|
public double WallThickness { get; set; } = .1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Height of the cylinder or cone
|
/// Height of the tube
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Height { get; set; } = 1;
|
public double Height { get; set; } = 1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Radius of cylinder. r1 = r2 = r.
|
/// Radius of tube. r1 = r2 = r.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Radius
|
public double Radius
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ namespace OSCADSharp.Solids.Compound
|
|||||||
public double Radius2 { get; set; } = 1;
|
public double Radius2 { get; set; } = 1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diameter of cylinder. r1 = r2 = d /2.
|
/// Diameter of tube. r1 = r2 = d /2.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Diameter
|
public double Diameter
|
||||||
{
|
{
|
||||||
@ -101,6 +101,25 @@ namespace OSCADSharp.Solids.Compound
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#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>
|
/// <summary>
|
||||||
/// Creates a tube with the default initialization values
|
/// Creates a tube with the default initialization values
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user