Class ExtendedCylinder
public class ExtendedCylinder : IStlSource, IGetStl, IExpandToBox3d, IGetZrContour, IDuplicate, IGetZrList, IGenStl, IMakeXmlSource, IToXElement
- Inheritance
-
ExtendedCylinder
- Implements
- Inherited Members
- Extension Methods
Constructors
ExtendedCylinder()
public ExtendedCylinder()
ExtendedCylinder(double, Func<PairZr>)
public ExtendedCylinder(double fullLength, Func<PairZr> beginPairZrSource = null)
Parameters
ExtendedCylinder(XElement)
Initializes a new instance of the ExtendedCylinder class from XML data.
public ExtendedCylinder(XElement src)
Parameters
src
XElementThe XML element containing extended cylinder data.
Properties
BeginPairZrSource
public Func<PairZr> BeginPairZrSource { get; set; }
Property Value
Cylindroid
public Cylindroid Cylindroid { get; }
Property Value
FullLength
public double FullLength { get; set; }
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
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.
ToXElement()
Get the XElement to represent the object.
public XElement ToXElement()