CADSTAR Schematic Archive Importer: Fix parsing of TERMINAL_SHAPE
TRIANGLE shape and a few others do not have a "right length", only a "length". Fixes the error "Missing Parameter ‘2’ in ‘TRIANGLE’".
This commit is contained in:
parent
06c420a2a3
commit
7c06bdbd2e
|
@ -199,7 +199,7 @@ void CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL_SHAPE::Parse( XNODE* aNode, PARSER_CON
|
||||||
case TERMINAL_SHAPE_TYPE::POINTER:
|
case TERMINAL_SHAPE_TYPE::POINTER:
|
||||||
case TERMINAL_SHAPE_TYPE::RECTANGLE:
|
case TERMINAL_SHAPE_TYPE::RECTANGLE:
|
||||||
case TERMINAL_SHAPE_TYPE::TRIANGLE:
|
case TERMINAL_SHAPE_TYPE::TRIANGLE:
|
||||||
RightLength = GetXmlAttributeIDLong( aNode, 2 );
|
RightLength = GetXmlAttributeIDLong( aNode, 2, false ); // Optional
|
||||||
LeftLength = GetXmlAttributeIDLong( aNode, 1 );
|
LeftLength = GetXmlAttributeIDLong( aNode, 1 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -83,8 +83,11 @@ public:
|
||||||
{
|
{
|
||||||
TERMINAL_SHAPE_TYPE ShapeType;
|
TERMINAL_SHAPE_TYPE ShapeType;
|
||||||
long Size = UNDEFINED_VALUE;
|
long Size = UNDEFINED_VALUE;
|
||||||
long LeftLength = UNDEFINED_VALUE;
|
// Note in the CADSTAR GUI, it only talks about "length", but the file seems to
|
||||||
long RightLength = UNDEFINED_VALUE;
|
// split it in "left length" and "right length" (similar to PADCODE in the PCB)
|
||||||
|
// for some terminal shapes such as RECTANGLE but not for others, such as TRIANGLE
|
||||||
|
long LeftLength = UNDEFINED_VALUE; ///< Might also be total length
|
||||||
|
long RightLength = UNDEFINED_VALUE; ///< Could be blank
|
||||||
long InternalFeature = UNDEFINED_VALUE;
|
long InternalFeature = UNDEFINED_VALUE;
|
||||||
long OrientAngle = 0; ///< 1/1000 of a Degree
|
long OrientAngle = 0; ///< 1/1000 of a Degree
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue