IDFstepper
IDF to STEP converter
inc/IdfStructure.hpp
Go to the documentation of this file.
00001 #ifndef IDFSTRUCTURE_HPP_INCLUDED
00002 #define IDFSTRUCTURE_HPP_INCLUDED
00003 
00004 #include <boost/optional.hpp>
00005 #include <vector>
00006 #include <string>
00007 #include <map>
00008 
00009 
00010 namespace idf {
00011   
00015   typedef std::map<std::string, std::string> Props;
00016   
00021   enum BoardPanelType {
00022     BOARD_FILE,
00023     PANEL_FILE
00024   };
00025   
00029   enum Unit {
00031     MM,
00033     THOU
00034   };
00035   
00039   enum Owner {
00041     MCAD,
00043     ECAD,
00045     UNOWNED
00046   };
00047   
00051   enum BoardSide {
00052     TOP_SIDE,
00053     BOTTOM_SIDE,
00054     BOTH_SIDES
00055   };
00056   
00060   enum RoutingLayers {
00061     TOP_LAYER,
00062     BOTTOM_LAYER,
00063     BOTH_LAYERS,
00064     INNER_LAYERS,
00065     ALL_LAYERS
00066   };
00067   
00071   enum PlatingStyle {
00073     PTH,
00075     NPTH
00076   };
00077   
00081   enum PlacementStatus {
00082     PLACED,
00083     UNPLACED,
00084     PLACE_MCAD,
00085     PLACE_ECAD
00086   };
00087    
00091   enum ComponentType {
00092     ELECTRICAL,
00093     MECHANICAL
00094   };
00095   
00099   struct Loop {
00104     int label;
00106     double x;
00108     double y;
00115     double angle;
00116   };
00117   
00122   struct BoardPanelOutline {
00124     Owner owner;
00125     
00127     double thickness;
00128     
00130     std::vector<Loop> loops;
00131   };
00132   
00136   struct OtherOutline {
00138     Owner owner;
00139     
00141     std::string identifier;
00143     double thickness;
00145     BoardSide side;
00146     
00148     std::vector<Loop> loops;
00149   };
00150   
00154   struct RoutingOutline {
00156     Owner owner;
00157     
00159     RoutingLayers layers;
00160     
00162     std::vector<Loop> loops;
00163   };
00164   
00168   struct PlacementOutline {
00170     Owner owner;
00171     
00173     BoardSide side;
00176     double height;
00177     
00179     std::vector<Loop> loops;
00180   };
00181   
00185   struct RoutingKeepout {
00187     Owner owner;
00188     
00190     RoutingLayers layers;
00191     
00193     std::vector<Loop> loops;
00194   };
00195   
00199   struct ViaKeepout {
00201     Owner owner;
00202     
00204     std::vector<Loop> loops;
00205   };
00206   
00210   struct PlacementKeepout {
00212     Owner owner;
00213     
00215     BoardSide side;
00218     double height;
00219     
00221     std::vector<Loop> loops;
00222   };
00223   
00227   struct PlacementGroupArea {
00229     Owner owner;
00230     
00232     BoardSide side;
00234     std::string name;
00235     
00237     std::vector<Loop> loops;
00238   };
00239   
00243   struct DrilledHole {
00245     double diameter;
00247     double x;
00249     double y;
00251     PlatingStyle style;
00253     std::string associatedPart;
00255     std::string type;
00257     Owner owner;
00258   };
00259   
00263   struct DrilledHoles {
00265     std::vector<DrilledHole> holes;
00266   };
00267   
00271   struct Note {
00273     double x;
00275     double y;
00277     double height;
00279     double length;
00281     std::string text;
00282   };
00283   
00287   struct Notes {
00289     std::vector<Note> notes;
00290   };
00291   
00295   struct ComponentPlacement {
00297     std::string package;
00299     std::string number;
00301     std::string refdes;
00302     
00304     double x;
00306     double y;
00308     double offset;
00310     double angle;
00312     BoardSide side;
00314     PlacementStatus status;
00315   };
00316   
00320   struct ComponentPlacements {
00322     std::vector<ComponentPlacement> placements;
00323   };
00324 
00330   struct BoardPanelStruct {
00332     BoardPanelType fileType;
00334     double idfVersion;
00336     std::string sourceSysId;
00338     std::string date;
00340     int version;
00341     
00343     std::string name;
00345     Unit units;
00346     
00348     BoardPanelOutline outline;
00349     
00351     std::vector<OtherOutline> otherOutlines;
00352     
00354     std::vector<RoutingOutline> routingOutlines;
00355     
00357     std::vector<PlacementOutline> placementOutlines;
00358     
00360     std::vector<RoutingKeepout> routingKeepouts;
00361     
00363     std::vector<ViaKeepout> viaKeepouts;
00364     
00366     std::vector<PlacementKeepout> placementKeepouts;
00367     
00369     std::vector<PlacementGroupArea> placementGroups;
00370     
00372     boost::optional<DrilledHoles> holes;
00373     
00375     boost::optional<Notes> notes;
00376     
00378     boost::optional<ComponentPlacements> components;
00379   };
00380   
00384   struct Component {
00386     ComponentType type;
00388     std::string name;
00390     std::string number;
00392     Unit units;
00394     double height;
00395     
00397     std::vector<Loop> loops;
00398     
00400     boost::optional<Props> props;
00401   };
00402   
00406   struct LibraryStruct {
00408     double idfVersion;
00410     std::string sourceSysId;
00412     std::string date;
00414     int version;
00415     
00417     std::vector<Component> components;
00418   };
00419   
00420 }
00421 
00422 
00423 #endif
00424 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines