Model.hm_getsurfacesfromsolid#

Model.hm_getsurfacesfromsolid(solid, type='all')#

Returns the list of surface IDs associated with a specified solid.

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

  • type (hwString) – An optional string to specify which surfaces are returned. Valid values are bounding, partition, fin and all (default).

Returns:

Example#

Get a list of surfaces associated with solid of ID 1#
import hm
import hm.entities as ent

model = hm.Model()

_, result = model.hm_getsurfacesfromsolid(solid=ent.Solid(model, 1))

print("Surfaces:", [s.id for s in result.surfaces])