Table of Contents

Class Cylindroid

Namespace
Hi.Geom
Assembly
HiGeom.dll

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 Cylindroid

The 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

pairZRs PairZr[]

See PairZrs.

Cylindroid(XElement)

Ctor.

public Cylindroid(XElement src)

Parameters

src XElement

XML

Properties

DefaultPolarResolution2d

public static IPolarResolution2d DefaultPolarResolution2d { get; set; }

Property Value

IPolarResolution2d

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

List<PairZr>

UnitCylinder

Generate a cylindroid that height is 1 and radius is 0.5.

public static Cylindroid UnitCylinder { get; }

Property Value

Cylindroid

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

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 Box3d

Destination box

GenCylinder(double, double)

Generates a cylinder with the specified height, radius, and longitude number.

public static Cylindroid GenCylinder(double height, double r)

Parameters

height double

The height of the cylinder.

r double

The radius of the cylinder.

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 double

Resolution of latitude angle in radians

Returns

IList<PairZr>

Z-R contour data as a list of PairZr objects

GetZrList()

Gets a list of Z-R coordinate pairs.

public List<PairZr> GetZrList()

Returns

List<PairZr>

A list of PairZr objects representing Z-R coordinates.

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 string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if 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.