Skip to content
Snippets Groups Projects
Select Git revision
  • 8015e0412f3b3366156aefb1b72c16caa30b9e28
  • master default protected
  • hierarchical-basis
  • alphashapes
  • bl
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • convert_fdivs
  • tmp_jcjc24
  • fixedMeshIF
  • save_edges
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

OpenFile.cpp

Blame
  • msh_attributes.py 513 B
    import gmsh
    gmsh.initialize()
    gmsh.model.occ.addBox(0,0,0,1,1,1)
    gmsh.model.occ.synchronize()
    gmsh.model.mesh.generate()
    gmsh.model.setAttribute('Comments', ["Hello this is my comment on the block model",
                                         "... and a second comment"])
    gmsh.write('block_with_attribute.msh')
    gmsh.finalize()
    
    gmsh.initialize()
    gmsh.open('block_with_attribute.msh')
    for attr in gmsh.model.getAttributeNames():
        print('Attribute ' + attr + " = ", gmsh.model.getAttribute(attr))
    gmsh.finalize()