Model.createsolidsfromshells#
- Model.createsolidsfromshells(input_collection, output_collection, comp_create_option=0, solid_layers=0, fill_gaps=0, delete_shells=0, property_create=0, reserved1=0, reserved2=0, reserved3=0)#
Creates solid elements from shell elements. This API currently works only on composite ply-based models for OptiStruct/Nastran and Abaqus. Zone-based models are not supported, nor are metallic models.
- Parameters:
input_collection (Collection) – The collection that holds the shell elements. Valid entities are plies and laminates.
output_collection (Collection) – The collection containing the newly created solid elements.
comp_create_option (int) –
Organization method for newly created solid elements:
0 - Current component.
1 - Create a new component for each ply (valid only if entity_type is set to plies and solid_layers is set to 0).
2 - Create a new component for all solid elements created.
solid_layers (int) –
Valid if entity_type is set to plies only:
0 - Create solids for each layer.
1 - Create single solids for all layers.
fill_gaps (int) –
0 - Gaps between layers will not be filled.
1 - Gaps between layers filled with solids.
delete_shells (int) –
0 - Keep input shell elements.
1 - Delete input shell elements.
property_create (int) –
0 - No properties created/assigned for created solids.
1 - An appropriate property will be created and assigned to the solid elements.
reserved1 (unsigned int) – Reserved for future use. Must be set to 0.
reserved2 (double) – Reserved for future use. Must be set to 0.
reserved3 (double) – Reserved for future use. Must be set to 0.
Example#
Convert all shell elements in a ply named “ Ply3 “ to solids , create solids for each layer , without fill the gaps between layers . A new component and appropriate property should be created and assigned to the solids , delete the exist shells#import hm import hm.entities as ent model = hm.Model() plies = hm.Collection(model, ent.Ply, "name=Ply3") solids = hm.Collection(model, ent.Element, populate=False) model.createsolidsfromshells( input_collection=plies, output_collection=solids, comp_create_option=0, solid_layers=0, fill_gaps=1, delete_shells=1, property_create=1, reserved1=0, reserved2=0, reserved3=0, )