Class Cylindroid
Geometry of Cylindroid.
public class Cylindroid : IStlSource, IGetStl, IMakeXmlSource, IExpandToBox3d, IGetZrContour, IDuplicate, IGetZrList
- Inheritance
-
Cylindroid
- Implements
- Inherited Members
- Extension Methods
Constructors
Cylindroid()
Initializes a new instance of the Cylindroid class with an empty list of PairZr objects.
public Cylindroid()
Cylindroid(Cylindroid)
Initializes a new instance of the Cylindroid class by copying another Cylindroid.
public Cylindroid(Cylindroid src)
Parameters
src
CylindroidThe source Cylindroid to copy from.
Cylindroid(int, params PairZr[])
Ctor. The order of z values should be from small to large in general case.
public Cylindroid(int longitudeNum = 12, params PairZr[] pairZRs)
Parameters
longitudeNum
intSee LongitudeNum.
pairZRs
PairZr[]See PairZrs.
Cylindroid(XElement)
Ctor.
public Cylindroid(XElement src)
Parameters
src
XElementXML
Properties
AngleResolution_deg
Gets or sets the angular resolution in degrees.
public double AngleResolution_deg { get; set; }
Property Value
AngleResolution_rad
Gets or sets the angular resolution in radians.
public double AngleResolution_rad { get; set; }
Property Value
LongitudeNum
Longtitude number.
public int LongitudeNum { get; set; }
Property Value
PairZrs
ZR values. The order of z values should be from small to large in general case.
public List<PairZr> PairZrs { get; set; }
Property Value
UnitCylinder
Generate a cylindroid that height is 1 and radius is 0.5.
public static Cylindroid UnitCylinder { get; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
Duplicate(params object[])
Creates a deep copy of the object, excluding any source file references.
public object Duplicate(params object[] res)
Parameters
res
object[]Optional parameters that may be needed during the duplication process
Returns
- object
A new instance that is a deep copy of the original object
ExpandToBox3d(Box3d)
Expands the destination box. This function is usually used to compute the bounding box of elements.
public void ExpandToBox3d(Box3d dst)
Parameters
dst
Box3dDestination box
GenCylinder(double, double, int)
Generates a cylinder with the specified height, radius, and longitude number.
public static Cylindroid GenCylinder(double height, double r, int longtitudeNum = 12)
Parameters
height
doubleThe height of the cylinder.
r
doubleThe radius of the cylinder.
longtitudeNum
intThe number of longitude divisions.
Returns
- Cylindroid
A new Cylindroid representing the cylinder.
GenStl()
Generate a new Stl.
public Stl GenStl()
Returns
- Stl
newly created Stl
GenStl(int, params PairZr[])
Generate a cylindroid stl.
public static Stl GenStl(int longtitudeNum = 12, params PairZr[] pairZRs)
Parameters
Returns
- Stl
cylindroid stl
GetStl()
Gets the STL geometry data.
public Stl GetStl()
Returns
- Stl
The STL geometry object
GetZrContour(double)
Gets Z-R contour data as a list of PairZr objects. The Z values should generally be ordered from smallest to largest.
public IList<PairZr> GetZrContour(double latitudeAngleResolution_rad)
Parameters
latitudeAngleResolution_rad
doubleResolution of latitude angle in radians
Returns
GetZrList()
Gets a list of Z-R coordinate pairs.
public List<PairZr> GetZrList()
Returns
MakeXmlSource(string, string)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
Returns
- XElement
An XML element representing the object's state