home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / a / autopcb / !AutoPCB / c / CoordMap < prev    next >
Text File  |  1991-03-24  |  2KB  |  63 lines

  1. /*
  2. ** COORDMAP
  3. **
  4. **   Assuming the grid is based on the unit of a square 50 x 50 thousands
  5. ** of an inch (0.05"). The centre of each square would be (0,0), and the
  6. ** edges would be 25 units out.
  7. */
  8.  
  9. #include "cell.h"
  10. #include "coordmap.h"
  11.  
  12. struct mapping coordhole[] =
  13. {
  14.   { HOLE_NORTH,       Centre, North,        Unused },
  15.   { HOLE_EAST,        Centre, East,         Unused },
  16.   { HOLE_WEST,        Centre, West,         Unused },
  17.   { HOLE_SOUTH,       Centre, South,        Unused },
  18.   { HOLE_NORTHEAST,   Centre, Northeast,    Unused },
  19.   { HOLE_NORTHWEST,   Centre, Northwest,    Unused },
  20.   { HOLE_SOUTHEAST,   Centre, Southeast,    Unused },
  21.   { HOLE_SOUTHWEST,   Centre, Southwest,    Unused }
  22. };
  23.  
  24. struct mapping coordline[] =
  25. {                      
  26.   { LINE_HORIZONTAL,  West,   East,         Unused },
  27.   { LINE_VERTICAL,    South,  North,        Unused },
  28.  
  29.   { CORNER_NORTHEAST, East,   North,        Unused },
  30.   { CORNER_SOUTHEAST, South,  East,         Unused },
  31.   { CORNER_NORTHWEST, West,   North,        Unused },
  32.   { CORNER_SOUTHWEST, South,  West,         Unused },
  33.  
  34.   { DIAG_NEtoSW,      Northeast, Southwest, Unused },
  35.   { DIAG_SEtoNW,      Southeast, Northwest, Unused },
  36.  
  37.   { BENT_NtoSE,       North,  Centre,       Southeast },
  38.   { BENT_NtoSW,       North,  Centre,       Southwest },
  39.   { BENT_EtoSW,       East,   Centre,       Southwest },
  40.   { BENT_EtoNW,       East,   Centre,       Northwest },
  41.   { BENT_StoNW,       South,  Centre,       Northwest },
  42.   { BENT_StoNE,       South,  Centre,       Northeast },
  43.   { BENT_WtoNE,       West,   Centre,       Northeast },
  44.   { BENT_WtoSE,       West,   Centre,       Southeast },
  45.  
  46.   { ANGLE_NEtoSE,     Northeast, Centre,    Southeast },
  47.   { ANGLE_SEtoSW,     Southeast, Centre,    Southwest },
  48.   { ANGLE_SWtoNW,     Southwest, Centre,    Northwest },
  49.   { ANGLE_NWtoNE,     Northwest, Centre,    Northeast },
  50.  
  51.   { SHARP_NtoNE,      North,  Centre,       Northeast },
  52.   { SHARP_EtoNE,      East,   Centre,       Northeast },
  53.   { SHARP_EtoSE,      East,   Centre,       Southeast },
  54.   { SHARP_StoSE,      South,  Centre,       Southeast },
  55.   { SHARP_StoSW,      South,  Centre,       Southwest },
  56.   { SHARP_WtoSW,      West,   Centre,       Southwest },
  57.   { SHARP_WtoNW,      West,   Centre,       Northwest },
  58.   { SHARP_NtoNW,      North,  Centre,       Northwest }
  59. };
  60.  
  61. int size_coordhole = sizeof(coordhole) / sizeof(struct mapping);
  62. int size_coordline = sizeof(coordline) / sizeof(struct mapping);
  63.