Skip to content
Snippets Groups Projects
Select Git revision
  • 03c4ceb15fe301b9c0fae88aa8f2ad48e9d34dff
  • master default protected
  • dof-renumbering
  • test-dof-hash
  • gdemesy-master-patch-30528
  • eval-space-time
  • oscillating_multiharm
  • MH_movement
  • axisqu
  • write_vtu_and_ensight_formats
  • movingband
  • CP_1972_add_vtu_file_writing
  • mortar
  • fast_freq_sweep_Resolution
  • applyresolvent_again
  • marteaua-master-patch-54323
  • patch-1
  • binde-master-patch-08072
  • binde-master-patch-52461
  • BCGSL
  • resolvent
  • getdp_3_5_0
  • getdp_3_4_0
  • getdp_3_3_0
  • getdp_3_2_0
  • getdp_3_1_0
  • getdp_3_0_4
  • getdp_3_0_3
  • getdp_3_0_2
  • getdp_3_0_1
  • getdp_3_0_0
  • onelab_mobile_2.1.0
  • getdp_2_11_3 protected
  • getdp_2_11_2 protected
  • getdp_2_11_1 protected
  • getdp_2_11_0 protected
  • getdp_2_10_0 protected
  • getdp_2_9_2 protected
  • getdp_2_9_1 protected
  • getdp_2_9_0 protected
  • getdp_2_8_0 protected
41 results

Generate_Network.h

Blame
  • closest_point.py 523 B
    import gmsh
    import sys
    
    gmsh.initialize()
    
    # add a circle
    c = gmsh.model.occ.addCircle(0, 0, 0, 1)
    gmsh.model.occ.synchronize()
    
    # find closet point to (1.3, 1.3) by orthogonal projection on the curve c
    p, t = gmsh.model.getClosestPoint(1, c, [1.3, 1.3, 0])
    
    # add a point on the projection
    pp = gmsh.model.occ.addPoint(p[0], p[1], p[2])
    
    # fragment the curve with the new point
    gmsh.model.occ.fragment([(0, pp)], [(1, c)])
    
    gmsh.model.occ.synchronize()
    
    if '-nopopup' not in sys.argv:
        gmsh.fltk.run()
    
    gmsh.finalize()