Skip to content

Cuboid3D

Class full path: NemAll_Python_Geometry.Cuboid3D

3D cuboid

Attributes

HeightVector: Vector3D property

Get and set the height vector property

LengthVector: Vector3D property

Get and set the length vector property

RefPoint: Point3D property

Get and set the ref point property

StartPoint: Point3D property

Get and set the start point property

WidthVector: Vector3D property

Get and set the width vector property

Functions

GetBottomFacePolygon()

Get the boundary polygon of bottom face of the cuboid

Returns:

Type Description
Polygon3D

Bottom face boundary polygon

GetGroundPlane()

Get ground plane ( ref point + Z-vector ).

Returns:

Type Description
Plane3D

ground Plane3D.

GetHeight()

Get height.

Returns:

Type Description
float

Size of Z-vector ( vector3 ).

GetLength()

Get length.

Returns:

Type Description
float

Size of X-vector ( vector1 ).

GetRefPoint()

Get reference point.

Returns:

Type Description
Point3D

Reference point.

GetRelStartPoint()

Get start point in relative coordinates.

Returns:

Type Description
Point3D

Constant reference to the start point.

GetStartPoint()

Get start point in world coordinates.

Returns:

Type Description
Point3D

copy of start point.

GetTopFacePolygon()

Get the boundary polygon of top face of the cuboid

Returns:

Type Description
Polygon3D

Top face boundary polygon

GetVector(index)

Get given vector.

Parameters:

Name Type Description Default
index int

Index of the vector.

required

Returns:

Type Description
Vector3D

m_Vec[index]

GetWidth()

Get width.

Returns:

Type Description
float

Size of Y-vector ( vector2 ).

Set overload

Set(refPoint, startPoint, vec1, vec2, vec3)

Set the Cuboid.

Parameters:

Name Type Description Default
refPoint Point3D

Reference point in world coordinate system.

required
startPoint Point3D

Start point of cuboid.

required
vec1 Vector3D

X-vector.

required
vec2 Vector3D

Y-vector.

required
vec3 Vector3D

Z-vector.

required
Set(cuboid)

Initialize from cuboid.

Parameters:

Name Type Description Default
cuboid Cuboid3D

Cuboid which will be copied.

required

SetHeight(height)

Set height.

Parameters:

Name Type Description Default
height float

New size of Z-vector ( vector3 ).

required

SetLength(length)

Set length.

Parameters:

Name Type Description Default
length float

New size of X-vector ( vector1 ).

required

SetRefPoint(refPoint)

Set reference point.

Parameters:

Name Type Description Default
refPoint Point3D

New reference point.

required

SetStartPoint(startPoint)

Set start point.

Parameters:

Name Type Description Default
startPoint Point3D

New start point ( in world coordinates ).

required

SetVector(vec, index)

Set the vector.

Parameters:

Name Type Description Default
vec Vector3D

New vector.

required
index int

Index pf the vector.

required

SetWidth(width)

Set width.

Parameters:

Name Type Description Default
width float

New size of Y-vector ( vector2 ).

required

__eq__(cuboid)

Comparison of cuboids without tolerance.

Be careful, this method work without tolerance!

Parameters:

Name Type Description Default
cuboid Cuboid3D

Compared cuboid.

required

Returns:

Type Description
object

True when cuboids are equal, otherwise false.

__init__ overload

__init__()

initialize

__init__(cuboid)

Copy constructor.

Parameters:

Name Type Description Default
cuboid Cuboid3D

Cuboid which will be copied.

required
__init__(refPoint, startPoint, vec1, vec2, vec3)

Constructor.

Parameters:

Name Type Description Default
refPoint Point3D

Reference point.

required
startPoint Point3D

Start point of cuboid.

required
vec1 Vector3D

X-vector.

required
vec2 Vector3D

Y-vector.

required
vec3 Vector3D

Z-vector

required

__repr__()

convert the list to a string