Model.includeentitiesfortransformation#

Model.includeentitiesfortransformation(transformation, source, include, flag)#

Includes connected entities like constraints while transforming other entities like components or elements. Only constraint entities are supported for “include” option currently.

Parameters:
  • transformation (hwString) – The type of transformation. Valid values are move, mirror, and scale.

  • source (EntityFullType) – The class of the source entity being transformed. Valid classes are components and elements.

  • include (EntityFullType) – The class of entity to be included while performing transformation. Currently only supported for constraints.

  • flag (int) – Flag to indicate whether to register or unregister an entity type.

Example#

Include connected constraints while moving the components#
import hm
import hm.entities as ent

model = hm.Model()

model.includeentitiesfortransformation(
    transformation="move",
    source=ent.Component,
    include=ent.Constraint,
    flag=1
)
Exclude connected Constraints while scaling the Elements#
import hm
import hm.entities as ent

model = hm.Model()

model.includeentitiesfortransformation(
    transformation="scale",
    source=ent.Element,
    include=ent.Constraint,
    flag=0
)