KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DIPTRACE Namespace Reference

Classes

class  BINARY_READER
 Low-level binary reader for DipTrace file formats. More...
 
struct  DCH_BUS_ENTRY
 A bus entry as read from the bus section. More...
 
struct  DCH_COMPONENT
 A component as read from the .dch file. More...
 
struct  DCH_COMPONENT_TEXT
 A stored component text field record that precedes the embedded footprint pattern. More...
 
struct  DCH_NET_ENTRY
 A net label/wire entry from the net section. More...
 
struct  DCH_PAGE
 Decoded page geometry. More...
 
struct  DCH_PIN
 A component pin as stored in the .dch file. More...
 
struct  DCH_SHAPE
 A graphical shape primitive (polyline) in a component. More...
 
struct  DCH_SHEET_DEF
 Sheet definition as read from the file header. More...
 
struct  DCH_SHEET_SHAPE
 A top-level schematic sheet graphical primitive. More...
 
struct  DCH_WIRE
 A single schematic wire decoded from the net/wire section. More...
 
struct  DT_COMPONENT
 
struct  DT_DESIGN_RULE
 
struct  DT_FP_SHAPE
 
struct  DT_LAYER
 
struct  DT_MOUNT_HOLE
 
struct  DT_NET
 
struct  DT_PAD
 
struct  DT_PAD_REF
 
struct  DT_TEXT_OBJECT
 
struct  DT_TRACK_CHAIN
 
struct  DT_TRACK_NODE
 
struct  DT_VERTEX
 
struct  DT_VIA_STYLE
 
struct  DT_ZONE
 
struct  DT_ZONE_CACHED_FILL_RECORD
 
class  PCB_PARSER
 Parses a DipTrace .dip binary board file and populates a KiCad BOARD. More...
 
class  SCH_PARSER
 Parser for DipTrace .dch schematic binary files. More...
 

Enumerations

enum class  STRING_ENCODING { BY_VERSION , LEGACY_ASCII , UTF16_BE }
 
enum  DT_SHAPE_TYPE {
  DT_SHAPE_EMPTY = 0 , DT_SHAPE_LINE = 1 , DT_SHAPE_RECT = 2 , DT_SHAPE_CIRCLE = 3 ,
  DT_SHAPE_ARC = 6 , DT_SHAPE_FILLOBROUND = 700 , DT_SHAPE_END = -1
}
 

Variables

constexpr int INT3_BIAS = 1000000
 Bias value added to stored 3-byte unsigned integers.
 
constexpr int INT4_BIAS = 1000000000
 Bias value added to stored 4-byte unsigned integers.
 
constexpr double DIPTRACE_COORD_TO_MM = 1.0 / 30000.0
 DipTrace uses 762 units per mil (30 000 units per mm).
 
constexpr double DIPTRACE_ANGLE_TO_DEG = 0.00001
 DipTrace stores angles with 100 000 units per degree.
 
constexpr int LEGACY_STRING_VERSION = 37
 Format version at or below which strings use the legacy ASCII encoding (int3 byte-count + raw ASCII bytes).
 
constexpr int MAX_STRING_CHARS = 10000
 Maximum sane string length (in characters) accepted by the reader.
 

Enumeration Type Documentation

◆ DT_SHAPE_TYPE

Enumerator
DT_SHAPE_EMPTY 
DT_SHAPE_LINE 
DT_SHAPE_RECT 
DT_SHAPE_CIRCLE 
DT_SHAPE_ARC 
DT_SHAPE_FILLOBROUND 

Filled obround marker (e.g. diode cathode / pin-1 dot)

DT_SHAPE_END 

Definition at line 127 of file diptrace_pcb_parser.h.

◆ STRING_ENCODING

enum class DIPTRACE::STRING_ENCODING
strong
Enumerator
BY_VERSION 
LEGACY_ASCII 
UTF16_BE 

Definition at line 37 of file diptrace_binary_reader.h.

Variable Documentation

◆ DIPTRACE_ANGLE_TO_DEG

double DIPTRACE::DIPTRACE_ANGLE_TO_DEG = 0.00001
constexpr

DipTrace stores angles with 100 000 units per degree.

Definition at line 58 of file diptrace_binary_reader.h.

Referenced by DIPTRACE::PCB_PARSER::ToKiCadAngleDeg().

◆ DIPTRACE_COORD_TO_MM

double DIPTRACE::DIPTRACE_COORD_TO_MM = 1.0 / 30000.0
constexpr

DipTrace uses 762 units per mil (30 000 units per mm).

1 DipTrace unit = 100/3 nm ≈ 33.33 nm. The fractional scale requires int64 arithmetic in the conversion functions.

Definition at line 55 of file diptrace_binary_reader.h.

Referenced by DIPTRACE::BINARY_READER::DipTraceToMM().

◆ INT3_BIAS

◆ INT4_BIAS

◆ LEGACY_STRING_VERSION

int DIPTRACE::LEGACY_STRING_VERSION = 37
constexpr

Format version at or below which strings use the legacy ASCII encoding (int3 byte-count + raw ASCII bytes).

Versions above this threshold use the modern encoding (uint16-BE char-count + UTF-16-BE data).

Individual format parsers (PCB, schematic) may define additional version thresholds for structural layout differences that are independent of string encoding. For example, the schematic parser uses a separate cutover version for field layout changes specific to the .dch format.

Definition at line 68 of file diptrace_binary_reader.h.

Referenced by DIPTRACE::PCB_PARSER::FindAndParseZones(), DIPTRACE::PCB_PARSER::FindMountHolesInRegion(), DIPTRACE::PCB_PARSER::FindPadsInRegion(), DIPTRACE::PCB_PARSER::FindShapesInRegion(), DIPTRACE::PCB_PARSER::ParseBoardProperties(), DIPTRACE::PCB_PARSER::ParseFontStyle(), DIPTRACE::SCH_PARSER::parsePreComponentSettings(), DIPTRACE::SCH_PARSER::parseTextStyles(), DIPTRACE::BINARY_READER::ReadString(), DIPTRACE::PCB_PARSER::SkipInterRulesetTransition(), StringFieldSize(), DIPTRACE::BINARY_READER::TryReadString(), and DIPTRACE::PCB_PARSER::TryReadStringAt().

◆ MAX_STRING_CHARS

int DIPTRACE::MAX_STRING_CHARS = 10000
constexpr

Maximum sane string length (in characters) accepted by the reader.

Anything larger is treated as a corrupt read.

Definition at line 72 of file diptrace_binary_reader.h.

Referenced by DIPTRACE::BINARY_READER::ReadStringASCII(), DIPTRACE::BINARY_READER::ReadStringUTF16(), and StringFieldSize().