Model.hm_getelementvolumes#
- Model.hm_getelementvolumes(collection)#
Returns lists of shell element volumes and baffle elements in each volume.
- Parameters:
collection (Collection) – The collection containing the input entities. Currently only valid for elements.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:volumesWithRespectiveBaffleElements (
HmQueryResult)-Result object containing the following output data:infoString (str)
values (
HmQueryResultList)-Result list object containingHmQueryResultobjects with the following output data:
foldedElements (
HmQueryResult)-Result object containing the following output data:infoString (str)
elements (Entity) - Entity Type:
Element
duplicateElements (
HmQueryResult)-Result object containing the following output data:infoString (str)
elements (Entity) - Entity Type:
Element
nonManifoldNodes (
HmQueryResult)-Result object containing the following output data:infoString (str)
nodes (Entity) - Entity Type:
Node
freeEdges (
HmQueryResult)-Result object containing the following output data:infoString (str)
values (
HmQueryResultList)-Result list object containingHmQueryResultobjects with the following output data:nodePairs (EntityList) - Entity Type:
Node
nonManifoldEdges (
HmQueryResult)-Result object containing the following output data:infoString (str)
values (
HmQueryResultList)-Result list object containingHmQueryResultobjects with the following output data:nodePair (EntityList) - Entity Type:
Node
Example#
Get the list of volumes and baffles for displayed elements#import hm import hm.entities as ent model = hm.Model() element_collection = hm.CollectionByDisplayed(model, ent.Element) _, result = model.hm_getelementvolumes(collection=element_collection) volumes_baffled_elems = result.volumesWithRespectiveBaffleElements print( "volumesWithRespectiveBaffleElements - info string:", volumes_baffled_elems.infoString, ) for v in volumes_baffled_elems.values: print("Volume Elements:", [e.id for e in v.volumeElements]) print("Baffled Elements:", [e.id for e in v.baffleElements])