KiCad PCB EDA Suite
Loading...
Searching...
No Matches
target3001_parser.h File Reference
#include <array>
#include <cmath>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include <wx/datetime.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  TARGET3001::ELEMENT_BASE
 Fields shared by every drawable element. More...
 
struct  TARGET3001::LINE
 
struct  TARGET3001::PIN
 Schematic pin. The base position is the connection point; the pin extends along direction. More...
 
struct  TARGET3001::PAD
 
struct  TARGET3001::TRIANGLE
 Filled triangle given by three absolute corners (the first is the base position). More...
 
struct  TARGET3001::RECTANGLE
 Filled rectangle anchored at a corner (the base position); sizes are signed. More...
 
struct  TARGET3001::ARC
 Stroked arc or circle. The base position is the start point. More...
 
struct  TARGET3001::DISC
 Filled disc centred on the base position. More...
 
struct  TARGET3001::FIDUCIAL
 
struct  TARGET3001::SPLINE
 Quadratic Bezier from the base position to the end point. More...
 
struct  TARGET3001::TEXT
 
struct  TARGET3001::DRC_MARKER
 
struct  TARGET3001::SYMBOL
 One schematic gate of a component. Children are already in sheet coordinates. More...
 
struct  TARGET3001::PACKAGE
 Footprint placement. Pads and graphics of the footprint are stored in board coordinates. More...
 
struct  TARGET3001::COMPONENT
 
struct  TARGET3001::SIGNAL
 
struct  TARGET3001::ELEMENT
 One element of any class. More...
 
struct  TARGET3001::PADSTACK_DEF
 Project padstack; the board layers a pad exists on and how far it grows on each. More...
 
struct  TARGET3001::PROJECT_SETTINGS
 Settings that the importers use. The rest of the settings block is validated and skipped. More...
 
struct  TARGET3001::PROJECT
 

Namespaces

namespace  TARGET3001
 Reader for TARGET 3001!
 

Enumerations

enum class  TARGET3001::ELEMENT_TYPE : uint8_t {
  TARGET3001::LINE = 1 , TARGET3001::PIN = 2 , TARGET3001::PAD = 3 , TARGET3001::TRIANGLE = 4 ,
  TARGET3001::RECTANGLE = 5 , TARGET3001::ARC = 6 , TARGET3001::DISC = 7 , TARGET3001::TEXT = 8 ,
  TARGET3001::FIDUCIAL = 9 , TARGET3001::COMPONENT = 10 , TARGET3001::SYMBOL = 11 , TARGET3001::PACKAGE = 12 ,
  TARGET3001::SIGNAL = 13 , TARGET3001::SPLINE = 14 , TARGET3001::DRC_MARKER = 15 , TARGET3001::LIST = 16 ,
  TARGET3001::LAYER_FUNCTIONS = 17 , TARGET3001::NONE = 255
}
 Element class tags as stored in the file. More...
 
enum class  TARGET3001::PAD_SHAPE : uint8_t {
  TARGET3001::ROUND = 0 , TARGET3001::OCTAGON = 1 , TARGET3001::RECTANGLE = 2 , TARGET3001::OVAL = 3 ,
  TARGET3001::POLYGON = 4
}
 
enum class  TARGET3001::FIDUCIAL_KIND : uint8_t { TARGET3001::CROSSHAIR_RINGS = 0 , TARGET3001::TRIANGLE_DIAMETER = 1 , TARGET3001::PAIRED_SECTORS = 2 , TARGET3001::FILLED_CIRCLE = 3 }
 Drawing of a fiducial mark. More...
 
enum class  TARGET3001::TEXT_FUNCTION : uint8_t {
  TARGET3001::LITERAL = 0 , TARGET3001::REFERENCE = 1 , TARGET3001::VALUE = 2 , TARGET3001::GATE_NAME = 3 ,
  TARGET3001::SIGNAL_NAME = 4 , TARGET3001::PIN_NAME = 5 , TARGET3001::CHANGE_DATE = 11 , TARGET3001::CHANGE_TIME = 12 ,
  TARGET3001::OUTPUT_DATE = 13 , TARGET3001::OUTPUT_TIME = 14 , TARGET3001::SCALE = 15 , TARGET3001::PROJECT_NAME = 16 ,
  TARGET3001::SHEET_NUMBER = 100 , TARGET3001::FILE_NAME = 103 , TARGET3001::PAGE_NAME = 105
}
 
enum class  TARGET3001::TEXT_LANGUAGE : uint8_t { TARGET3001::GERMAN = 0 , TARGET3001::ENGLISH = 1 , TARGET3001::FRENCH = 2 }
 
enum class  TARGET3001::LAYER_FUNCTION : uint8_t {
  TARGET3001::COPPER_BOTTOM = 0 , TARGET3001::COPPER_INSIDE = 1 , TARGET3001::COPPER_TOP = 2 , TARGET3001::POSITION_BOTTOM = 3 ,
  TARGET3001::POSITION_TOP = 4 , TARGET3001::DELETION_BOTTOM = 5 , TARGET3001::DELETION_INSIDE = 6 , TARGET3001::DELETION_TOP = 7 ,
  TARGET3001::AREA_BOTTOM = 8 , TARGET3001::AREA_INSIDE = 9 , TARGET3001::AREA_TOP = 10 , TARGET3001::MASK_BOTTOM = 11 ,
  TARGET3001::MASK_TOP = 12 , TARGET3001::DRILL_PLAN = 13 , TARGET3001::PASTE_BOTTOM = 14 , TARGET3001::PASTE_TOP = 15 ,
  TARGET3001::GOLD_BOTTOM = 16 , TARGET3001::GOLD_TOP = 17 , TARGET3001::GLUE_BOTTOM = 18 , TARGET3001::GLUE_TOP = 19 ,
  TARGET3001::DIMENSIONING = 20 , TARGET3001::OUTLINE = 21 , TARGET3001::MILLING = 22 , TARGET3001::PAD_NUMBERS = 23 ,
  TARGET3001::OTHER = 24 , TARGET3001::AIR_WIRES = 25 , TARGET3001::NAMES_TOP = 41 , TARGET3001::VALUES_TOP = 42 ,
  TARGET3001::NAMES_BOTTOM = 43 , TARGET3001::VALUES_BOTTOM = 44
}
 Board layer function codes stored per layer in the project header. More...
 

Functions

PROJECT TARGET3001::ParseFile (const wxString &aFileName)
 Parse a complete .T3001 file.
 
PROJECT TARGET3001::ParseBuffer (const std::vector< uint8_t > &aData)
 Parse a project held in memory.
 
bool TARGET3001::LooksLikeProject (const wxString &aFileName)
 Cheap check used by the plugin managers: the extension matches and the header is plausible.
 
wxString TARGET3001::ToWx (const std::string &aRaw)
 Convert a stored ANSI string to a wxString.
 
wxString TARGET3001::PadNumber (const ELEMENT &aPad)
 Number of a pad element in KiCad, its PADNAME when present, else its stored number.
 

Variables

constexpr int TARGET3001::SCHEMATIC_LAYER_BASE = 100
 First layer number used for schematic sheets; sheet N (1-based) is layer 100 + N.
 
constexpr int TARGET3001::SCHEMATIC_SHEET_COUNT = 100
 Sheets occupy layers 101 to 200.
 
constexpr int TARGET3001::ALL_COPPER_LAYER = 100
 Board elements on this layer exist on every copper layer.
 
constexpr int TARGET3001::BOARD_LAYER_COUNT = 100
 Board layers 0..99 carry a per-project function; 100 and above have fixed meanings.
 
constexpr int TARGET3001::FIRST_PADSTACK_LAYER = 101
 A pad on board layer FIRST_PADSTACK_LAYER + n takes its layers from project padstack n.
 
constexpr uint8_t TARGET3001::NO_ASSOCIATION = 255
 Layer association value for a layer that belongs to no copper layer.