Skip to content
Snippets Groups Projects
Select Git revision
  • 3862278e6705ecc0f5d32144289635a34f5d90cb
  • master default protected
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • alphashapes
  • 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
  • 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

flatten2.py

Blame
  • flatten2.py 621 B
    import gmsh
    import sys
    
    # script showing how the coordinates of the nodes of a mesh can be transformed,
    # here by setting all the z coordinates to 0; this is less general, but much
    # simpler, than the approach followed in `flatten.py'
    
    if len(sys.argv) < 2:
        print("Usage: " + sys.argv[0] + " file.msh")
        exit(0)
    
    gmsh.initialize()
    
    try:
        gmsh.open(sys.argv[1])
    except:
        exit(0)
    
    gmsh.model.mesh.affineTransform([1, 0, 0, 0,
                                     0, 1, 0, 0,
                                     0, 0, 0, 0])
    
    if '-nopopup' not in sys.argv:
        gmsh.fltk.run()
    #gmsh.write('flat.msh')
    
    gmsh.finalize()