Model.morphmaptshpface#
- Model.morphmaptshpface(d_collection, e_collection, s_collection, plane_normal, plane_base, nproj, c_vec, clear, sym, con, type)#
Maps a 2D domain to a plane, a collection of surfaces, or a collection of elements either normal to the target or along a vector. When mapping to surfaces or a mesh the option to fit the domain to the entities is available.
This function is part of the map to geometry function which consists of multiple functions. This function may be called any number of times, first with
clear=1set to then subsequentlyclear=1, followed either by one of the manymorphmapto...()functions. Ifclear=1then the lastModel.morphmaptshpface()function is rejected.- Parameters:
d_collection (Collection) – The collection containing the domain entities to be mapped.
e_collection (Collection) – The collection containing the element entities to which the domain entities are mapped.
s_collection (Collection) – The collection containing the surface entities to which the domain entities are mapped.
plane_normal (hwTriple) – The hwTriple object defining the plane normal components. User can also supply a Python list of three doubles.
plane_base (hwTriple) – The hwTriple object defining the base point components of the plane. User can also supply a Python list of three doubles.
nproj (int) –
0 - Project along vector given by
c_vec1 - Project normal to geometry
2 - Project normal to elements of the domain
3 - Fit to target
c_vec (hwTriple) – The hwTriple object defining the vector components. User can also supply a Python list of three doubles.
clear (int) –
Determine if/how to delete perturbations:
0 - Add perturbation
1 - Clear temporary and add perturbation
2 - Reject last
Model.morphmaptshpface()operationsym (int) – 0 - Do not use symmetry
con (int) – 1 - Use constraints
type (int) –
The type of target to be mapped to:
2 - Plane
3 - Surface
4 - Elements
Example#
Map the 2D domain with ID 10 to a surface use the fitting option#import hm import hm.entities as ent model = hm.Model() model.morphmaptshpface( d_collection=hm.Collection(model, ent.Domain, [10]), e_collection=hm.CollectionByInteractiveSelection(model, ent.Element), s_collection=hm.Collection(model, ent.Surface, [3]), plane_normal=[1.0, 0.0, 0.0], plane_normal_base=[1.0, 0.0, 0.0], nproj=3, c_vec=[1.0, 0.0, 0.0], clear=1, sym=0, con=1, type=3, )