Model.hm_morph_getdomainangle#
- Model.hm_morph_getdomainangle(domain1, domain2, x=DBL_MAX, y=DBL_MAX, z=DBL_MAX)#
Returns the angle between two specified edge domains. Optional argument allows the user to input a normal vector to be used to measure the angle.
- Parameters:
domain1 (Entity) – The object describing the domain entity of one edge.
domain2 (Entity) – The object describing the domain entity of a different.
x (double) – The x coordinate of the normal vector which will be used to calculate the angle between the domains. Default vector is normal to the end points of the two domains.
y (double) – The y coordinate of the normal vector which will be used to calculate the angle between the domains. Default vector is normal to the end points of the two domains.
z (double) – The z coordinate of the normal vector which will be used to calculate the angle between the domains. Default vector is normal to the end points of the two domains.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:angle (double)
Examples#
Find the angle between domains with ID 2 and 3#import hm import hm.entities as ent model = hm.Model() _,result = model.hm_morph_getdomainangle(domain1=ent.Domain(model, 2), domain2=ent.Domain(model, 3)) print("angle",result.angle)
Find the angle between two domains with ID 2 and 3 and measured normal to a vector that runs 1.0 in the x direction , 0.5 in the y direction , and 0.0 in the z direction#import hm import hm.entities as ent model = hm.Model() _,result = model.hm_morph_getdomainangle(domain1=ent.Domain(model, 2), domain2=ent.Domain(model, 3), x=1.0, y=0.5, z=0.0) print("angle",result.angle)
Note
Only the angle from one end to the other end, using the connecting node as the vertex, is measured. Curvature is ignored.