Model.hm_issurfacemappable#

Model.hm_issurfacemappable(surface, element_size)#

Checks whether the given surface can be mapped or not and returns the map shape and vertices of the shape.

The output consists of an integer defining the map shape, and a list of vertices for map shapes other than circular.

0 - If the shape is not mappable

1 - If the map shape is triangular

2 - If the map shape is rectangular

3 - If the map shape is pentagonal

4 - If the map shape is circular

Parameters:
  • surface (Entity) – The object describing the surface entity to query.

  • element_size (double) – The element size of interest for the surface.

Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • mapability (int)

    • vertices_list (numpy.ndarray)

Example#

Check if surface with ID 1 is mappable with size 2.5#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_issurfacemappable(surface=ent.Surface(model, 1), element_size=2.5)

print("mapability", result.mapability)
print("vertices_list", result.vertices_list)