Model.solidmap_solids_set_density#

Model.solidmap_solids_set_density(edge_collection, den)#

This function is for setting the per edge elem density for solid map meshing. The density value specified is only a target value. Depending on solvability, the resulting mesh may take on a modified value. This function can only be called between the Model.solidmap_solids_begin() and Model.solidmap_solids_end() function pair.

Parameters:
  • edge_collection (Collection) – The collection containing the line entities to set the element density for.

  • den (int) – The value to set the density to for the slected line entities.

Example#

Mesh the solids with IDs 32 and 41 with a default elem size of 2.0 except on edges with IDs 2 and 4 which should have an element desnisty of 1.0#
import hm
import hm.entities as ent

model = hm.Model()

model.solidmap_solids_begin(collection=hm.Collection(model,ent.Solid,[32,41]),options=0,elem_size=2.0)
model.solidmap_solids_set_density(edge_collection=hm.Collection(model,ent.Line,[2,4]),den=1.0)
model.solidmap_solids_end()