Model.copymark#
- Model.copymark(collection, name, disable_fe_geom_duplicate, copy_elems_with_surf)#
Copies entities from one collector to another.
- Parameters:
collection (Collection) – The collection containing the entities to copy. Any entity type (aside from main/secondary elements) is valid.
name (hwString) – The name of the collector to copy the entities to. The collector type is determined by the entity type of the entities in the
collection.disable_fe_geom_duplicate (int) – Parameter to disable FE geom duplicate option when copying elements. Valid values are 1 and 0. If set to 1, the option
fe_geom_duplin the preferences will be disabled for the function and FE geometry will not be created upon element duplication.copy_elems_with_surf (int) – Option to copy elements along with surfaces. Valid values are 1 and 0. If set to 1, elements associated to the original surface are copied and the newly created elements will be associated to the new surfaces.
Examples#
Copy all elements in “comp1” to “comp2”#import hm import hm.entities as ent model = hm.Model() model.copymark( collection=hm.Collection( model, ent.Element, hm.Collection(model, ent.Component, "name=comp1") ), name="comp2", disable_fe_geom_duplicate=0, copy_elems_with_surf=0, )
Copy all surfaces in “surface_mesh” component along with elements in “comp2”#import hm import hm.entities as ent model = hm.Model() model.copymark( collection=hm.Collection( model, ent.Surface, hm.Collection(model, ent.Component, "name=surface_mesh") ), name="comp2", disable_fe_geom_duplicate=1, copy_elems_with_surf=1, )