trimesh.exchange.xml_based module

Functions

load_3DXML(file_obj, *args, **kwargs)

Load a 3DXML scene into kwargs.

load_XAML(file_obj, *args, **kwargs)

Load a 3D XAML file.

print_element(element)

Pretty- print an lxml.etree element.

trimesh.exchange.xml_based.load_3DXML(file_obj, *args, **kwargs)

Load a 3DXML scene into kwargs.

Parameters

file_obj (file object) – Open and containing 3DXML data

Returns

kwargs – Can be passed to trimesh.exchange.load.load_kwargs

Return type

dict

trimesh.exchange.xml_based.load_XAML(file_obj, *args, **kwargs)

Load a 3D XAML file.

Parameters

file_obj (file object) – Open, containing XAML file

Returns

result – kwargs for a trimesh constructor, including: vertices: (n,3) np.float64, points in space faces: (m,3) np.int64, indices of vertices face_colors: (m,4) np.uint8, RGBA colors vertex_normals: (n,3) np.float64, vertex normals

Return type

dict

trimesh.exchange.xml_based.print_element(element)

Pretty- print an lxml.etree element.

Parameters

element (etree element) –