Class Cylindroid
Geometry of Cylindroid.
public class Cylindroid : IStlSource, IGetStl, IMakeXmlSource, IExpandToBox3d, IGetZrContour, IDuplicate, IGetZrList, IGenStl
- 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(params PairZr[])
Ctor. The order of z values should be from small to large in general case.
public Cylindroid(params PairZr[] pairZRs)
Parameters
Cylindroid(XElement)
Ctor.
public Cylindroid(XElement src)
Parameters
src
XElementXML
Properties
DefaultPolarResolution2d
public static IPolarResolution2d DefaultPolarResolution2d { 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)
Generates a cylinder with the specified height, radius, and longitude number.
public static Cylindroid GenCylinder(double height, double r)
Parameters
Returns
- Cylindroid
A new Cylindroid representing the cylinder.
GenStl(IPolarResolution2d)
Generate a new Stl.
public Stl GenStl(IPolarResolution2d resolution)
Parameters
resolution
IPolarResolution2d
Returns
- Stl
newly created 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, bool)
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, bool exhibitionOnly)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
exhibitionOnly
boolif true, the extended file creation is suppressed.
Returns
- XElement
An XML element representing the object's state
Remarks
For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied.
The baseDirectory
is typically the folder at the nearest configuration file folder.
Since the folder can be moving with the configuration file.