plotFileInitialization.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #include "nmmtl.h"
  2. /****************************************************************
  3. * plotFileInitialization
  4. *
  5. * call this routine to write the first part of the data to the plotFile
  6. * after calling nmmtl_parse_graphic
  7. *
  8. *
  9. */
  10. void plotFileInitialization(FILE *plotFile,
  11. int units,
  12. int gnd_planes,
  13. float top_ground_plane_thickness,
  14. float bottom_ground_plane_thickness
  15. )
  16. {
  17. if (plotFile != 0)
  18. {
  19. switch(units)
  20. {
  21. case UNITS_MILS :
  22. fprintf(plotFile,"Display Units: mils\n");
  23. break;
  24. case UNITS_MICRONS :
  25. fprintf(plotFile,"Display Units: microns\n");
  26. break;
  27. case UNITS_INCHES :
  28. fprintf(plotFile,"Display Units: inches\n");
  29. break;
  30. case UNITS_METERS :
  31. fprintf(plotFile,"Display Units: meters\n");
  32. break;
  33. case UNITS_NO_UNITS :
  34. default :
  35. fprintf(plotFile,"Display Units: mils\n");
  36. break;
  37. }
  38. fprintf(plotFile,"Lower Ground Plane Thickness: %e\n",
  39. bottom_ground_plane_thickness);
  40. if (gnd_planes == 2)
  41. {
  42. fprintf(plotFile,"Top Ground Plane Thickness: %e\n",
  43. top_ground_plane_thickness);
  44. }
  45. }
  46. }