Télécharger toposurf_02.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier toposurf_02.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4.  
  5. ************************************************************************
  6. ** Extraction of the 3D smoothed surface from a simple 2D 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' 2 'MODE' 'PLAN' 'CONT' 'ELEM' QUA8 ;
  19. graph0 = FAUX ;
  20.  
  21. * Mesh
  22. p0 = 0.0 0.0 ;
  23. p1 = 0.0 100.0 ;
  24. p2 = 100.0 0.0 ;
  25. lgn0 = DROI 50 p1 p0 ;
  26. msh0 = TRAN lgn0 50 p2 ;
  27.  
  28. * Model
  29. mod0 = MODE msh0 'MECANIQUE' 'ELASTIQUE' 'ISOTROPE' ;
  30.  
  31. * Topology (usualy obtained from procedure TOPOPTIM)
  32. pnt0 = msh0 POIN 'SPHE' (50.0 50.0) (50.0 85.0) 10.0 ;
  33. elm0 = msh0 ELEM 'APPU' pnt0 ;
  34. topo0 = MANU 'CHML' mod0 'SCAL' 1.0 'TYPE' 'SCALAIRE' 'GRAVITE' ;
  35. topo0 = ((topo0 * 0.0) REDU (DIFF msh0 elm0)) + (topo0 REDU elm0) ;
  36.  
  37. * Plot the topology to screen
  38. SI graph0 ;
  39. TRAC topo0 mod0 ;
  40. FINS ;
  41.  
  42. * Topology table
  43. tab0 = TABL ;
  44. tab0.'TOPOLOGIE' = topo0 ;
  45. tab0.'MODELE' = mod0 ;
  46. tab0.'TAUX_FILTRAGE' = 3 ;
  47.  
  48. * Generate a smoothed surface from the topology
  49. srf0 = TOPOSURF tab0 ;
  50.  
  51. * Plot the smoothed surface to screen
  52. SI graph0 ;
  53. TRAC srf0 'FACE' ;
  54. FINS ;
  55.  
  56. * Save the smoothed surface in STL format
  57. OPTI 'SORT' 'toposurf_02.stl' ;
  58. SORT 'STL' srf0 ;
  59.  
  60. FIN ;
  61.  
  62.  
  63.  
  64.  

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