Visualizer: make build_hex_mesh() plain func