Skip to content

Cylinder3D

Class full path: NemAll_Python_Geometry.Cylinder3D

3D cylinder

Attributes

Apex: Point3D property

Get and set the apex property

LocalPlacement: AxisPlacement3D property

Get and set the local placement property

MajorRadius: float property

Get and set the major radius property

MinorRadius: float property

Get and set the minor radius property

Functions

GetApex()

Get Apex of the Cylinder in the local coordinate system

Returns:

Type Description
Point3D

Reference to Apex.

GetApexParent()

Get Apex of the Cylinder in the parent coordinate system

Returns:

Type Description
Point3D

Reference to Apex.

GetBottomCenter()

Get bottom center

Returns:

Type Description
Point3D

center of bottom base

GetCenter()

Get Center of the Cylinder

Returns:

Type Description
Point3D

Reference to Center.

GetHeight()

Get Height of the Cylinder

Returns:

Type Description
float

Reference to Height of the Cylinder.

GetLocalPlacement()

Get Local Placement

Returns:

Type Description
AxisPlacement3D

Reference to Local Placement.

GetMajorRadius()

Get Major Radius of the Cylinder

Returns:

Type Description
float

Reference to Major Radius.

GetMinMax()

Get MinMax of the Cylinder

Returns:

Type Description
MinMax3D

Reference to MinMax of the Cylinder.

GetMinorRadius()

Get Minor Radius of the Cylinder

Returns:

Type Description
float

Reference to Minor Radius.

GetSilhouetteLines(viewMatrix, bPerspective)

Get silhouette lines of cylinder

Parameters:

Name Type Description Default
viewMatrix Matrix3D

View matrix

required
bPerspective bool

Flag if it is central projection or not (true / false)

required

Returns:

Type Description
Line3DList

silhouette lines

GetTopCenter()

Get top center

Returns:

Type Description
Point3D

center of top plane

GetXAxis()

Get X-Axis of the placement of the Cylinder

Returns:

Type Description
Vector3D

Reference to X-Axis.

GetYAxis()

Get Y-Axis of the placement of the Cylinder

Returns:

Type Description
Vector3D

Reference to X-Axis.

GetZAxis()

Get Z - axis of the placement of the Cylinder

Returns:

Type Description
Vector3D

Reference to Z-axis.

IsCircular()

Circularity check of the Cylinder

Returns:

Type Description
bool

true/false

IsOblique()

Perpendicularity check of the Cylinder

Returns:

Type Description
bool

true/false

IsValid()

Validity check of the Cylinder

Returns:

Type Description
bool

true/false

SetApex(apex)

Set Apex in the local coordinate system

Parameters:

Name Type Description Default
apex Point3D

New Apex.

required

SetApexParent(apex)

Set Apex in the parent coordinate system

Parameters:

Name Type Description Default
apex Point3D

New Apex.

required

SetCenter(center)

Set center

Parameters:

Name Type Description Default
center Point3D

New center.

required

SetHeight(height)

Set Height of the Cylinder

Parameters:

Name Type Description Default
height float

New height.

required

SetMajorRadius(radius)

Set Major Radius of the Cylinder

Parameters:

Name Type Description Default
radius float

New major radius.

required

SetMinorRadius(radius)

Set Minor Radius of the Cylinder

Parameters:

Name Type Description Default
radius float

New minor radius.

required

__eq__(cylinder)

Comparison of cylinders without tolerance.

Be careful, this method work without tolerance!

Parameters:

Name Type Description Default
cylinder Cylinder3D

Compared cylinder.

required

Returns:

Type Description
object

True when cylinders are equal, otherwise false.

__init__ overload

__init__()

initialize

__init__(cylinder)

Copy constructor.

Parameters:

Name Type Description Default
cylinder Cylinder3D

Cylinder which will be copied.

required
__init__(refPlacement, radiusMajor, radiusMinor, apex)

Constructor.

Height of the cylinder is z-coordinate of the Apex.

Parameters:

Name Type Description Default
refPlacement AxisPlacement3D

Local Placement of the cylinder.

required
radiusMajor float

Major radius of the cylinder.

required
radiusMinor float

Minor radius of the cylinder.

required
apex Point3D

Center of the Top Ellipse

required
__init__(radiusMajor, radiusMinor, apex)

Constructor.

Height of the cylinder is z-coordinate of the Apex.

Parameters:

Name Type Description Default
radiusMajor float

Major radius of the cylinder.

required
radiusMinor float

Minor radius of the cylinder.

required
apex Point3D

Center of the Top Ellipse

required

__repr__()

convert the list to a string