Model.exportuserdefinedshapes#
- Model.exportuserdefinedshapes(header, keyword, delimiter1, delimiter1_value, nodeid_width, delimiter2, delimiter2_value, x_coord_width, x_coord_precision, y_coord_width, y_coord_precision, z_coord_width, z_coord_precision, delimiter3, delimiter3_value, outputfile)#
Exports shape design variables, shapes and nodal information in user-defined format for HyperStudy or Templex analysis codes.
- Parameters:
header (hwString) – Header information for the node block.
keyword (hwString) – Keyword for a node.
delimiter1 (hwString) –
The delimiter type between keyword and the node ID. Valid values are:
Delimiter - Use for delimiters such as slash, comma, etc.
Whitespace - Use for spaces.
delimiter1_value (hwString) –
If
deliminter1is Delimiter, this is the character to use as the delimiter.If
delimiter1is Whitespace, this is the number of spaces.nodeid_width (int) – Width of the node ID field.
delimiter2 (hwString) –
The delimiter type between the node ID and the x-coordinate. Valid values are:
Delimiter - Use for delimiters such as slash, comma, etc.
Whitespace - Use for spaces.
delimiter2_value (hwString) –
If
deliminter2is Delimiter, this is the character to use as the delimiter.If
delimiter2is Whitespace, this is the number of spaces.x_coord_width (int) – Field width for output of the x-coordinate.
x_coord_precision (int) – Field precision for output of the x-coordinate.
y_coord_width (int) – Field width for output of the y-coordinate.
y_coord_precision (int) – Field precision for output of the y-coordinate.
z_coord_width (int) – Field width for output of the z-coordinate.
z_coord_precision (int) – Field precision for output of the z-coordinate.
delimiter3 (hwString) –
The delimiter type between the x-y and y-z coordinates. Valid values are:
Delimiter - Use for delimiters such as slash, comma, etc.
Whitespace - Use for spaces.
delimiter3_value (hwString) –
If
deliminter3is Delimiter, this is the character to use as the delimiter.If
delimiter3is Whitespace, this is the number of spaces.outputfile (hwString) – Name of the output file.
Example#
Output nodal coordinates in the following format to the shape.dat file :#''' COORDINATES NODE / 8844, 5.0000000e+001 6.0000000e+001 5.0000000e+001 ... ''' import hm import hm.entities as ent model = hm.Model() model.exportuserdefinedshapes( header="COORDINATES", keyword="NODE", delimiter1="Delimiter", delimiter1_value="/", nodeid_width=9, delimiter2="Delimiter", delimiter2_value=",", x_coord_width=15, x_coord_precision=7, y_coord_width=15, y_coord_precision=7, z_coord_width=15, z_coord_precision=7, delimiter3="Whitespace", delimiter3_value="1", outputfile="shape.dat", )