Does any one have this problem when use hexagronal_prism?

I build a hexagonal,its a region.then I put a lattice in it,when it was plotted to a PNG format picture,I got a mistake.It seems to say that this hex function was not closed in xy plane.Besides,does this function can only get a hex direct to z axis?or maybe I should build six planes …

The Plot.from_geometry method tries to figure out a bounding box for the geometry that you pass it. However, if you have a cell that is bounded by a non-axis-aligned plane (as is needed for a hexagaonal prism), it’s not smart enough to determine a bounding box. In this case, you’ll have to manually create a Plot object and assign it attributes (see here for example).

1 Like