*morphloadshape

Reads local shapes stored in the specified file.

Syntax

*morphloadshape filename apply_shapes filetype create_elems tolerance

Type

HyperMesh Tcl Modify Command

Description

A shape stored as either grid perturbations (filetype 0) or as a local shape (filetype 1) is read in to HyperMesh and optionally applied to the model.

filetype 1 gives you the option of reading the local shapes into HyperMesh as elements with the shapes acting on those elements. Your can then use *morphtranslateshapemark, *morphpositionshapemark, or *morphreflectshapemark to apply the shape to the rest of the model.

filetype 1 requires a value for tolerance, the envelope for shapes to be applied to the model if the apply flag is on.

Inputs

filename
Full name and path of the file containing the shapes.
apply_shapes
0 - Do not apply shapes to model
1 - Apply shapes to model
filetype
0 - OptiStruct/Radioss .fem or .grid format, or *morphsaveshape "as grids"
1 - *morphsaveshape "as shapes"
create_elems
0 - Do not re-create elements from file (filetype 1 only)
1 - Recreate elements from file (filetype 1 only)
tolerance
Envelope for application of local shapes. The envelope is the range of influence that an imported shape will have on the new mesh. Since the original mesh (where the shape was when the shape file was saved) and target mesh may not match exactly, the envelope must be large enough to include nodes that may lie outside the bounds of the original mesh were it to be positioned on to the target mesh. Nodes inside the envelope will be perturbed proportional to how close they are to the bounds of the original mesh. Set the tolerance to -1.0 to use the default value, which is equal to the average length of the sides of the elements in the shape. Type in a larger value to capture more nodes within the envelope. Similarly, if too many nodes are being affected, try using a smaller envelope. You may also use a very large envelope (a million times the size of an average element) to make sure that the shape is applied to nearby nodes at full value.

Example

To load and apply the shapes found in file C:/Temp/save.shp in file format 1 using the default tolerance:

*morphloadshape "C:/Temp/save.shp" 1 1 0 -1

Errors

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