CLI
Usage
Command: mpcforces-extractor extract
The main command is the extract
command. This command will extract the mpc forces from the mpcf file and will output the summed up forces per connected part. The ouptput will be a text file with the summed up forces per connected part.
Additionally the tcl code needed for visualizing the connected parts in HyperMesh will be generated. The tcl code will be saved in the same directory as the output file in the subfolder tcl-visualization.
The command wants you to provide the path to the .fem model file as well as the path to the .mpcf file. Lastly, the output file path is needed. The blocksize is optional and is needed for reading the files. The default value is 8 (8 chars per field in line). For long ouptut it is recommended to increase the blocksize to 16 (not tested).
Command: mpcforces-extractor visualize
The command visualize
visualizes the connected parts in HyperMesh. The command wants you to provide the path to the .fem model file as well as the path to the output directory. The tcl file is the output of the extract command.
Know issue: If a compornent in the hypermesh model is named part1, part2, etc. the tcl script might not work as intended. This is due to the fact that the tcl script is using the part name to create the groups.
Source Code
extract
Extracts the mpc forces and also writes the tcl lines for visualization
Source code in mpcforces_extractor\cli\extract.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
visualize
Visualizes the connected parts of the model by moving them into separate components
Source code in mpcforces_extractor\cli\visualize.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|