Model.hm_getgeometricthinsolidinfo#

Model.hm_getgeometricthinsolidinfo(collection, feature_angle=0.0, max_thickness=0.0, mode='simple', thinsolid_ratio=0.5)#

Identifies and returns information on thin solid surface groups. The output is a list of lists, which includes the below information.

Parameters:
  • collection (Collection) – The collection containing the entities to query. Valid entities are surfaces and solids.

  • feature_angle (double) – The maximum angle for separating solid features (default 0.0).

  • max_thickness (double) – The maximum thickness to be considered as a thin solid (default 0.0, meaning unlimited).

  • mode (hwString) – The output mode. Valid values are simple (default) and advanced. The advanced output includes the main, secondary and thickness surface group details.

  • thinsolid_ratio (double) – The ratio between the minimum (thickness) and middle (approximate width) dimensions (default 0.5).

Returns:

  • hwReturnStatus - Status object

  • HmQueryResultList - Result list object containing HmQueryResult objects with the following output data:

    • thickness (double) - The estimated thickness value.

    • entity (Entity) - The solid entity for which the information is provided or the first surface entity of the solid if input entities are surfaces.

    If mode="advanced", the result objects contain additional keys:

    • main_surfs (EntityList) - The entity list containing the main surfaces of the thin solid.

    • secondary_surfs (EntityList) - The entity list containing the secondary surfaces of the thin solid.

    • thickness_surfs (EntityList) - The entity list containing the surfaces that define the thickness of the thin solid.

Examples#

Query thin solid info on solids with IDs 1-3#
import hm
import hm.entities as ent

model = hm.Model()

solids = hm.Collection(model, ent.Solid, [1, 2, 3])
_, resultlist = model.hm_getgeometricthinsolidinfo(collection=solids)

for result in resultlist:
    print(f"Solid ID: {result.entity.id}, Thickness: {result.thickness}")
Query thin solid info on solids with IDs 1-3 using the advanced mode#
import hm
import hm.entities as ent

model = hm.Model()

solids = hm.Collection(model, ent.Solid, [1, 2, 3])
_, resultlist = model.hm_getgeometricthinsolidinfo(collection=solids, mode="advanced")

for result in resultlist:
    print(f"Solid ID: {result.entity.id}, Thickness: {result.thickness}")
    print(f"Main Surfaces: {[s.id for s in result.main_surfs]}")
    print(f"Secondary Surfaces: {[s.id for s in result.secondary_surfs]}")
    print(f"Thickness Surfaces: {[s.id for s in result.thickness_surfs]}")
Query thin solid info on surfaces with IDs 1-10 using the advanced mode#
import hm
import hm.entities as ent

model = hm.Model()

surfaces = hm.Collection(model, ent.Surface, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
_, resultlist = model.hm_getgeometricthinsolidinfo(collection=surfaces, mode="advanced")

for result in resultlist:
    print(f"Solid ID: {result.entity.id}, Thickness: {result.thickness}")
    print(f"Main Surfaces: {[s.id for s in result.main_surfs]}")
    print(f"Secondary Surfaces: {[s.id for s in result.secondary_surfs]}")
    print(f"Thickness Surfaces: {[s.id for s in result.thickness_surfs]}")