Model.hm_getsolidshelloverlapinfo#
- Model.hm_getsolidshelloverlapinfo(source_collection, target_collection, maxproximitydistance)#
Returns information regarding proximity overlap between one or more solid cavity elements and structural components (2D mesh). For each cavity (source components), the function returns the cavity surface area, the cavity volume, and the proximity overlap area per structural component (target components).
- Parameters:
source_collection (Collection) – The collection containing the source entities. Currently supported for components entities. Only 3D elements are considered.
target_collection (Collection) – The collection containing the target entities. Currently supported for components entities. Only 2D elements are considered.
maxproximitydistance (double) – Maximum proximity distance below which the overlap is calculated.
- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data:solidComponent (Entity) - Cavity source entity coming from
source_collectionsolidSurfaceArea (double) - Cavity surface area
solidVolume (double) - Cavity volume
proximityOverlapArea (
HmQueryResultList)-Result list object containingHmQueryResultobjects with the following output data:overlapShellComponent (Entity) - Structural component (target entity coming from
target_collection)proximityAreaWithSolid (double) - The proximity overlap area per structural component (overlapShellComponent)
Example#
Get overlap information between component with ID 20 and components with ID 2 , 10 , and 13 for a proximity distance of 5.0#import hm import hm.entities as ent model = hm.Model() source_component_collection = hm.Collection(model, ent.Component, [20]) target_component_collection = hm.Collection(model, ent.Component, [2, 10, 13]) _, resultlist = model.hm_getsolidshelloverlapinfo( source_collection=source_component_collection, target_collection=target_component_collection, maxproximitydistance=5.0, ) for result in resultlist: print("Cavity:", result.solidComponent.id) print("Cavity surface area:", result.solidSurfaceArea) print("Cavity volume:", result.solidVolume) for overlap in result.proximityOverlapArea: print("\tStructural component:", overlap.overlapShellComponent.id) print( "\tProximity overlap area per structural component:", overlap.proximityAreaWithSolid, )