Model.hm_xformnodetolocal#

Model.hm_xformnodetolocal(node, system)#

Returns the coordinates of node relative to the coordinate system system.

This is useful for finding distances relative to local coordinate systems.

Parameters:
  • node (Entity) – The object describing the node entity.

  • system (Entity) – The object describing the system entity. The x, y, and z values should be given relative to the local coordinate system . If system is a cylindrical system, r, t, and z must be used for x, y and z. If system is a spherical system, r, t, and p must be used for x, y and z.

Returns:

Example#

Get the coordinates of node with ID 50 relative to system with ID 5#
import hm
import hm.entities as ent

model = hm.Model()

model.hm_xformnodetolocal(
    node=ent.Node(model, 50), system=ent.System(model, 5)
)