CuboidFace

class CuboidFace[source]

Bases: object

CuboidFace for a single Cuboid.

Parameters
a : int

Node of the CuboidFace.

b : int

Node of the CuboidFace.

c : int

Node of the CuboidFace.

d : int

Node of the CuboidFace.

Usage example
edge = CuboidFace(0, 1, 2, 3)

Methods

from_json

Convert list of integers to CuboidFace.

to_json

Convert the CuboidFace to list.

tolist

Convert CuboidFace to list.

Attributes

a

b

c

d

classmethod from_json(data)[source]

Convert list of integers to CuboidFace. Read more about Supervisely format.

Parameters
data : List[int, int, int, int]

List of integers.

Returns

CuboidFace object

Return type

CuboidFace

Raises

ValueError if data have not 4 indices

Usage example
new_edge = CuboidFace.from_json([0, 1, 2, 3])
to_json()[source]

Convert the CuboidFace to list. Read more about Supervisely format.

Returns

List of integers

Return type

List[int, int, int, int]

Usage example
edge = CuboidFace(0, 1, 2, 3)
edge_json = edge.to_json()
print(edge_json)
# Output: [0, 1, 2, 3]
tolist()[source]

Convert CuboidFace to list.

Returns

List of integers.

Return type

List[int, int, int, int]

Usage example
edge = CuboidFace(0, 1, 2, 3)
print(edge.tolist())
# Output: [0, 1, 2, 3]
property a
property b
property c
property d