Model.hm_morph_getdomainradius_byentity#

Model.hm_morph_getdomainradius_byentity(domain, line_or_node_entity=Entity())#

Returns the radius of a specified edge domain. Optional arguments allow the radius to be calculated using a line, node, or base point and axis to find the center of curvature.

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

  • line_or_node_entity (Entity) – The object describing the entity. Valid entities are lines and nodes.

Returns:

Examples#

Get the radius of a domain with ID 2 and measured use node ID 12 as the center node#
import hm
import hm.entities as ent

model = hm.Model()

_,result = model.hm_morph_getdomainradius_byentity(
    domain=ent.Domain(model, 2), line_or_node_entity=ent.Node(model, 12)
)

print("radius",result.radius)
Get the radius of a domain with ID 2 and measured use line ID 3 as the center line#
import hm
import hm.entities as ent

model = hm.Model()

_,result = model.hm_morph_getdomainradius_byentity(
    domain=ent.Domain(model, 2), line_or_node_entity=ent.Line(model, 3)
)

print("radius",result.radius)

Note

If the radius of the edge domain is not constant, an average is returned.