43 wxString ret( aNetName );
45 ret.Replace(
"!",
"~" );
53 wxString token = aText;
59 bool sectionOpen =
false;
61 for( wxString::size_type i = 0; i < aText.size(); i++ )
64 if( aText[ i ] ==
'\\' )
66 if( i + 1 != aText.size() )
67 text.Append( aText[ i + 1 ] );
81 if( aText[ i ] ==
'!' )
90 static wxString escapeChars( wxT(
" )]}'\"" ) );
92 if( i + 1 != aText.size() && escapeChars.Find( aText[i + 1] ) == wxNOT_FOUND )
99 text.Append( aText[ i ] );
105 if( aText[i] ==
',' && sectionOpen )
111 text.Append( aText[ i ] );
120 if( aText->StartsWith(
'>' ) && aText->AfterFirst(
' ' ).IsEmpty() )
122 wxString token = aText->Upper();
124 if ( token == wxT(
">NAME" ) ) *aText = wxT(
"${REFERENCE}" );
125 else if( token == wxT(
">VALUE" ) ) *aText = wxT(
"${VALUE}" );
126 else if( token == wxT(
">PART" ) ) *aText = wxT(
"${REFERENCE}" );
127 else if( token == wxT(
">GATE" ) ) *aText = wxT(
"${UNIT}" );
128 else if( token == wxT(
">MODULE" ) ) *aText = wxT(
"${FOOTPRINT_NAME}" );
129 else if( token == wxT(
">SHEETNR" ) ) *aText = wxT(
"${#}" );
130 else if( token == wxT(
">SHEETS" ) ) *aText = wxT(
"${##}" );
131 else if( token == wxT(
">SHEET" ) ) *aText = wxT(
"${#}/${##}" );
132 else if( token == wxT(
">SHEETNR_TOTAL" ) ) *aText = wxT(
"${#}" );
133 else if( token == wxT(
">SHEETS_TOTAL" ) ) *aText = wxT(
"${##}" );
134 else if( token == wxT(
">SHEET_TOTAL" ) ) *aText = wxT(
"${#}/${##}" );
135 else if( token == wxT(
">SHEET_HEADLINE" ) ) *aText = wxT(
"${SHEETNAME}" );
136 else if( token == wxT(
">ASSEMBLY_VARIANT" ) ) *aText = wxT(
"${ASSEMBLY_VARIANT}" );
137 else if( token == wxT(
">DRAWING_NAME" ) ) *aText = wxT(
"${PROJECTNAME}" );
138 else if( token == wxT(
">LAST_DATE_TIME" ) ) *aText = wxT(
"${CURRENT_DATE}" );
139 else if( token == wxT(
">PLOT_DATE_TIME" ) ) *aText = wxT(
"${CURRENT_DATE}" );
140 else *aText = wxString::Format( wxS(
"${%s}" ), aText->Mid( 1 ).Trim() );
151 aDescr.Replace( wxS(
"\n" ), wxS(
" " ) );
152 aDescr.Replace( wxS(
"\r" ), wxEmptyString );
154 wxRegEx( wxS(
"<a\\s+(?:[^>]*?\\s+)?href=\"([^\"]*)\"[^>]*>" ) )
155 .ReplaceAll( &aDescr, wxS(
"\\1 " ) );
157 aDescr.Replace( wxS(
"<p>" ), wxS(
"\n\n" ) );
158 aDescr.Replace( wxS(
"</p>" ), wxS(
"\n\n" ) );
160 aDescr.Replace( wxS(
"<br>" ), wxS(
"\n" ) );
161 aDescr.Replace( wxS(
"<ul>" ), wxS(
"\n" ) );
162 aDescr.Replace( wxS(
"</ul>" ), wxS(
"\n\n" ) );
163 aDescr.Replace( wxS(
"<li></li>" ), wxS(
"\n" ) );
164 aDescr.Replace( wxS(
"<li>" ), wxS(
"\n \u2022 " ) );
168 wxRegEx( wxS(
"\n +" ) ).ReplaceAll( &aDescr, wxS(
"\n" ) );
169 wxRegEx( wxS(
" +\n" ) ).ReplaceAll( &aDescr, wxS(
"\n" ) );
171 wxRegEx( wxS(
"\n{3,}" ) ).ReplaceAll( &aDescr, wxS(
"\n\n" ) );
172 wxRegEx( wxS(
"^\n+" ) ).ReplaceAll( &aDescr, wxEmptyString );
173 wxRegEx( wxS(
"\n+$" ) ).ReplaceAll( &aDescr, wxEmptyString );
182 m_isAvailable = !aData.IsEmpty();
193 constexpr int DIVIDERS[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000 };
194 constexpr unsigned int DIVIDERS_MAX_IDX =
sizeof( DIVIDERS ) /
sizeof( DIVIDERS[0] ) - 1;
196 int integer, fraction, pre_fraction, post_fraction;
200 bool negative = ( aValue[0] ==
'-' );
204 int ret = sscanf( aValue.c_str(),
"%d.%n%d%n", &integer, &pre_fraction, &fraction,
216 int digits = post_fraction - pre_fraction;
220 if( (
unsigned) digits > DIVIDERS_MAX_IDX )
222 int diff = digits - DIVIDERS_MAX_IDX;
223 digits = DIVIDERS_MAX_IDX;
224 fraction /= DIVIDERS[diff];
227 int frac_value =
ConvertToNm( fraction, aUnit ) / DIVIDERS[digits];
242 case EU_NM: ret = aValue;
break;
243 case EU_MM: ret = (
long long) aValue * 1000000;
break;
244 case EU_INCH: ret = (
long long) aValue * 25400000;
break;
245 case EU_MIL: ret = (
long long) aValue * 25400;
break;
248 if( ( ret > 0 ) != ( aValue > 0 ) )
249 wxLogError(
_(
"Invalid size %lld: too large" ), aValue );
274 return std::string( aValue.ToUTF8() );
283 if( aValue.ToCDouble( &value ) )
287 aValue.ToStdString() +
"'." );
294 if( aValue.IsEmpty() )
295 throw XML_PARSER_ERROR(
"Conversion to int failed. Original value is empty." );
297 return wxAtoi( aValue );
304 if( aValue !=
"yes" && aValue !=
"no" )
306 aValue.ToStdString() +
307 "', is neither 'yes' nor 'no'." );
309 return aValue ==
"yes";
320 value.
spin = aRot.find(
'S' ) != aRot.npos;
321 value.
mirror = aRot.find(
'M' ) != aRot.npos;
322 value.
degrees = strtod( aRot.c_str()
353 if( aNode->GetAttribute( aAttribute, &value ) )
354 return Convert<T>( value );
356 throw XML_PARSER_ERROR(
"The required attribute " + aAttribute +
" is missing." );
382 aCurrentNode = aCurrentNode->GetChildren();
384 while( aCurrentNode )
389 nodesMap[aCurrentNode->GetName()] = aCurrentNode;
392 aCurrentNode = aCurrentNode->GetNext();
403 double dx = aEnd.
x - aStart.
x, dy = aEnd.
y - aStart.
y;
404 VECTOR2I mid = ( aStart + aEnd ) / 2;
406 double dlen = sqrt( dx*dx + dy*dy );
408 if( !std::isnormal( dlen ) || !std::isnormal( aAngle ) )
410 THROW_IO_ERROR( wxString::Format(
_(
"Invalid Arc with radius %f and angle %f" ),
415 double dist = dlen / ( 2 * tan(
DEG2RAD( aAngle ) / 2 ) );
418 mid.
x + dist * ( dy / dlen ),
419 mid.
y - dist * ( dx / dlen )
430 if( aAlignment ==
"center" )
432 else if( aAlignment ==
"center-right" )
434 else if( aAlignment ==
"top-left" )
436 else if( aAlignment ==
"top-center" )
438 else if( aAlignment ==
"top-right" )
440 else if( aAlignment ==
"bottom-left" )
442 else if( aAlignment ==
"bottom-center" )
444 else if( aAlignment ==
"bottom-right" )
446 else if( aAlignment ==
"center-left" )
471 x1 = parseRequiredAttribute<ECOORD>( aWire,
"x1" );
472 y1 = parseRequiredAttribute<ECOORD>( aWire,
"y1" );
473 x2 = parseRequiredAttribute<ECOORD>( aWire,
"x2" );
474 y2 = parseRequiredAttribute<ECOORD>( aWire,
"y2" );
475 width = parseRequiredAttribute<ECOORD>( aWire,
"width" );
476 layer = parseRequiredAttribute<int>( aWire,
"layer" );
477 curve = parseOptionalAttribute<double>( aWire,
"curve" );
479 opt_wxString s = parseOptionalAttribute<wxString>( aWire,
"style" );
481 if( s ==
"continuous" )
483 else if( s ==
"longdash" )
485 else if( s ==
"shortdash" )
487 else if( s ==
"dashdot" )
490 s = parseOptionalAttribute<wxString>( aWire,
"cap" );
494 else if( s ==
"flat" )
509 x = parseRequiredAttribute<ECOORD>( aJunction,
"x" );
510 y = parseRequiredAttribute<ECOORD>( aJunction,
"y" );
530 x = parseRequiredAttribute<ECOORD>( aLabel,
"x" );
531 y = parseRequiredAttribute<ECOORD>( aLabel,
"y" );
532 size = parseRequiredAttribute<ECOORD>( aLabel,
"size" );
533 layer = parseRequiredAttribute<int>( aLabel,
"layer" );
534 rot = parseOptionalAttribute<EROT>( aLabel,
"rot" );
535 xref = parseOptionalAttribute<wxString>( aLabel,
"xref" );
555 x = parseRequiredAttribute<ECOORD>( aVia,
"x" );
556 y = parseRequiredAttribute<ECOORD>( aVia,
"y" );
558 wxString ext = parseRequiredAttribute<wxString>( aVia,
"extent" );
561 drill = parseRequiredAttribute<ECOORD>( aVia,
"drill" );
562 diam = parseOptionalAttribute<ECOORD>( aVia,
"diameter" );
563 shape = parseOptionalAttribute<wxString>( aVia,
"shape" );
580 x = parseRequiredAttribute<ECOORD>( aCircle,
"x" );
581 y = parseRequiredAttribute<ECOORD>( aCircle,
"y" );
582 radius = parseRequiredAttribute<ECOORD>( aCircle,
"radius" );
583 width = parseRequiredAttribute<ECOORD>( aCircle,
"width" );
584 layer = parseRequiredAttribute<int>( aCircle,
"layer" );
602 x1 = parseRequiredAttribute<ECOORD>( aRect,
"x1" );
603 y1 = parseRequiredAttribute<ECOORD>( aRect,
"y1" );
604 x2 = parseRequiredAttribute<ECOORD>( aRect,
"x2" );
605 y2 = parseRequiredAttribute<ECOORD>( aRect,
"y2" );
606 layer = parseRequiredAttribute<int>( aRect,
"layer" );
607 rot = parseOptionalAttribute<EROT>( aRect,
"rot" );
630 name = parseRequiredAttribute<wxString>( aTree,
"name" );
631 value = parseOptionalAttribute<wxString>( aTree,
"value" );
633 x = parseOptionalAttribute<ECOORD>( aTree,
"x" );
634 y = parseOptionalAttribute<ECOORD>( aTree,
"y" );
635 size = parseOptionalAttribute<ECOORD>( aTree,
"size" );
637 layer = parseOptionalAttribute<int>( aTree,
"layer" );
638 ratio = parseOptionalAttribute<double>( aTree,
"ratio" );
639 rot = parseOptionalAttribute<EROT>( aTree,
"rot" );
641 opt_wxString stemp = parseOptionalAttribute<wxString>( aTree,
"display" );
646 else if( stemp ==
"name" )
648 else if( stemp ==
"both" )
653 stemp = parseOptionalAttribute<wxString>( aTree,
"align" );
676 x1 = parseRequiredAttribute<ECOORD>( aDimension, wxT(
"x1" ) );
677 y1 = parseRequiredAttribute<ECOORD>( aDimension, wxT(
"y1" ) );
678 x2 = parseRequiredAttribute<ECOORD>( aDimension, wxT(
"x2" ) );
679 y2 = parseRequiredAttribute<ECOORD>( aDimension, wxT(
"y2" ) );
680 x3 = parseRequiredAttribute<ECOORD>( aDimension, wxT(
"x3" ) );
681 y3 = parseRequiredAttribute<ECOORD>( aDimension, wxT(
"y3" ) );
682 textsize = parseOptionalAttribute<ECOORD>( aDimension, wxT(
"textsize" ) );
683 layer = parseRequiredAttribute<int>( aDimension, wxT(
"layer" ) );
684 dimensionType = parseOptionalAttribute<wxString>( aDimension, wxT(
"dtype" ) );
704 text = aText->GetNodeContent();
705 x = parseRequiredAttribute<ECOORD>( aText,
"x" );
706 y = parseRequiredAttribute<ECOORD>( aText,
"y" );
707 size = parseRequiredAttribute<ECOORD>( aText,
"size" );
708 layer = parseRequiredAttribute<int>( aText,
"layer" );
710 font = parseOptionalAttribute<wxString>( aText,
"font" );
711 ratio = parseOptionalAttribute<double>( aText,
"ratio" );
712 rot = parseOptionalAttribute<EROT>( aText,
"rot" );
714 opt_wxString stemp = parseOptionalAttribute<wxString>( aText,
"align" );
726 const wxString& fontName =
font.
CGet();
728 if( fontName ==
"vector" )
732 else if( fontName ==
"fixed" )
773 x1 = parseRequiredAttribute<ECOORD>( aFrameNode,
"x1" );
774 y1 = parseRequiredAttribute<ECOORD>( aFrameNode,
"y1" );
775 x2 = parseRequiredAttribute<ECOORD>( aFrameNode,
"x2" );
776 y2 = parseRequiredAttribute<ECOORD>( aFrameNode,
"y2" );
777 columns = parseRequiredAttribute<int>( aFrameNode,
"columns" );
778 rows = parseRequiredAttribute<int>( aFrameNode,
"rows" );
779 layer = parseRequiredAttribute<int>( aFrameNode,
"layer" );
780 border_left = parseOptionalAttribute<bool>( aFrameNode,
"border-left" );
781 border_top = parseOptionalAttribute<bool>( aFrameNode,
"border-top" );
782 border_right = parseOptionalAttribute<bool>( aFrameNode,
"border-right" );
783 border_bottom = parseOptionalAttribute<bool>( aFrameNode,
"border-bottom" );
790 name = parseRequiredAttribute<wxString>( aPad,
"name" );
791 x = parseRequiredAttribute<ECOORD>( aPad,
"x" );
792 y = parseRequiredAttribute<ECOORD>( aPad,
"y" );
793 rot = parseOptionalAttribute<EROT>( aPad,
"rot" );
794 stop = parseOptionalAttribute<bool>( aPad,
"stop" );
795 thermals = parseOptionalAttribute<bool>( aPad,
"thermals" );
819 drill = parseRequiredAttribute<ECOORD>( aPad,
"drill" );
822 diameter = parseOptionalAttribute<ECOORD>( aPad,
"diameter" );
824 opt_wxString s = parseOptionalAttribute<wxString>( aPad,
"shape" );
829 else if( s ==
"round" )
831 else if( s ==
"octagon" )
833 else if( s ==
"long" )
835 else if( s ==
"offset" )
838 first = parseOptionalAttribute<bool>( aPad,
"first" );
862 dx = parseRequiredAttribute<ECOORD>( aSMD,
"dx" );
863 dy = parseRequiredAttribute<ECOORD>( aSMD,
"dy" );
864 layer = parseRequiredAttribute<int>( aSMD,
"layer" );
866 roundness = parseOptionalAttribute<int>( aSMD,
"roundness" );
867 cream = parseOptionalAttribute<bool>( aSMD,
"cream" );
889 name = parseRequiredAttribute<wxString>( aPin,
"name" );
890 x = parseRequiredAttribute<ECOORD>( aPin,
"x" );
891 y = parseRequiredAttribute<ECOORD>( aPin,
"y" );
893 visible = parseOptionalAttribute<wxString>( aPin,
"visible" );
894 length = parseOptionalAttribute<wxString>( aPin,
"length" );
895 direction = parseOptionalAttribute<wxString>( aPin,
"direction" );
896 function = parseOptionalAttribute<wxString>( aPin,
"function" );
897 swaplevel = parseOptionalAttribute<int>( aPin,
"swaplevel" );
898 rot = parseOptionalAttribute<EROT>( aPin,
"rot" );
913 x = parseRequiredAttribute<ECOORD>( aVertex,
"x" );
914 y = parseRequiredAttribute<ECOORD>( aVertex,
"y" );
915 curve = parseOptionalAttribute<double>( aVertex,
"curve" );
935 width = parseRequiredAttribute<ECOORD>( aPolygon,
"width" );
936 layer = parseRequiredAttribute<int>( aPolygon,
"layer" );
938 spacing = parseOptionalAttribute<ECOORD>( aPolygon,
"spacing" );
939 isolate = parseOptionalAttribute<ECOORD>( aPolygon,
"isolate" );
940 opt_wxString s = parseOptionalAttribute<wxString>( aPolygon,
"pour" );
948 else if( s ==
"cutout" )
951 orphans = parseOptionalAttribute<bool>( aPolygon,
"orphans" );
952 thermals = parseOptionalAttribute<bool>( aPolygon,
"thermals" );
953 rank = parseOptionalAttribute<int>( aPolygon,
"rank" );
969 x = parseRequiredAttribute<ECOORD>( aHole,
"x" );
970 y = parseRequiredAttribute<ECOORD>( aHole,
"y" );
971 drill = parseRequiredAttribute<ECOORD>( aHole,
"drill" );
1000 name = parseRequiredAttribute<wxString>( aElement,
"name" );
1001 library = parseRequiredAttribute<wxString>( aElement,
"library" );
1002 value = parseRequiredAttribute<wxString>( aElement,
"value" );
1003 std::string p = parseRequiredAttribute<std::string>( aElement,
"package" );
1005 package = wxString::FromUTF8( p.c_str() );
1007 x = parseRequiredAttribute<ECOORD>( aElement,
"x" );
1008 y = parseRequiredAttribute<ECOORD>( aElement,
"y" );
1011 library_urn = parseOptionalAttribute<wxString>( aElement,
"library_urn" );
1012 locked = parseOptionalAttribute<bool>( aElement,
"locked" );
1013 smashed = parseOptionalAttribute<bool>( aElement,
"smashed" );
1014 rot = parseOptionalAttribute<EROT>( aElement,
"rot" );
1032 number = parseRequiredAttribute<int>( aLayer,
"number" );
1033 name = parseRequiredAttribute<wxString>( aLayer,
"name" );
1034 color = parseRequiredAttribute<int>( aLayer,
"color" );
1036 visible = parseOptionalAttribute<bool>( aLayer,
"visible" );
1037 active = parseOptionalAttribute<bool>( aLayer,
"active" );
1055 name = parseRequiredAttribute<wxString>( aPart,
"name" );
1056 library = parseRequiredAttribute<wxString>( aPart,
"library" );
1057 deviceset = parseRequiredAttribute<wxString>( aPart,
"deviceset" );
1058 device = parseRequiredAttribute<wxString>( aPart,
"device" );
1059 technology = parseOptionalAttribute<wxString>( aPart,
"technology" );
1060 value = parseOptionalAttribute<wxString>( aPart,
"value" );
1062 for( wxXmlNode* child = aPart->GetChildren(); child; child = child->GetNext() )
1064 if( child->GetName() ==
"attribute" )
1066 std::string aname, avalue;
1068 for( wxXmlAttribute*
x = child->GetAttributes();
x;
x =
x->GetNext() )
1070 if(
x->GetName() ==
"name" )
1071 aname =
x->GetValue();
1072 else if(
x->GetName() ==
"value" )
1073 avalue =
x->GetValue();
1076 if( aname.size() && avalue.size() )
1077 attribute[aname] = avalue;
1079 else if( child->GetName() ==
"variant" )
1081 std::string aname, avalue;
1083 for( wxXmlAttribute*
x = child->GetAttributes();
x;
x =
x->GetNext() )
1085 if(
x->GetName() ==
"name" )
1086 aname =
x->GetValue();
1087 else if(
x->GetName() ==
"value" )
1088 avalue =
x->GetValue();
1091 if( aname.size() && avalue.size() )
1092 variant[aname] = avalue;
1111 part = parseRequiredAttribute<wxString>( aInstance,
"part" );
1112 gate = parseRequiredAttribute<wxString>( aInstance,
"gate" );
1114 x = parseRequiredAttribute<ECOORD>( aInstance,
"x" );
1115 y = parseRequiredAttribute<ECOORD>( aInstance,
"y" );
1118 smashed = parseOptionalAttribute<bool>( aInstance,
"smashed" );
1119 rot = parseOptionalAttribute<EROT>( aInstance,
"rot" );
1137 name = parseRequiredAttribute<wxString>( aGate,
"name" );
1138 symbol = parseRequiredAttribute<wxString>( aGate,
"symbol" );
1140 x = parseRequiredAttribute<ECOORD>( aGate,
"x" );
1141 y = parseRequiredAttribute<ECOORD>( aGate,
"y" );
1143 opt_wxString stemp = parseOptionalAttribute<wxString>( aGate,
"addlevel" );
1146 if( stemp ==
"must" )
1148 else if( stemp ==
"can" )
1150 else if( stemp ==
"next" )
1152 else if( stemp ==
"request" )
1154 else if( stemp ==
"always" )
1172 gate = parseRequiredAttribute<wxString>( aConnect,
"gate" );
1173 pin = parseRequiredAttribute<wxString>( aConnect,
"pin" );
1174 pad = parseRequiredAttribute<wxString>( aConnect,
"pad" );
1187 name = parseRequiredAttribute<wxString>( aDevice,
"name" );
1188 opt_wxString pack = parseOptionalAttribute<wxString>( aDevice,
"package" );
1192 std::string p( pack->c_str() );
1194 package.Set( wxString::FromUTF8( p.c_str() ) );
1200 while( connectNode )
1202 connects.emplace_back( connectNode );
1203 connectNode = connectNode->GetNext();
1219 name = parseRequiredAttribute<wxString>( aDeviceSet,
"name" );
1220 prefix = parseOptionalAttribute<wxString>( aDeviceSet,
"prefix" );
1221 uservalue = parseOptionalAttribute<bool>( aDeviceSet,
"uservalue" );
1227 number = parseRequiredAttribute<wxString>( aClass,
"number" );
1228 name = parseRequiredAttribute<wxString>( aClass,
"name" );
1230 for( wxXmlNode* child = aClass->GetChildren(); child; child = child->GetNext() )
1232 if( child->GetName() ==
"clearance" )
1234 wxString to = parseRequiredAttribute<wxString>( child,
"class" );
1235 ECOORD value = parseRequiredAttribute<ECOORD>( child,
"value" );
1237 clearanceMap[to] =
value;
Model an optional XML attribute.
const T & CGet() const
Return a constant reference to the value of the attribute assuming it is available.
OPTIONAL_XML_ATTRIBUTE()
Construct a default OPTIONAL_XML_ATTRIBUTE, whose data is not available.
std::string Convert< std::string >(const wxString &aValue)
static int parseAlignment(const wxString &aAlignment)
NODE_MAP MapChildren(wxXmlNode *aCurrentNode)
Provide an easy access to the children of an XML node via their names.
double Convert< double >(const wxString &aValue)
wxString escapeName(const wxString &aNetName)
Interprets special characters in Eagle text and converts them to KiCAD notation.
wxString interpretText(const wxString &aText)
Translates Eagle special text reference to a KiCad variable reference.
bool substituteVariable(wxString *aText)
Converts Eagle's HTML description into KiCad description format.
constexpr auto DEFAULT_ALIGNMENT
int Convert< int >(const wxString &aValue)
wxString Convert< wxString >(const wxString &aValue)
EROT Convert< EROT >(const wxString &aRot)
parse an Eagle XML "rot" field.
T parseRequiredAttribute(wxXmlNode *aNode, const wxString &aAttribute)
Parse aAttribute of the XML node aNode.
bool Convert< bool >(const wxString &aValue)
ECOORD Convert< ECOORD >(const wxString &aCoord)
OPTIONAL_XML_ATTRIBUTE< T > parseOptionalAttribute(wxXmlNode *aNode, const wxString &aAttribute)
Parse option aAttribute of the XML node aNode.
VECTOR2I ConvertArcCenter(const VECTOR2I &aStart, const VECTOR2I &aEnd, double aAngle)
wxString convertDescription(wxString aDescr)
static wxXmlNode * getChildrenNodes(NODE_MAP &aMap, const wxString &aName)
NODE_MAP MapChildren(wxXmlNode *aCurrentNode)
Provide an easy access to the children of an XML node via their names.
std::unordered_map< wxString, wxXmlNode * > NODE_MAP
#define THROW_IO_ERROR(msg)
wxString RemoveHTMLTags(const wxString &aInput)
Removes HTML tags from a string.
wxString ConvertToNewOverbarNotation(const wxString &aOldStr)
Convert the old ~...~ overbar notation to the new ~{...} one.
bool ReplaceIllegalFileNameChars(std::string *aName, int aReplaceChar)
Checks aName for illegal file name characters.
ECIRCLE(wxXmlNode *aCircle)
ECLASS(wxXmlNode *aClass)
ECONNECT(wxXmlNode *aConnect)
long long int value
Unit used for the value field.
static long long int ConvertToNm(int aValue, enum EAGLE_UNIT aUnit)
EDEVICE_SET(wxXmlNode *aDeviceSet)
EDEVICE(wxXmlNode *aDevice)
EDIMENSION(wxXmlNode *aDimension)
opt_wxString dimensionType
EELEMENT(wxXmlNode *aElement)
EFRAME(wxXmlNode *aFrameNode)
EINSTANCE(wxXmlNode *aInstance)
EJUNCTION(wxXmlNode *aJunction)
ELABEL(wxXmlNode *aLabel, const wxString &aNetName)
ELAYER(wxXmlNode *aLayer)
Structure holding common properties for through-hole and SMD pads.
EPAD_COMMON(wxXmlNode *aPad)
EPOLYGON(wxXmlNode *aPolygon)
VECTOR2I ConvertSize() const
Calculate text size based on font type and size.
EVERTEX(wxXmlNode *aVertex)
opt_double curve
range is -359.9..359.9
int layer_back_most
< extent
opt_double curve
range is -359.9..359.9
Implement a simple wrapper around runtime_error to isolate the errors thrown by the Eagle XML parser.
double DEG2RAD(double deg)