*morphfittosurface

Fits domains, elements, or morph volume faces to surfaces or a mesh, matching boundary edges and projecting the interior nodes on to the target entities.

Syntax

*morphfittosurface n_entity_type n_mark_id e_entity_type e_mark_id h_entity_type h_mark_id s_entity_type s_mark_id face nhand sym con mode maxiter

Type

HyperMesh Tcl Modify

Description

This command will map domains, elements, or morph volume faces to surfaces or a mesh, fitting the boundaries of the entities to the edges of the surfaces or mesh and projecting the interior nodes on to the target entities. In the case of domains and morph volume faces being fit to surfaces, multiple entities may be fitted to multiple surfaces with the intent of matching them one to one. In those cases, the interior edges of the entities will be mapped to interior edges of the surfaces as well.

This command can be used as a one step solution or in conjunction with the *morphmaptshp, *morphmaptshpedge, and *morphmaptshpface commands if you want to place handles, edge domains, 2D domains, or morph volume faces before applying the fit operation.

When mapping domains to surfaces one to one, this command can also be used in conjunction with the *morphstorematch command which allows you to manually set which domains should be mapped to which surfaces or automatically have it determine matches based on which domains currently lie on which surfaces.

Inputs

n_entity_type
Must be set to nodes.
n_mark_id
The mark ID of the nodes on the entities to be fitted. The mark is for internal use and may be left empty. Valid values are 1 and 2.
e_entity_type
Valid values are domains, elems, hypercubes.
e_mark_id
The mark ID of the entities to be fitted. Valid values are 1 and 2.
h_entity_type
Must be set to handles.
h_mark_id
The mark ID of the follower handles. Valid values are 1 and 2.
s_entity_type
Valid values are surfs and elems.
s_mark_id
The mark ID of the surfaces or elements onto which the entities will be fitted. Valid values are 1 and 2.
face
The mark ID of selected morph volume edges and faces to be fitted. Valid values are 0 and 1. See the commands *morphmanageedgemark and *morphmanagefacemark for information on how to fill this mark.
nhand
The number of handles per edge any morph volume faces will be updated to having during the fitting operation. The maximum value is 5. If you want to retain the current number of handles on the edges, set this value to -1.
sym
0 - Do not use symmetry
con
1 - Use constraints
mode
0 – Match as group. Use with handle, edge, and face mapping commands.
1 – Match as group. One step solution.
2 – Match one to one. Use with handle, edge, and face mapping commands.
3 – Match one to one. One step solution.
4 – Match one to one. Use stored matches. Use with handle, edge, and face mapping commands.
5 – Match one to one. Use stored matches. One step solution.
When fitting to a mark of elements, only modes 0 and 1 are valid.
maxiter
When matching entities one to one (mode 2 – 5), this is the maximum number of iterations attempted before settling on the best current solution. For mode 0 and 1 it is ignored.

Examples

To fit a domain to a surface in one step:

*createmark nodes 1
*createmark domains 1 10
*createmark handles 1
*createmark surfaces 1 3
*morphfittosurface nodes 1 domains 1 handles 1 surfaces 1 0 0 0 1 1 0

To fit multiple morph volume faces to multiple surfaces one to one, increasing the handle density to 3 handles per edge:

*morphmanageedgemark 0 0 3
*morphmanageedgemark 0 1 3
*morphmanagefacemark 0 0 0 3
*morphmanageedgemark 0 0 1
*morphmanageedgemark 5 0 1
*morphmanageedgemark 1 0 1
*morphmanageedgemark 14 0 1
*morphmanagefacemark 1 4 0 1
*morphmanageedgemark 5 0 1
*morphmanageedgemark 10 0 1
*morphmanageedgemark 6 0 1
*morphmanageedgemark 19 0 1
*morphmanagefacemark 2 4 0 1
*morphmanageedgemark 13 0 1
*morphmanageedgemark 18 0 1
*morphmanageedgemark 14 0 1
*morphmanageedgemark 26 0 1
*morphmanagefacemark 3 4 0 1
*morphmanageedgemark 18 0 1
*morphmanageedgemark 23 0 1
*morphmanageedgemark 19 0 1
*morphmanageedgemark 29 0 1
*morphmanagefacemark 4 4 0 1
*createmark nodes 1
*createmark morphvolumes 1 1-4
*createmark handles 1
*createmark surfaces 1 1-4
*morphfittosurface nodes 1 morphvolumes 1 handles 1 surfaces 1 0 -1 0 1 3 50
*morphmanageedgemark 0 0 3
*morphmanageedgemark 0 1 3
*morphmanagefacemark 0 0 0 3

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

12.0.110