KiCad PCB EDA Suite
Loading...
Searching...
No Matches
idf_common.h File Reference
#include <list>
#include <fstream>
#include <exception>
#include <string>
#include <cmath>

Go to the source code of this file.

Classes

struct  IDF_ERROR
 
class  IDF_NOTE
 An entry in the NOTE section of an IDF file. More...
 
class  IDF_DRILL_DATA
 A drilled hole. More...
 
class  IDF_POINT
 A point as used by the various IDF related classes. More...
 
class  IDF_SEGMENT
 A segment as used in IDFv3 outlines. More...
 
class  IDF_OUTLINE
 A segment and winding information for an IDF outline. More...
 

Namespaces

namespace  IDF3
 

Macros

#define MIN_ANG   (0.01)
 

Enumerations

enum class  IDF3::FILE_STATE {
  IDF3::FILE_START = 0 , IDF3::FILE_HEADER , IDF3::FILE_OUTLINE , IDF3::FILE_PLACEMENT ,
  IDF3::FILE_INVALID , IDF3::FILE_ERROR
}
 State values for the IDF parser's input. More...
 
enum class  IDF3::IDF_VERSION { IDF3::IDF_V2 = 0 , IDF3::IDF_V3 }
 The supported IDF versions (3.0 and 2.0 ONLY). More...
 
enum class  IDF3::KEY_OWNER { IDF3::UNOWNED = 0 , IDF3::MCAD , IDF3::ECAD }
 The type of CAD which has ownership an object. More...
 
enum class  IDF3::KEY_HOLETYPE {
  IDF3::PIN = 0 , IDF3::VIA , IDF3::MTG , IDF3::TOOL ,
  IDF3::OTHER
}
 The purpose of an IDF hole. More...
 
enum class  IDF3::KEY_PLATING { IDF3::PTH = 0 , IDF3::NPTH }
 The plating condition of a hole. More...
 
enum class  IDF3::KEY_REFDES { IDF3::BOARD = 0 , IDF3::NOREFDES , IDF3::PANEL , IDF3::REFDES }
 A component's Reference Designator. More...
 
enum class  IDF3::CAD_TYPE { IDF3::CAD_ELEC = 0 , IDF3::CAD_MECH , IDF3::CAD_INVALID }
 The class of CAD program which is opening or modifying a file. More...
 
enum class  IDF3::IDF_LAYER {
  IDF3::LYR_TOP = 0 , IDF3::LYR_BOTTOM , IDF3::LYR_BOTH , IDF3::LYR_INNER ,
  IDF3::LYR_ALL , IDF3::LYR_INVALID
}
 The various IDF layer classes and groupings. More...
 
enum class  IDF3::OUTLINE_TYPE {
  IDF3::OTLN_BOARD = 0 , IDF3::OTLN_OTHER , IDF3::OTLN_PLACE , IDF3::OTLN_ROUTE ,
  IDF3::OTLN_PLACE_KEEPOUT , IDF3::OTLN_ROUTE_KEEPOUT , IDF3::OTLN_VIA_KEEPOUT , IDF3::OTLN_GROUP_PLACE ,
  IDF3::OTLN_COMPONENT , IDF3::OTLN_INVALID
}
 The class of outline. More...
 
enum class  IDF3::COMP_TYPE { IDF3::COMP_ELEC = 0 , IDF3::COMP_MECH , IDF3::COMP_INVALID }
 Whether a component is a mechanical or electrical part. More...
 
enum class  IDF3::IDF_UNIT { IDF3::UNIT_MM = 0 , IDF3::UNIT_THOU , IDF3::UNIT_TNM , IDF3::UNIT_INVALID }
 The native unit of the board and of component outlines. More...
 
enum class  IDF3::IDF_PLACEMENT {
  IDF3::PS_UNPLACED = 0 , IDF3::PS_PLACED , IDF3::PS_MCAD , IDF3::PS_ECAD ,
  IDF3::PS_INVALID
}
 The placement status of a component. More...
 

Functions

double IDF3::CalcAngleRad (const IDF_POINT &aStartPoint, const IDF_POINT &aEndPoint)
 Calculate the angle (radians) between the horizon and the segment aStartPoint to aEndPoint.
 
double IDF3::CalcAngleDeg (const IDF_POINT &aStartPoint, const IDF_POINT &aEndPoint)
 Calculate the angle (degrees) between the horizon and the segment aStartPoint to aEndPoint.
 
void IDF3::GetOutline (std::list< IDF_SEGMENT * > &aLines, IDF_OUTLINE &aOutline)
 Take contiguous elements from 'aLines' and stuffs them into 'aOutline'; elements put into the outline are deleted from aLines.
 

Macro Definition Documentation

◆ MIN_ANG