Model.morphconstraintcreateedge#
- Model.morphconstraintcreateedge(name, dptr1, dptr2, end, type, vec, color)#
Creates a tangency type constraint either between two edge domains, two 2D domains, or at the end of one edge domain. For the main type,
dptr1is the main domain, anddptr2is the secondary. For the secondary type,dptr2is the main domain, anddptr1is the secondary. For the attached type,dptr1followsdptr2.- Parameters:
name (hwString) – The name of the morph constraint.
dptr1 (Entity) – The line entity of the edge or 2D domain.
dptr2 (Entity) – The line entity of the edge or 2D domain.
end (Entity) – The node entity at fixed end (for fixed type).
type (int) –
1 - Fixed (edge domains only)
2 - Main (edge domains only)
3 - Secondary (edge domains only)
4 - Continuous
5 - Attached (edge domains only)
vec (hwTriple) – The hwTriple object defining the vector. User can also supply a Python list of three doubles.
color (int) – The color of the constraint. Valid values are 1-64.
Examples#
Create a continuous tangency constraint named “ tang “ between domains with IDs 12 and 14#import hm import hm.entities as ent model = hm.Model() model.morphconstraintcreateedge( name="tang", dptr1=ent.Line(model, 12), dptr2=ent.Line(model, 14), end=ent.Node(model, 1), type=4, vec=[1.0, 0.0, 0.0], color=44, )
Create a main tangency constraint named “ main “ where domain with ID 14 is forced tangent to domain with ID 12#import hm import hm.entities as ent model = hm.Model() model.morphconstraintcreateedge( name="main", dptr1=ent.Line(model, 12), dptr2=ent.Line(model, 14), end=ent.Node(model, 1), type=2, vec=[1.0, 0.0, 0.0], color=44, )