Class threed_objects

class o2sclpy.threed_objects

A set of three-dimensional objects

add_mat(m: material)

Add material m to the list of materials.

add_object(mesh: mesh_object, verbose: int = 0)

Add an object given ‘lv’, a list of vertices, and ‘mesh’, a mesh of triangular faces among those vertices.

Optionally, also specify the vertex normals in normals.

add_object_mat(gf: mesh_object, m: material)

Add an object given ‘lv’, a list of vertices, and ‘gf’, a group of triangular faces among those vertices, and ‘m’, the material for all of the faces.

add_object_mat_list(gf: mesh_object, lm)

Add an object given ‘lv’, a list of vertices, and ‘gf’, a group of triangular faces among those vertices, and ‘m’, the material for all of the faces.

get_mat(mat_name: str)

Get material named mat_name.

get_mat_index(m: str)

Return true if a a material named m has been added

is_mat(m: str)

Return true if a a material named m has been added

make_unique_name(prefix: str)

Using the specified prefix, create a unique name for a mesh object by adding an integer suffix from 1 to 100.

mat_list = []

List of materials

mesh_list = []

List of groups of faces

write_gltf(wdir: str, prefix: str, verbose: int = 0, rotate_zup: bool = True)

Write all objects to an ‘.gltf’ file, creating a ‘.bin’ file