I’m writing a python script to overlay a voronoi tessellation onto a mesh within cubit. It appears the function “cubit.get_block_hexes()” does not work. I do:
This method gets hexes that are assigned to a block directly. If you defined the block by volumes it will have no hexes in it. There are a couple of ways around this. You could get the volumes in the blocks and then get the hexes out of the volumes.
std::vector get_volume_hexes(int volume_id);
or you could just add the hexes into the blocks (I would probably suggest the first method)
get_block_hexes( ) will return a list of hexes stored in Block . It appears you are trying to obtain a list of hexes on Volume 2. Use this function instead: