Project

Morphing a mesh and creating a Macro

Objective:

To morph the given side body component to the desired shape shown in the images below and write a macro for the same.

Procedure:

Step 1. Open the Hypermesh in OptiStruct user profile mode, and open the provided mesh file.

Step 2. The surface can be generated from the mesh available using the "From FE" tools in Surface toolpanel. This step is useful in comparing the morphed mesh to the original form. And, this step can be also skipped as it serves only for the comparison purpose.

Step 3. Then, a morphvolume is created for the entirety of the mesh along with the handles so that they can be morphed. Also, the volumes are again splitted into further smaller units so that the morphing can be easily performed on one region of mesh using the handles, by keeping the other mesh reagions intact.

Step 4. The smaller volumes are morphed accordingly using their handles to match the specified desirable form.

Step 5. Now the surface generated in the 2nd step can be deleted, after comparisons. And the mesh is morphed to the required shape.

Step 6. To generate a macro file for this operation, the already performed operations will be logged in the command.tcl file in the documents folder. And non-essential steps like rotating the model to view in different angles and multiple instances of hiding/showing elements and the creation of surface from FE elements for comparison can be removed from the commands log. These modified essential commands can be copied into a new .TCL file.

Step 7. The newly created .TCL file is known as the macro file. This script is a compilation of commands required to perform the same manual operation, we had done, and to achieve the same end result.

Step 8. To run this macro, start a fresh new Hypermesh session, go to File>Run>TCL/TK Script and browse to your created macro file, and the hypermesh executes the script and readily gives you the output straightaway, all with no manual interference. And, below is the output of the macro execution opeartion.

Please ensure the file name of the mesh to be "Side_body_Mesh_Initial". (Or user can also modify the input file name to read in the macro file)

The resulting output file name on executing the macro script is "Side_body_Mesh_Final_Using_Macro".

Result:

The volume morphing technique is used to morph the given mesh to the required form and a macro is also generated from compiling the essential commands of the series of operations done, so that the macro scripts can be executed to achieve the same output, instead of putting same manual efforts again. The figure of the morphed mesh by manual method, is show below.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.