#!conda env update -f ../environment.yml
import os
import topogenesis as tg
import trimesh as tm
import numpy as np
import pyvista as pv
# convert trimesh to pv_mesh
def tri_to_pv(tri_mesh):
faces = np.pad(tri_mesh.faces, ((0, 0),(1,0)), 'constant', constant_values=3)
pv_mesh = pv.PolyData(tri_mesh.vertices, faces)
return pv_mesh
# set the size of the voxels
vs = 3.6
unit = [vs, vs, vs]
mesh_path = os.path.relpath('../data/new_envelope.obj')