Model.seatfoamdeformer#
- Model.seatfoamdeformer(foamcompsCollection, dummycompsCollection, fixednodesCollection, displacementdirectionratio=hwTriple(0.3, 0.0, -0.7), createrefgeom=1)#
Deforms the seat foam and updates the nodes of the selected seat foam components. The seat foam components must contain solid elements. The final configuration is obtained by displacing the appropriate dummy components in a specified direction. The fixed nodes on the foam need to be specified as well.
- Parameters:
foamcompsCollection (Collection) – The collection containing the component entities to be deformed.
dummycompsCollection (Collection) – The collection containing the component entities used to deform the selected component entities.
fixednodesCollection (Collection) – The collection containing the node entities on the selected foam components.
displacementdirectionratio (hwTriple) – The direction in which the dummy components are displaced to deform the foam components. The default vector is
[0.3, 0.0, -0.7].createrefgeom (unsigned int) – The option that specifies whether the reference geometries of the foam components need to be created or not. Valid values are 0 and 1. (default)
Examples#
Deform the seat foam component with ID 1 use a dummy component with ID 2 and fixed nodes on the foam with IDs range from 1000 - 1005 use the default settings#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the deformed components deformed_components = hm.Collection(model, ent.Component, [1]) # Creating a collection that contains the deforming components deforming_components = hm.Collection(model, ent.Component, [2]) # Creating a collection that contains the fixed nodes of the deformed components filter_nodes = hm.FilterByEnumeration(ent.Node, list(range(1000, 1006))) nodes_collection = hm.Collection(model, filter_nodes) model.seatfoamdeformer( foamcompsCollection=deformed_components, dummycompsCollection=deforming_components, fixednodesCollection=nodes_collection, )
Deform the seat foam component with ID 1 use a dummy component with ID 2 and fixed nodes on the foam with IDs range from 1000 - 1005 in the direction[0.4 , -0.2 , -1.0 ]without create the reference geometries#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the deformed components deformed_components = hm.Collection(model, ent.Component, [1]) # Creating a collection that contains the deforming components deforming_components = hm.Collection(model, ent.Component, [2]) # Creating a collection that contains the fixed nodes of the deformed components filter_nodes = hm.FilterByEnumeration(ent.Node, list(range(1000, 1006))) nodes_collection = hm.Collection(model, filter_nodes) model.seatfoamdeformer( foamcompsCollection=deformed_components, dummycompsCollection=deforming_components, fixednodesCollection=nodes_collection, displacementdirectionratio=[0.4, -0.2, -1.0], createrefgeom=0, )