Model.writeh3dwithoptions#

Model.writeh3dwithoptions(filename, model=1, result=0, title=0, orient='', overwrite=0)#

Writes an H3D file using various options to control the exported data.

Parameters:
  • filename (hwString) – Full name and path of the H3D file to save.

  • model (int) –

    1 - Write FE data only. (default)

    2 - Write geometry (STL) data only.

    3 - Write both geometry (STL) and FE data.

  • result (int) –

    0 - Do not write results. (default)

    1 - For supported entities and result contours, this writes the displayed results to the H3D file. If no supported result contour is displayed, this option is ignored.

  • title (int) –

    0 - Do not write titles as notes. (default)

    1 - Write titles as notes.

  • orient (hwString) – The string that contains the x, y, z coordinates of the 3 orientation nodes. By default, orientation nodes are not written.

  • overwrite (int) –

    0 - Do not overwrite file if it exists. (default)

    1 - Overwrite file if it exists.

Examples#

Save an H3D as C:/test.h3d#
import hm
import hm.entities as ent

model = hm.Model()

model.writeh3dwithoptions(filename="C:/test.h3d")
Save an H3D as C:/test.h3d with both geometry and FE data , along with titles#
import hm
import hm.entities as ent

model = hm.Model()

model.writeh3dwithoptions(filename="C:/test.h3d", model=3, title=1)