From e3c59e39cf9bc64ce9d76c324b82956a65515f16 Mon Sep 17 00:00:00 2001 From: opiopan Date: Sun, 7 Apr 2019 22:22:33 +0900 Subject: expand test and fix many issues --- tests/data/ref_drill_inch.txt | 43 ++++ tests/data/ref_drill_metric.txt | 45 +++++ tests/data/ref_dxf_metric.dxf | 404 ++++++++++++++++++++++++++++++++++++++ tests/data/ref_dxf_mousebites.dxf | 344 ++++++++++++++++++++++++++++++++ tests/data/ref_gerber_inch.gtl | 79 ++++++++ tests/data/ref_gerber_metric.gtl | 84 ++++++++ 6 files changed, 999 insertions(+) create mode 100644 tests/data/ref_drill_inch.txt create mode 100644 tests/data/ref_drill_metric.txt create mode 100644 tests/data/ref_dxf_metric.dxf create mode 100644 tests/data/ref_dxf_mousebites.dxf create mode 100644 tests/data/ref_gerber_inch.gtl create mode 100644 tests/data/ref_gerber_metric.gtl (limited to 'tests/data') diff --git a/tests/data/ref_drill_inch.txt b/tests/data/ref_drill_inch.txt new file mode 100644 index 0000000..8d31df0 --- /dev/null +++ b/tests/data/ref_drill_inch.txt @@ -0,0 +1,43 @@ +M48 +FMAT,2 +ICI,OFF +INCH,TZ,00.0000 +M72 +T01C0.0039 +T02C0.0078 +% +T01 +X1969Y3740 +X2047Y3740 +X2126Y3740 +X2205Y3740 +X2283Y3740 +X2362Y3740 +X2441Y3740 +X2520Y3740 +X2598Y3740 +X2677Y3740 +X2756Y3740 +X2835Y3740 +X2913Y3740 +X2992Y3740 +X3071Y3740 +X3150Y3740 +X3228Y3740 +X3307Y3740 +X3386Y3740 +X3465Y3740 +X3543Y3740 +T02 +X1969Y197 +X2126Y197 +X2283Y197 +X2441Y197 +X2598Y197 +X2756Y197 +X2913Y197 +X3071Y197 +X3228Y197 +X3386Y197 +X3543Y197 +M30 diff --git a/tests/data/ref_drill_metric.txt b/tests/data/ref_drill_metric.txt new file mode 100644 index 0000000..87f20f5 --- /dev/null +++ b/tests/data/ref_drill_metric.txt @@ -0,0 +1,45 @@ +M48 +FMAT,2 +ICI,OFF +METRIC,TZ,000.000 +M71 +T01C0.100 +T02C0.200 +% +T01 +X5000Y9500 +X5200Y9500 +X5400Y9500 +X5600Y9500 +X5800Y9500 +X6000Y9500 +X6200Y9500 +X6400Y9500 +X6600Y9500 +X6800Y9500 +X7000Y9500 +X7200Y9500 +X7400Y9500 +X7600Y9500 +X7800Y9500 +X8000Y9500 +X8200Y9500 +X8400Y9500 +X8600Y9500 +X8800Y9500 +X9000Y9500 + +T02 +X5000Y500 +X5400Y500 +X5800Y500 +X6200Y500 +X6600Y500 +X7000Y500 +X7400Y500 +X7800Y500 +X8200Y500 +X8600Y500 +X9000Y500 + +M30 diff --git a/tests/data/ref_dxf_metric.dxf b/tests/data/ref_dxf_metric.dxf new file mode 100644 index 0000000..89af1e7 --- /dev/null +++ b/tests/data/ref_dxf_metric.dxf @@ -0,0 +1,404 @@ +0 +SECTION +2 +HEADER +9 +$INSUNITS +70 +4 +9 +$ACADVER +1 +AC1014 +9 +$HANDSEED +5 +FFFF +0 +ENDSEC +0 +SECTION +2 +TABLES +0 +TABLE +2 +VPORT +5 +8 +100 +AcDbSymbolTable +0 +ENDTAB +0 +TABLE +2 +LTYPE +5 +5 +100 +AcDbSymbolTable +0 +LTYPE +5 +14 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BYBLOCK +70 +0 +0 +LTYPE +5 +15 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BYLAYER +70 +0 +0 +ENDTAB +0 +TABLE +2 +LAYER +5 +2 +100 +AcDbSymbolTable +70 +2 +0 +LAYER +5 +50 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord +2 +0 +70 +0 +6 +CONTINUOUS +0 +ENDTAB +0 +TABLE +2 +STYLE +5 +3 +100 +AcDbSymbolTable +70 +1 +0 +STYLE +5 +11 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord +2 +STANDARD +70 +0 +0 +ENDTAB +0 +TABLE +2 +VIEW +5 +6 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +UCS +5 +7 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +APPID +5 +9 +100 +AcDbSymbolTable +70 +2 +0 +APPID +5 +12 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord +2 +ACAD +70 +0 +0 +ENDTAB +0 +TABLE +2 +DIMSTYLE +5 +A +100 +AcDbSymbolTable +70 +1 +0 +ENDTAB +0 +TABLE +2 +BLOCK_RECORD +5 +1 +100 +AcDbSymbolTable +70 +1 +0 +BLOCK_RECORD +5 +1F +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*MODEL_SPACE +0 +BLOCK_RECORD +5 +1B +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*PAPER_SPACE +0 +ENDTAB +0 +ENDSEC +0 +SECTION +2 +BLOCKS +0 +BLOCK +5 +20 +100 +AcDbEntity +100 +AcDbBlockBegin +2 +*MODEL_SPACE +0 +ENDBLK +5 +21 +100 +AcDbEntity +100 +AcDbBlockEnd +0 +BLOCK +5 +1C +100 +AcDbEntity +100 +AcDbBlockBegin +2 +*PAPER_SPACE +0 +ENDBLK +5 +1D +100 +AcDbEntity +100 +AcDbBlockEnd +0 +ENDSEC +0 +SECTION +2 +ENTITIES +0 +LWPOLYLINE +5 +100 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +8 +70 +1 +43 +0.0 +10 +9 +20 +0 +10 +1 +20 +0 +42 +-0.41421356237309515 +10 +0 +20 +0.99999999999999978 +10 +6.9388939039072284e-16 +20 +9 +42 +-0.41421356237309548 +10 +0.99999999999999978 +20 +10 +10 +9 +20 +10 +42 +-0.41421356237309509 +10 +10 +20 +9 +10 +10 +20 +1 +42 +-0.41421356237309548 +0 +CIRCLE +5 +101 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +0.61705708382705282 +20 +5 +30 +0 +40 +0.29999999999999999 +0 +LWPOLYLINE +5 +102 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +3 +70 +1 +43 +0.0 +10 +0.91705708382705309 +20 +7.5106817728417301 +42 +-0.67748879940688445 +10 +0.39955725374872897 +20 +7.3040569342673214 +10 +0.61705708382705282 +20 +7.5106817728417301 +0 +ENDSEC +0 +SECTION +2 +OBJECTS +0 +DICTIONARY +5 +C +100 +AcDbDictionary +3 +ACAD_GROUP +350 +D +3 +ACAD_MLINESTYLE +350 +17 +0 +DICTIONARY +5 +D +100 +AcDbDictionary +0 +DICTIONARY +5 +1A +330 +C +100 +AcDbDictionary +0 +DICTIONARY +5 +17 +100 +AcDbDictionary +0 +ENDSEC +0 +EOF diff --git a/tests/data/ref_dxf_mousebites.dxf b/tests/data/ref_dxf_mousebites.dxf new file mode 100644 index 0000000..fcc56a5 --- /dev/null +++ b/tests/data/ref_dxf_mousebites.dxf @@ -0,0 +1,344 @@ +0 +SECTION +2 +HEADER +9 +$INSUNITS +70 +4 +9 +$ACADVER +1 +AC1014 +9 +$HANDSEED +5 +FFFF +0 +ENDSEC +0 +SECTION +2 +TABLES +0 +TABLE +2 +VPORT +5 +8 +100 +AcDbSymbolTable +0 +ENDTAB +0 +TABLE +2 +LTYPE +5 +5 +100 +AcDbSymbolTable +0 +LTYPE +5 +14 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BYBLOCK +70 +0 +0 +LTYPE +5 +15 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BYLAYER +70 +0 +0 +ENDTAB +0 +TABLE +2 +LAYER +5 +2 +100 +AcDbSymbolTable +70 +2 +0 +LAYER +5 +50 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord +2 +0 +70 +0 +6 +CONTINUOUS +0 +ENDTAB +0 +TABLE +2 +STYLE +5 +3 +100 +AcDbSymbolTable +70 +1 +0 +STYLE +5 +11 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord +2 +STANDARD +70 +0 +0 +ENDTAB +0 +TABLE +2 +VIEW +5 +6 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +UCS +5 +7 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +APPID +5 +9 +100 +AcDbSymbolTable +70 +2 +0 +APPID +5 +12 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord +2 +ACAD +70 +0 +0 +ENDTAB +0 +TABLE +2 +DIMSTYLE +5 +A +100 +AcDbSymbolTable +70 +1 +0 +ENDTAB +0 +TABLE +2 +BLOCK_RECORD +5 +1 +100 +AcDbSymbolTable +70 +1 +0 +BLOCK_RECORD +5 +1F +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*MODEL_SPACE +0 +BLOCK_RECORD +5 +1B +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*PAPER_SPACE +0 +ENDTAB +0 +ENDSEC +0 +SECTION +2 +BLOCKS +0 +BLOCK +5 +20 +100 +AcDbEntity +100 +AcDbBlockBegin +2 +*MODEL_SPACE +0 +ENDBLK +5 +21 +100 +AcDbEntity +100 +AcDbBlockEnd +0 +BLOCK +5 +1C +100 +AcDbEntity +100 +AcDbBlockBegin +2 +*PAPER_SPACE +0 +ENDBLK +5 +1D +100 +AcDbEntity +100 +AcDbBlockEnd +0 +ENDSEC +0 +SECTION +2 +ENTITIES +0 +LINE +5 +100 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +0.99999999999999933 +20 +9.0000000000000018 +30 +0 +11 +0.99999999999999967 +21 +0.99999999999999967 +31 +0 +0 +LINE +5 +101 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +5 +20 +9.0000000000000018 +30 +0 +11 +5 +21 +0.99999999999999967 +31 +0 +0 +ENDSEC +0 +SECTION +2 +OBJECTS +0 +DICTIONARY +5 +C +100 +AcDbDictionary +3 +ACAD_GROUP +350 +D +3 +ACAD_MLINESTYLE +350 +17 +0 +DICTIONARY +5 +D +100 +AcDbDictionary +0 +DICTIONARY +5 +1A +330 +C +100 +AcDbDictionary +0 +DICTIONARY +5 +17 +100 +AcDbDictionary +0 +ENDSEC +0 +EOF diff --git a/tests/data/ref_gerber_inch.gtl b/tests/data/ref_gerber_inch.gtl new file mode 100644 index 0000000..3ec60d8 --- /dev/null +++ b/tests/data/ref_gerber_inch.gtl @@ -0,0 +1,79 @@ +%MOIN*% +%FSLAX25Y25*% +%INTop Layer*% +%IPPOS*% +%AMCOMP* +20,1,0.00787402,0,0.00393701,0.015748,0.00393701,$1* +21,1,0.015748,0.00787402,-0.00787402,-0.00393701,$1* +1,1,0.015748,-0.0472441,0,$1* +4,1,4,0.0472441,0,0.0551181,-0.00787402,0.0472441,-0.015748,0.0393701,-0.00787402,0.0472441,0,$1* +5,1,6,0.0472441,0.00787402,0.015748,$1* +6,-0.0275591,0,0.019685,0.0019685,0.00590551,2,0.0019685,0.023622,$1* +7,0.0275591,0,0.023622,0.019685,0.00590551,$1*% +%ADD10C,0.0003937*% +%ADD11C,0.03937X0.01575*% +%ADD12R,0.03937X0.01969X0.007874*% +%ADD13O,0.03937X0.01969X0.007874*% +%ADD14O,0.01969X0.03937X0.007874*% +%ADD15P,0.03937X5X90X0.007874*% +%ADD16COMP,0*% +%ADD17COMP,45*% +%ADD18COMP,-45*% +G75* +%LPD*% +D10* +G01* +X3937Y0D02* +X35433Y0D01* +G03* +X39370Y3937I0J3937D01* +G01* +X39370Y35433D01* +G03* +X35433Y39370I-3937J0D01* +G01* +X3937Y39370D01* +G03* +X0Y35433I0J-3937D01* +G01* +X0Y3937D01* +G03* +X3937Y0I3937J0D01* +G01* +G36* +G01* +X17717Y3937D02* +X19685Y3937D01* +G03* +X21654Y5906I0J1969D01* +G01* +X21654Y33465D01* +G03* +X19685Y35433I-1969J0D01* +G01* +X17717Y35433D01* +G03* +X15748Y33465I0J-1969D01* +G01* +X15748Y5906D01* +G03* +X17717Y3937I1969J0D01* +G01* +G37* +D11* +X9843Y3937D03* +D12* +X9843Y11811D03* +D13* +X9843Y19685D03* +D14* +X9843Y27559D03* +D15* +X9843Y35433D03* +D16* +X29528Y19685D03* +D17* +X29528Y29528D03* +D18* +X29528Y9843D03* +M02* diff --git a/tests/data/ref_gerber_metric.gtl b/tests/data/ref_gerber_metric.gtl new file mode 100644 index 0000000..8dfbdd4 --- /dev/null +++ b/tests/data/ref_gerber_metric.gtl @@ -0,0 +1,84 @@ +%MOMM*% +%FSLAX34Y34*% +%INTop Layer*% +%IPPOS*% +%AMCOMP* +20,1,0.2,0,0.1,0.4,0.1,$1* +21,1,0.4,0.2,-0.2,-0.1,$1* +1,1,0.4,-1.2,0,$1* +4,1,4,1.2,0,1.4,-0.2,1.2,-0.4,1,-0.2,1.2,0,$1* +5,1,6,1.2,0.2,0.4,$1* +6,-0.7,0,0.5,0.05,0.15,2,0.05,0.6,$1* +7,0.7,0,0.6,0.5,0.15,$1*% +%ADD10C,0.01*% +%ADD11C,1X0.4*% +%ADD12R,1X0.5X0.2*% +%ADD13O,1X0.5X0.2*% +%ADD14O,0.5X1X0.2*% +%ADD15P,1X5X90X0.2*% +%ADD16COMP,0*% +%ADD17COMP,45*% +%ADD18COMP,-45*% +G75* +%LPD*% + +D10* +G01* +X10000Y0D02* +X90000Y0D01* +G03* +X100000Y10000I0J10000D01* +G01* +X100000Y90000D01* +G03* +X90000Y100000I-10000J0D01* +G01* +X10000Y100000D01* +G03* +X0Y90000I0J-10000D01* +G01* +X0Y10000D01* +G03* +X10000Y0I10000J0D01* +G01* + +G36* +G01* +X45000Y10000D02* +X50000Y10000D01* +G03* +X55000Y15000I0J5000D01* +G01* +X55000Y85000D01* +G03* +X50000Y90000I-5000J0D01* +G01* +X45000Y90000D01* +G03* +X40000Y85000I0J-5000D01* +G01* +X40000Y15000D01* +G03* +X45000Y10000I5000J0D01* +G01* +G37* + +D11* +X25000Y10000D03* +D12* +X25000Y30000D03* +D13* +X25000Y50000D03* +D14* +X25000Y70000D03* +D15* +X25000Y90000D03* + +D16* +X75000Y50000D03* +D17* +X75000Y75000D03* +D18* +X75000Y25000D03* + +M02* -- cgit