Model.scale_thickness#

Model.scale_thickness(collection, add=0, multiply=0, MaxThickness=0, MinThickness=0)#

Scales the thickness and sets the scaled thickness back to entity. This functionality is currently supported only in the Radioss and LS-DYNA user profiles.

Parameters:
  • collection (Collection) – The collection containing the entities to be scaled. Currently it is only supported for element entities.

  • add (double) – The value to add to the thickness of each entity. To subtract, use a negative value. If not specified, multiply must be used.

  • multiply (double) – The value to multiply the thickness of each entity by. To divide, use a value less than one. If not specified, add must be used.

  • MaxThickness (double) – Used to limit the maximum thickness. Not mandatory.

  • MinThickness (double) – Used to limit the minimum thickness. Not mandatory.

Examples#

Add 2.0 to the exist thickness of all elements in the model , with a minimum thickness of 10.0 and a maximum thickness of 20.0#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains all the elements
elements_collection = hm.Collection(model, ent.Element)

model.scale_thickness(
    collection=elements_collection, add=2.0, MaxThickness=20.0, MinThickness=10.0
)
Multiply the elements with IDs 15 - 17 thicknesses by 0.5#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements to scale
filter_elements = hm.FilterByEnumeration(ent.Element, list(range(15, 18)))
elements_collection = hm.Collection(model, filter_elements)

model.scale_thickness(collection=elements_collection, multiply=0.5)
Subtract 2.0 from the thickness of all elements#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains all the elements
elements_collection = hm.Collection(model, ent.Element)

model.scale_thickness(collection=elements_collection, add=-2.0)