Model.solidmap_solids_set_mapface#

Model.solidmap_solids_set_mapface(point_id1, point_id2, point_id3, point_id4)#

Sets the surface shared by the 4 input vertices to the mapped type with the input vertices as the corners. The 4 vertices must be distinct. If more than one surfaces share the 4 vertices, the resulting surface for type setting is random. The function has effect only for surfaces for which the mesh type is free to change (for example, not an along face of a solid). This function can only be called between the Model.solidmap_solids_begin() and Model.solidmap_solids_end() function pair.

Parameters:
  • point_id1 (int) – The ID of the first corner vertex.

  • point_id2 (int) – The ID of the second corner vertex.

  • point_id3 (int) – The ID of the third corner vertex.

  • point_id4 (int) – The ID of the fourth corner vertex.

Example#

Mesh the solids with IDs 32 and 41 with a default elem size of 2.0 except on the surface shared by the points with IDs 10, 11, 12 and 13 which is to be of mapped type by these points#
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_mapface(
    point_id1=10, point_id2=11, point_id3=12, point_id4=13
)
model.solidmap_solids_end()