Model.hm_comparegettransformationmatchstate#

Model.hm_comparegettransformationmatchstate(transformation_index, match_index)#

Returns the state of a specific transformation and match. This must be preceded by a call to a relevant hm_compareentities function.

Parameters:
Returns:

  • hwReturnStatus - Status object

  • HmQueryResult - Result object containing the output values:

    • matchState (int) - Possible return values are:

      0 - Inactive

      1 - Active

Example#

Find the state of transformation 0 and match 5 for the recursive comparison of surfaces with IDs 1 - 20 and 101 - 120#
import hm
import hm.entities as ent

model = hm.Model()

surf1 = hm.Collection(model, ent.Surface, list(range(1, 21)))
surf2 = hm.Collection(model, ent.Surface, list(range(101, 121)))

model.hm_compareinit()

model.hm_compareentitiesrecursive(
    source_surfaces=surf1,
    target_surfaces=surf2,
    tolerance=0.1,
    result_type=2,
    review_results=False,
)

_, result = model.hm_comparegettransformationmatchstate(
    transformation_index=0, match_index=5
)

match_state  = result.matchState
print("match_state ", match_state )

model.hm_compareend()