Skip to content
Snippets Groups Projects
Select Git revision
  • gmsh_4_12_2
  • master default protected
  • overlaps_tags_and_distributed_export
  • overlaps_tags_and_distributed_export_rebased
  • relaying
  • alphashapes
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • 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
40 results

step_header_data.py

Blame
  • step_header_data.py 738 B
    import sys
    from pathlib import Path
    
    import gmsh
    
    root = Path(__file__).parent
    
    gmsh.initialize()
    
    gmsh.model.occ.addTorus(0, 0, 0, 1, 0.2)
    gmsh.model.occ.synchronize()
    
    gmsh.option.setString("Geometry.OCCSTEPDescription", "A simple torus geometry")
    gmsh.option.setString("Geometry.OCCSTEPModelName", "Torus")
    gmsh.option.setString("Geometry.OCCSTEPAuthor", "gnikit")
    gmsh.option.setString("Geometry.OCCSTEPOrganization", "Gmsh")
    gmsh.option.setString("Geometry.OCCSTEPPreprocessorVersion", "Gmsh")
    gmsh.option.setString("Geometry.OCCSTEPOriginatingSystem", "-")
    gmsh.option.setString("Geometry.OCCSTEPAuthorization", "")
    gmsh.write(str(root / "step_header_data.stp"))
    
    if "-nopopup" not in sys.argv:
        gmsh.fltk.run()
    
    gmsh.finalize()