Télécharger toposurf_03.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier toposurf_03.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4.  
  5. ************************************************************************
  6. ** Extraction of the 3D smoothed surface from a simple 3D topology
  7. **
  8. ** Author:
  9. ** Guenhael Le Quilliec (LaMe - Polytech Tours)
  10. **
  11. ** Version:
  12. ** 3.0 2018/01/29 Updated to make it compatible with TOPOSURF V3.0
  13. ** 2.0 2018/01/26 Updated to make it compatible with TOPOSURF V2.0
  14. ** 1.0 2016/12/13 Original version compatible with TOPOSURF V1.0
  15. ************************************************************************
  16.  
  17. * General options
  18. OPTI 'DIME' 3 'ELEM' CU20 ;
  19. graph0 = FAUX ;
  20.  
  21. * Mesh
  22. p0 = 0.0 0.0 0.0 ;
  23. p1 = 0.0 100.0 0.0 ;
  24. p2 = 100.0 0.0 0.0 ;
  25. lgn0 = DROI 50 p1 p0 ;
  26. srf0 = TRAN lgn0 50 p2 ;
  27. msh0 = VOLU 'TRAN' 25 srf0 (0.0 0.0 -50.0) ;
  28.  
  29. * Model
  30. mod0 = MODE msh0 'MECANIQUE' 'ELASTIQUE' 'ISOTROPE' ;
  31.  
  32. * Topology (usualy obtained from the procedure TOPOPTIM)
  33. pnt0 = msh0 POIN 'SPHE' (50.0 50.0 0.0) (50.0 85.0 0.0) 10.0 ;
  34. elm0 = msh0 ELEM 'APPU' pnt0 ;
  35. topo0 = MANU 'CHML' mod0 'SCAL' 1.0 'TYPE' 'SCALAIRE' 'GRAVITE' ;
  36. topo0 = ((topo0 * 0.0) REDU (DIFF msh0 elm0)) + (topo0 REDU elm0) ;
  37.  
  38. * Plot the topology to screen
  39. SI graph0 ;
  40. TRAC topo0 mod0 ;
  41. FINS ;
  42.  
  43. * Topology table
  44. tab0 = TABL ;
  45. tab0.'TOPOLOGIE' = topo0 ;
  46. tab0.'MODELE' = mod0 ;
  47. tab0.'TAUX_FILTRAGE' = 3 ;
  48.  
  49. * Generate a smoothed surface from the topology
  50. srf0 = TOPOSURF tab0 ;
  51.  
  52. * Plot the smoothed surface to screen
  53. SI graph0 ;
  54. TRAC srf0 'FACE' ;
  55. FINS ;
  56.  
  57. * Save the smoothed surface in STL format
  58. OPTI 'SORT' 'toposurf_03.stl' ;
  59. SORT 'STL' srf0 ;
  60.  
  61. FIN ;
  62.  
  63.  
  64.  
  65.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales