Model.morphbeziershape#
- Model.morphbeziershape(dcollection, ecollection, shapeid, sym, con, vvec, mag, type, meth, umark)#
Create polynomial or spline based shapes for handles on the domains on the collection.
- Parameters:
dcollection (Collection) – The collection containing the input domain entities.
ecollection (Collection) – The collection containing the input element entities.
shapeid (int) – The ID of the shape.
sym (int) –
0 - Do not use symmetry
1 - Use symmetry
con (int) –
0 - Do not use constraints
1 - Use constraints
vvec (hwTriple) – The hwTriple object defining the vector. User can also supply a Python list of three doubles.
mag (double) – Magnitude of perturbation
type (int) –
1 - Use vector for handle perturbations
2 - Use element normals for handle perturbations
3 - Use shape for handle perturbations
meth (int) –
0 - Polynomial
1 - Spline
umark (int) –
0 - Use all elements to determine normals
1 - Use elements on
ecollectionto determine normals
Example#
A shape is created for each handle on each domain on the collection using the selectedtypeto determine the perturbations#import hm import hm.entities as ent model = hm.Model() model.morphbeziershape( dcollection=hm.CollectionByInteractiveSelection(model, ent.Domain), ecollection=hm.CollectionByInteractiveSelection(model, ent.Element), shapeid=12, sym=0, con=1, vvec=[1.0, 0.0, 0.0], mag=5.0, type=3, meth=1, umark=0, )
Note
If
typeis 1 or 2,magwill be used as the magnitude of the handle perturbations. Iftype=3, the perturbations on the shape will be used.If symmetry is used, all handles linked to marked handles by symmetry will also be perturbed. If constraints are used, they will be applied to the perturbations.