KiCad PCB EDA Suite
Loading...
Searching...
No Matches
diptrace_sch_parser.cpp File Reference
#include <sch_io/diptrace/diptrace_sch_parser.h>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <limits>
#include <memory>
#include <optional>
#include <set>
#include <wx/filename.h>
#include <wx/log.h>
#include <base_units.h>
#include <lib_id.h>
#include <lib_symbol.h>
#include <page_info.h>
#include <progress_reporter.h>
#include <project.h>
#include <reporter.h>
#include <sch_bus_entry.h>
#include <sch_junction.h>
#include <sch_label.h>
#include <sch_line.h>
#include <sch_pin.h>
#include <sch_screen.h>
#include <sch_shape.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <sch_symbol.h>
#include <schematic.h>
#include <string_utils.h>
#include <wildcards_and_files_ext.h>

Go to the source code of this file.

Functions

static bool libSymbolHasUnit (const LIB_SYMBOL *aLibSymbol, int aUnit)
 
static int dipTraceMm (double aMm)
 
static VECTOR2I dipTraceShapePoint (double aXmm, double aYmm)
 
static DCH_SHAPE makeDipTraceShape (int aKindCode, double aLineWidthMm, std::initializer_list< VECTOR2I > aPoints)
 
static bool needsStandardThtLedShape (const DCH_COMPONENT &aComp)
 
static std::vector< DCH_SHAPEstandardThtLedShapes ()
 
static bool isPlausibleNetName (const uint8_t *aData, size_t aPos, size_t aSectionEnd)
 
static KIGFX::COLOR4D dipTraceSheetShapeColor (const DCH_SHEET_SHAPE &aShape)
 

Variables

static constexpr int V31_CUTOVER = 34
 Structural layout version threshold for the .dch schematic format.
 
static constexpr int SCHEMATIC_UTF16_STRING_VERSION = V31_CUTOVER
 

Function Documentation

◆ dipTraceMm()

static int dipTraceMm ( double aMm)
static

Definition at line 2537 of file diptrace_sch_parser.cpp.

Referenced by dipTraceShapePoint(), and makeDipTraceShape().

◆ dipTraceShapePoint()

static VECTOR2I dipTraceShapePoint ( double aXmm,
double aYmm )
static

Definition at line 2543 of file diptrace_sch_parser.cpp.

References dipTraceMm().

Referenced by standardThtLedShapes().

◆ dipTraceSheetShapeColor()

static KIGFX::COLOR4D dipTraceSheetShapeColor ( const DCH_SHEET_SHAPE & aShape)
static

◆ isPlausibleNetName()

static bool isPlausibleNetName ( const uint8_t * aData,
size_t aPos,
size_t aSectionEnd )
static

◆ libSymbolHasUnit()

static bool libSymbolHasUnit ( const LIB_SYMBOL * aLibSymbol,
int aUnit )
static

◆ makeDipTraceShape()

static DCH_SHAPE makeDipTraceShape ( int aKindCode,
double aLineWidthMm,
std::initializer_list< VECTOR2I > aPoints )
static

◆ needsStandardThtLedShape()

◆ standardThtLedShapes()

static std::vector< DCH_SHAPE > standardThtLedShapes ( )
static

Variable Documentation

◆ SCHEMATIC_UTF16_STRING_VERSION

int SCHEMATIC_UTF16_STRING_VERSION = V31_CUTOVER
staticconstexpr

◆ V31_CUTOVER

int V31_CUTOVER = 34
staticconstexpr

Structural layout version threshold for the .dch schematic format.

Versions below V31_CUTOVER (< 34) have different field layouts in several sections: extra int3 fields, different padding, and alternate single-part encoding. This controls structural byte-layout differences only.

This is independent of schematic string encoding, which switches to UTF-16-BE at v34 while PCB keeps the shared legacy <=37 ASCII threshold.

Definition at line 73 of file diptrace_sch_parser.cpp.

Referenced by DIPTRACE::SCH_PARSER::isFontBearingShapeStart(), DIPTRACE::SCH_PARSER::isShapeStart(), DIPTRACE::SCH_PARSER::parseDisplaySettings(), DIPTRACE::SCH_PARSER::parseEmbeddedPattern(), DIPTRACE::SCH_PARSER::parseNetSection(), DIPTRACE::SCH_PARSER::parseOneComponent(), DIPTRACE::SCH_PARSER::parsePin(), DIPTRACE::SCH_PARSER::parseShape(), and DIPTRACE::SCH_PARSER::parseSheetShapes().