KiCad PCB EDA Suite
|
#include <memory>
#include "altium_parser_sch.h"
#include <io/io_utils.h>
#include <io/altium/altium_binary_parser.h>
#include <io/altium/altium_ascii_parser.h>
#include <io/altium/altium_parser_utils.h>
#include <sch_io/altium/sch_io_altium.h>
#include <schematic.h>
#include <project_sch.h>
#include <project/project_file.h>
#include <project/net_settings.h>
#include <lib_id.h>
#include <sch_pin.h>
#include <sch_bitmap.h>
#include <sch_bus_entry.h>
#include <sch_symbol.h>
#include <sch_junction.h>
#include <sch_line.h>
#include <sch_shape.h>
#include <sch_no_connect.h>
#include <sch_screen.h>
#include <sch_label.h>
#include <sch_sheet.h>
#include <sch_sheet_pin.h>
#include <sch_textbox.h>
#include <symbol_lib_table.h>
#include <bezier_curves.h>
#include <compoundfilereader.h>
#include <font/fontconfig.h>
#include <geometry/ellipse.h>
#include <string_utils.h>
#include <sch_edit_frame.h>
#include <wildcards_and_files_ext.h>
#include <wx/log.h>
#include <wx/dir.h>
#include <wx/mstream.h>
#include <wx/zstream.h>
#include <wx/wfstream.h>
#include <magic_enum.hpp>
Go to the source code of this file.
Macros | |
#define | HARNESS_PORT_COLOR_DEFAULT_BACKGROUND |
#define | HARNESS_PORT_COLOR_DEFAULT_OUTLINE |
Functions | |
static const VECTOR2I | GetRelativePosition (const VECTOR2I &aPosition, const SCH_SYMBOL *aSymbol) |
static COLOR4D | GetColorFromInt (int color) |
static LINE_STYLE | GetPlotDashType (const ASCH_POLYLINE_LINESTYLE linestyle) |
static void | SetSchShapeLine (const ASCH_BORDER_INTERFACE &elem, SCH_SHAPE *shape) |
static void | SetSchShapeFillAndColor (const ASCH_FILL_INTERFACE &elem, SCH_SHAPE *shape) |
static void | SetLibShapeLine (const ASCH_BORDER_INTERFACE &elem, SCH_SHAPE *shape, ALTIUM_SCH_RECORD aType) |
static void | SetLibShapeFillAndColor (const ASCH_FILL_INTERFACE &elem, SCH_SHAPE *shape, ALTIUM_SCH_RECORD aType, int aStrokeColor) |
void | SetTextPositioning (EDA_TEXT *text, ASCH_LABEL_JUSTIFICATION justification, ASCH_RECORD_ORIENTATION orientation) |
VECTOR2I | HelperGeneratePowerPortGraphics (LIB_SYMBOL *aKsymbol, ASCH_POWER_PORT_STYLE aStyle, REPORTER *aReporter) |
Variables | |
static const wxChar | traceAltiumSch [] = wxT( "KICAD_ALTIUM_SCH" ) |
Flag to enable Altium schematic debugging output. | |
#define HARNESS_PORT_COLOR_DEFAULT_BACKGROUND |
Definition at line 81 of file sch_io_altium.cpp.
#define HARNESS_PORT_COLOR_DEFAULT_OUTLINE |
Definition at line 85 of file sch_io_altium.cpp.
|
static |
Definition at line 97 of file sch_io_altium.cpp.
References color, KIGFX::COLOR4D::FromCSSRGBA(), and red.
Referenced by SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_ALTIUM::AddTextBox(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParseHarnessConnector(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParseSheetSymbol(), SCH_IO_ALTIUM::ParseSignalHarness(), SetLibShapeFillAndColor(), SetLibShapeLine(), SetSchShapeFillAndColor(), and SetSchShapeLine().
|
static |
Definition at line 107 of file sch_io_altium.cpp.
References DASH, DASH_DOTTED, DASHDOT, DASHED, DEFAULT, DOT, DOTTED, and SOLID.
Referenced by SCH_IO_ALTIUM::ParseLine(), and SCH_IO_ALTIUM::ParsePolyline().
|
static |
Definition at line 90 of file sch_io_altium.cpp.
References SCH_SYMBOL::GetPosition(), SCH_SYMBOL::GetTransform(), TRANSFORM::InverseTransform(), and TRANSFORM::TransformCoordinate().
Referenced by SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParseBezier(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParseEllipticalArc(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParsePieChart(), SCH_IO_ALTIUM::ParsePin(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParseRectangle(), and SCH_IO_ALTIUM::ParseRoundRectangle().
VECTOR2I HelperGeneratePowerPortGraphics | ( | LIB_SYMBOL * | aKsymbol, |
ASCH_POWER_PORT_STYLE | aStyle, | ||
REPORTER * | aReporter | ||
) |
Definition at line 3139 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), ARROW, BAR, BEZIER, CIRCLE, EARTH, SCH_SHAPE::GetPosition(), GOST_ARROW, GOST_BAR, GOST_EARTH, GOST_POWER_GROUND, LAYER_DEVICE, EDA_IU_SCALE::MilsToIU(), POLY, POWER_GROUND, REPORTER::Report(), RPT_SEVERITY_WARNING, schIUScale, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), SCH_SHAPE::SetPosition(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), SIGNAL_GROUND, SOLID, and WAVE.
Referenced by SCH_EASYEDA_PARSER::MakePowerSymbol(), and SCH_IO_ALTIUM::ParsePowerPort().
|
static |
Definition at line 187 of file sch_io_altium.cpp.
References ASCH_FILL_INTERFACE::AreaColor, CIRCLE, FILLED_SHAPE, FILLED_WITH_BG_BODYCOLOR, FILLED_WITH_COLOR, STROKE_PARAMS::GetColor(), GetColorFromInt(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetShape(), SCH_SHAPE::GetStroke(), STROKE_PARAMS::GetWidth(), ASCH_FILL_INTERFACE::IsSolid, ASCH_FILL_INTERFACE::IsTransparent, EDA_IU_SCALE::MilsToIU(), NO_FILL, RECTANGLE, schIUScale, EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), SCH_SHAPE::SetStroke(), STROKE_PARAMS::SetWidth(), and KIGFX::COLOR4D::WithAlpha().
Referenced by SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParseRectangle(), and SCH_IO_ALTIUM::ParseRoundRectangle().
|
static |
Definition at line 148 of file sch_io_altium.cpp.
References ARC, BEZIER, BLACK, ASCH_BORDER_INTERFACE::Color, ELLIPSE, ELLIPTICAL_ARC, STROKE_PARAMS::GetColor(), GetColorFromInt(), LINE, ASCH_BORDER_INTERFACE::LineWidth, POLYGON, POLYLINE, PUREBLUE, PURERED, RECTANGLE, ROUND_RECTANGLE, STROKE_PARAMS::SetColor(), STROKE_PARAMS::SetLineStyle(), SCH_SHAPE::SetStroke(), STROKE_PARAMS::SetWidth(), SOLID, and KIGFX::COLOR4D::UNSPECIFIED.
Referenced by SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParseEllipticalArc(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParsePieChart(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParseRectangle(), and SCH_IO_ALTIUM::ParseRoundRectangle().
|
static |
Definition at line 126 of file sch_io_altium.cpp.
References ASCH_FILL_INTERFACE::AreaColor, CIRCLE, FILLED_SHAPE, FILLED_WITH_COLOR, GetColorFromInt(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetShape(), SCH_SHAPE::GetStroke(), STROKE_PARAMS::GetWidth(), ASCH_FILL_INTERFACE::IsSolid, EDA_IU_SCALE::MilsToIU(), NO_FILL, schIUScale, EDA_SHAPE::SetFillColor(), and EDA_SHAPE::SetFillMode().
Referenced by SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParseRectangle(), and SCH_IO_ALTIUM::ParseRoundRectangle().
|
static |
Definition at line 120 of file sch_io_altium.cpp.
References ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), ASCH_BORDER_INTERFACE::LineWidth, SCH_SHAPE::SetStroke(), and SOLID.
Referenced by SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParseRectangle(), and SCH_IO_ALTIUM::ParseRoundRectangle().
void SetTextPositioning | ( | EDA_TEXT * | text, |
ASCH_LABEL_JUSTIFICATION | justification, | ||
ASCH_RECORD_ORIENTATION | orientation | ||
) |
Definition at line 1440 of file sch_io_altium.cpp.
References ANGLE_HORIZONTAL, ANGLE_VERTICAL, BOTTOM_CENTER, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER_CENTER, CENTER_LEFT, CENTER_RIGHT, DOWNWARDS, GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, LEFTWARDS, RIGHTWARDS, text, TOP_CENTER, TOP_LEFT, TOP_RIGHT, UNKNOWN, and UPWARDS.
Referenced by SCH_IO_ALTIUM::ParseDesignator(), SCH_IO_ALTIUM::ParseFileName(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibParameter(), SCH_IO_ALTIUM::ParseNetLabel(), SCH_IO_ALTIUM::ParseParameter(), and SCH_IO_ALTIUM::ParseSheetName().