Model.morphmaptshpedge#
- Model.morphmaptshpedge(dcollection, ecollection, scollection, lline, plane_normal, plane_base, line, points, niproj, iproj, clear, sym, con, type)#
Adds and edge domain perturbation to the current temporary shape.
- Parameters:
dcollection (Collection) – The collection containing the domain entities.
ecollection (Collection) – The collection containing the element entities.
scollection (Collection) – The collection containing the surface entities.
lline (Entity) – Reserved for future use.
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.
line (EntityList) – The list containing the line entity
points (EntityList) – The list containing the point entities
niproj (int) –
Direction of projection:
0 - Along vector (
iproj)1 - Normal to geom
2 - Fit to line (if to a line or node list) normal to elems (if to a plane, surface, or mesh).
iproj (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.morphmaptshpedge()operationsym (int) – 0 - Do not use symmetry (only option)
con (int) – 1 - Use constraints (only option)
type (int) –
The type of target to be mapped to.
0 - Node list
1 - Line
2 - Plane
3 - Surface
4 - Elements
Example#
Add an edge domain perturbation to the domain selected interactively on the current temporary shape#import hm import hm.entities as ent model = hm.Model() model.morphmaptshpedge( dcollection=hm.CollectionByInteractiveSelection(model, ent.Domain), ecollection=hm.CollectionByInteractiveSelection(model, ent.Element), scollection=hm.CollectionByInteractiveSelection(model, ent.Surface), lline=hm.EntityList(ent.Line, hm.hwUIntList([])), plane_normal=[1.0, 0.0, 0.0], plane_normal_base=[1.0, 0.0, 0.0], line=[ent.Line(model, 32)], points=[ent.Point(model, 1), ent.Point(model, 2)], niproj=0, iproj=[1.0, 0.0, 0.0], clear=0, sym=0, con=1, type=1, )
Note
This function is part of the map to geometry function which consists of multiple functions. This function is called any number of times, first with
clear=1, then subsequentlyclear=0, followed either by one of the manymorphmapto…()functions. Ifclear=2then the lastModel.morphmaptshpedge()function is rejected.Type denotes the type of target to be mapped to. Either the plane, line, points, surface mark, or element collection must be filled with a valid entry corresponding to the type selected.