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/__init__.py | 0 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 +++++++ tests/expects/RS2724x_offset.gtl | 79 +++++++ tests/expects/RS2724x_rotate.gtl | 99 ++++++++ tests/expects/RS2724x_save.gtl | 79 +++++++ tests/expects/RS2724x_to_inch.gtl | 79 +++++++ tests/expects/RS2724x_to_metric.gtl | 79 +++++++ tests/expects/dxf_offset.gtl | 42 ++++ tests/expects/dxf_rectangle_inch.gtl | 21 ++ tests/expects/dxf_rectangle_metric.gtl | 21 ++ tests/expects/dxf_rotate.gtl | 42 ++++ tests/expects/dxf_save_fill.gtl | 44 ++++ tests/expects/dxf_save_line.gtl | 42 ++++ tests/expects/dxf_save_mousebites.gtl | 29 +++ tests/expects/dxf_save_mousebites.txt | 29 +++ tests/expects/dxf_to_inch.gtl | 42 ++++ tests/expects/excellon_offset.txt | 43 ++++ tests/expects/excellon_rotate.txt | 43 ++++ tests/expects/excellon_save.txt | 43 ++++ tests/expects/excellon_to_inch.txt | 43 ++++ tests/expects/excellon_to_metric.txt | 43 ++++ tests/test_am_expression.py | 207 +++++++++++++++++ tests/test_dxf.py | 113 +++++++++ tests/test_excellon.py | 72 ++++++ tests/test_rs274x.py | 69 ++++++ tests/test_utility.py | 65 ++++++ 31 files changed, 2467 insertions(+) create mode 100644 tests/__init__.py 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 create mode 100644 tests/expects/RS2724x_offset.gtl create mode 100644 tests/expects/RS2724x_rotate.gtl create mode 100644 tests/expects/RS2724x_save.gtl create mode 100644 tests/expects/RS2724x_to_inch.gtl create mode 100644 tests/expects/RS2724x_to_metric.gtl create mode 100644 tests/expects/dxf_offset.gtl create mode 100644 tests/expects/dxf_rectangle_inch.gtl create mode 100644 tests/expects/dxf_rectangle_metric.gtl create mode 100644 tests/expects/dxf_rotate.gtl create mode 100644 tests/expects/dxf_save_fill.gtl create mode 100644 tests/expects/dxf_save_line.gtl create mode 100644 tests/expects/dxf_save_mousebites.gtl create mode 100644 tests/expects/dxf_save_mousebites.txt create mode 100644 tests/expects/dxf_to_inch.gtl create mode 100644 tests/expects/excellon_offset.txt create mode 100644 tests/expects/excellon_rotate.txt create mode 100644 tests/expects/excellon_save.txt create mode 100644 tests/expects/excellon_to_inch.txt create mode 100644 tests/expects/excellon_to_metric.txt create mode 100644 tests/test_am_expression.py create mode 100644 tests/test_dxf.py create mode 100644 tests/test_excellon.py create mode 100644 tests/test_rs274x.py create mode 100644 tests/test_utility.py (limited to 'tests') diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 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* diff --git a/tests/expects/RS2724x_offset.gtl b/tests/expects/RS2724x_offset.gtl new file mode 100644 index 0000000..9f15f4c --- /dev/null +++ b/tests/expects/RS2724x_offset.gtl @@ -0,0 +1,79 @@ +%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* +X120000Y50000D02* +X200000Y50000D01* +G03* +X210000Y60000I0J10000D01* +G01* +X210000Y140000D01* +G03* +X200000Y150000I-10000J0D01* +G01* +X120000Y150000D01* +G03* +X110000Y140000I0J-10000D01* +G01* +X110000Y60000D01* +G03* +X120000Y50000I10000J0D01* +G01* +G36* +G01* +X155000Y60000D02* +X160000Y60000D01* +G03* +X165000Y65000I0J5000D01* +G01* +X165000Y135000D01* +G03* +X160000Y140000I-5000J0D01* +G01* +X155000Y140000D01* +G03* +X150000Y135000I0J-5000D01* +G01* +X150000Y65000D01* +G03* +X155000Y60000I5000J0D01* +G01* +G37* +D11* +X135000Y60000D03* +D12* +X135000Y80000D03* +D13* +X135000Y100000D03* +D14* +X135000Y120000D03* +D15* +X135000Y140000D03* +D16* +X185000Y100000D03* +D17* +X185000Y125000D03* +D18* +X185000Y75000D03* +M02* diff --git a/tests/expects/RS2724x_rotate.gtl b/tests/expects/RS2724x_rotate.gtl new file mode 100644 index 0000000..0a2d1aa --- /dev/null +++ b/tests/expects/RS2724x_rotate.gtl @@ -0,0 +1,99 @@ +%MOMM*% +%FSLAX34Y34*% +%INTop Layer*% +%IPPOS*% +%AMCOMP* +20,1,0.2,0,0.1,0.4,0.1,($1)+(20)* +21,1,0.4,0.2,-0.2,-0.1,($1)+(20)* +1,1,0.4,-1.2,0,($1)+(20)* +4,1,4,1.2,0,1.4,-0.2,1.2,-0.4,1,-0.2,1.2,0,($1)+(20)* +5,1,6,1.2,0.2,0.4,($1)+(20)* +6,-0.7,0,0.5,0.05,0.15,2,0.05,0.6,($1)+(20)* +7,0.7,0,0.6,0.5,0.15,($1)+(20)*% +%AMMACP* +5,1,$2,0,0,$1,($3)+(20)* +1,0,$4,0,0,20*% +%AMMACPO* +$4=($2)-($1)* +$5=($2)-($4)* +21,1,$1,$5,0,0,20* +1,1,$4,0,($4)/(2),20* +1,1,$4,0,($4)/(-2),20* +1,0,$3,0,0,20*% +%AMMACLO* +$4=($1)-($2)* +$5=($1)-($4)* +21,1,$5,$2,0,0,20* +1,1,$4,($4)/(2),0,20* +1,1,$4,($4)/(-2),0,20* +1,0,$3,0,0,20*% +%AMMACR* +21,1,$1,$2,0,0,20* +1,0,$3,0,0,20*% +%ADD10C,0.01*% +%ADD11C,1X0.4*% +%ADD12MACR,1X0.5X0.2*% +%ADD13MACLO,1X0.5X0.2*% +%ADD14MACPO,0.5X1X0.2*% +%ADD15MACP,1X5X90X0.2*% +%ADD16COMP,0*% +%ADD17COMP,45*% +%ADD18COMP,-45*% +G75* +%LPD*% +D10* +G01* +X49630Y-24751D02* +X124805Y2611D01* +G03* +X130782Y15428I-3420J9397D01* +G01* +X103420Y90603D01* +G03* +X90603Y96580I-9397J-3420D01* +G01* +X15428Y69218D01* +G03* +X9451Y56401I3420J-9397D01* +G01* +X36813Y-18774D01* +G03* +X49630Y-24751I9397J3420D01* +G01* +G36* +G01* +X79099Y-3383D02* +X83797Y-1673D01* +G03* +X86786Y4735I-1710J4698D01* +G01* +X62844Y70514D01* +G03* +X56436Y73502I-4698J-1710D01* +G01* +X51737Y71792D01* +G03* +X48749Y65383I1710J-4698D01* +G01* +X72690Y-395D01* +G03* +X79099Y-3383I4698J1710D01* +G01* +G37* +D11* +X60305Y-10224D03* +D12* +X53464Y8570D03* +D13* +X46624Y27364D03* +D14* +X39784Y46158D03* +D15* +X32943Y64952D03* +D16* +X93609Y44465D03* +D17* +X85058Y67957D03* +D18* +X102159Y20973D03* +M02* diff --git a/tests/expects/RS2724x_save.gtl b/tests/expects/RS2724x_save.gtl new file mode 100644 index 0000000..02dbaa8 --- /dev/null +++ b/tests/expects/RS2724x_save.gtl @@ -0,0 +1,79 @@ +%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* diff --git a/tests/expects/RS2724x_to_inch.gtl b/tests/expects/RS2724x_to_inch.gtl new file mode 100644 index 0000000..3ec60d8 --- /dev/null +++ b/tests/expects/RS2724x_to_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/expects/RS2724x_to_metric.gtl b/tests/expects/RS2724x_to_metric.gtl new file mode 100644 index 0000000..93adfc1 --- /dev/null +++ b/tests/expects/RS2724x_to_metric.gtl @@ -0,0 +1,79 @@ +%MOMM*% +%FSLAX34Y34*% +%INTop Layer*% +%IPPOS*% +%AMCOMP* +20,1,0.2,0,0.1,0.399999,0.1,$1* +21,1,0.399999,0.2,-0.2,-0.1,$1* +1,1,0.399999,-1.2,0,$1* +4,1,4,1.2,0,1.4,-0.2,1.2,-0.399999,1,-0.2,1.2,0,$1* +5,1,6,1.2,0.2,0.399999,$1* +6,-0.700001,0,0.499999,0.0499999,0.15,2,0.0499999,0.599999,$1* +7,0.700001,0,0.599999,0.499999,0.15,$1*% +%ADD10C,0.01*% +%ADD11C,1X0.4*% +%ADD12R,1X0.5001X0.2*% +%ADD13O,1X0.5001X0.2*% +%ADD14O,0.5001X1X0.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* +X45001Y10000D02* +X50000Y10000D01* +G03* +X55001Y15001I0J5001D01* +G01* +X55001Y85001D01* +G03* +X50000Y90000I-5001J0D01* +G01* +X45001Y90000D01* +G03* +X40000Y85001I0J-5001D01* +G01* +X40000Y15001D01* +G03* +X45001Y10000I5001J0D01* +G01* +G37* +D11* +X25001Y10000D03* +D12* +X25001Y30000D03* +D13* +X25001Y50000D03* +D14* +X25001Y70000D03* +D15* +X25001Y90000D03* +D16* +X75001Y50000D03* +D17* +X75001Y75001D03* +D18* +X75001Y25001D03* +M02* diff --git a/tests/expects/dxf_offset.gtl b/tests/expects/dxf_offset.gtl new file mode 100644 index 0000000..18d7a62 --- /dev/null +++ b/tests/expects/dxf_offset.gtl @@ -0,0 +1,42 @@ +G75* +%MOMM*% +%OFA0B0*% +%FSLAX34Y34*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G01* +X200000Y50000D02* +G75* +G01* +X120000Y50000D01* +G02* +X110000Y60000I0J10000D01* +G01* +X110000Y140000D01* +G02* +X120000Y150000I10000J0D01* +G01* +X200000Y150000D01* +G02* +X210000Y140000I0J-10000D01* +G01* +X210000Y60000D01* +G02* +X200000Y50000I-10000J0D01* +G01* +X119171Y100000D02* +G75* +G03* +X119171Y100000I-3000J0D01* +G01* +X119171Y125107D02* +G75* +G02* +X113996Y123041I-3000J0D01* +G01* +X116171Y125107D01* +G01* +X119171Y125107D01* +M02* diff --git a/tests/expects/dxf_rectangle_inch.gtl b/tests/expects/dxf_rectangle_inch.gtl new file mode 100644 index 0000000..ca99021 --- /dev/null +++ b/tests/expects/dxf_rectangle_inch.gtl @@ -0,0 +1,21 @@ +G75* +%MOIN*% +%OFA0B0*% +%FSLAX25Y25*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G01* +X0Y0D02* +X39370Y0D01* +G01* +X39370Y0D02* +X39370Y39370D01* +G01* +X39370Y39370D02* +X0Y39370D01* +G01* +X0Y39370D02* +X0Y0D01* +M02* diff --git a/tests/expects/dxf_rectangle_metric.gtl b/tests/expects/dxf_rectangle_metric.gtl new file mode 100644 index 0000000..db4c439 --- /dev/null +++ b/tests/expects/dxf_rectangle_metric.gtl @@ -0,0 +1,21 @@ +G75* +%MOMM*% +%OFA0B0*% +%FSLAX34Y34*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G01* +X0Y0D02* +X100000Y0D01* +G01* +X100000Y0D02* +X100000Y100000D01* +G01* +X100000Y100000D02* +X0Y100000D01* +G01* +X0Y100000D02* +X0Y0D01* +M02* diff --git a/tests/expects/dxf_rotate.gtl b/tests/expects/dxf_rotate.gtl new file mode 100644 index 0000000..912ad60 --- /dev/null +++ b/tests/expects/dxf_rotate.gtl @@ -0,0 +1,42 @@ +G75* +%MOMM*% +%OFA0B0*% +%FSLAX34Y34*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G01* +X124805Y2611D02* +G75* +G01* +X49630Y-24751D01* +G02* +X36813Y-18774I-3420J9397D01* +G01* +X9451Y56401D01* +G02* +X15428Y69218I9397J3420D01* +G01* +X90603Y96580D01* +G02* +X103420Y90603I3420J-9397D01* +G01* +X130782Y15428D01* +G02* +X124805Y2611I-9397J-3420D01* +G01* +X31930Y20924D02* +G75* +G03* +X31930Y20924I-3000J0D01* +G01* +X23162Y45543D02* +G75* +G02* +X19006Y41831I-2819J-1026D01* +G01* +X20343Y44517D01* +G01* +X23162Y45543D01* +M02* diff --git a/tests/expects/dxf_save_fill.gtl b/tests/expects/dxf_save_fill.gtl new file mode 100644 index 0000000..c293826 --- /dev/null +++ b/tests/expects/dxf_save_fill.gtl @@ -0,0 +1,44 @@ +G75* +%MOMM*% +%OFA0B0*% +%FSLAX34Y34*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G36* +G01* +X90000Y0D02* +G75* +G01* +X10000Y0D01* +G02* +X0Y10000I0J10000D01* +G01* +X0Y90000D01* +G02* +X10000Y100000I10000J0D01* +G01* +X90000Y100000D01* +G02* +X100000Y90000I0J-10000D01* +G01* +X100000Y10000D01* +G02* +X90000Y0I-10000J0D01* +G01* +X9171Y50000D02* +G75* +G03* +X9171Y50000I-3000J0D01* +G01* +X9171Y75107D02* +G75* +G02* +X3996Y73041I-3000J0D01* +G01* +X6171Y75107D01* +G01* +X9171Y75107D01* +G37* +M02* diff --git a/tests/expects/dxf_save_line.gtl b/tests/expects/dxf_save_line.gtl new file mode 100644 index 0000000..e9a931b --- /dev/null +++ b/tests/expects/dxf_save_line.gtl @@ -0,0 +1,42 @@ +G75* +%MOMM*% +%OFA0B0*% +%FSLAX34Y34*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G01* +X90000Y0D02* +G75* +G01* +X10000Y0D01* +G02* +X0Y10000I0J10000D01* +G01* +X0Y90000D01* +G02* +X10000Y100000I10000J0D01* +G01* +X90000Y100000D01* +G02* +X100000Y90000I0J-10000D01* +G01* +X100000Y10000D01* +G02* +X90000Y0I-10000J0D01* +G01* +X9171Y50000D02* +G75* +G03* +X9171Y50000I-3000J0D01* +G01* +X9171Y75107D02* +G75* +G02* +X3996Y73041I-3000J0D01* +G01* +X6171Y75107D01* +G01* +X9171Y75107D01* +M02* diff --git a/tests/expects/dxf_save_mousebites.gtl b/tests/expects/dxf_save_mousebites.gtl new file mode 100644 index 0000000..b893454 --- /dev/null +++ b/tests/expects/dxf_save_mousebites.gtl @@ -0,0 +1,29 @@ +G75* +%MOMM*% +%OFA0B0*% +%FSLAX34Y34*% +%IPPOS*% +%LPD*% +%ADD10C,0.5*% +D10* +X10000Y90000D03* +X10000Y80000D03* +X10000Y70000D03* +X10000Y60000D03* +X10000Y50000D03* +X10000Y40000D03* +X10000Y30000D03* +X10000Y20000D03* +X10000Y10000D03* + +X50000Y90000D03* +X50000Y80000D03* +X50000Y70000D03* +X50000Y60000D03* +X50000Y50000D03* +X50000Y40000D03* +X50000Y30000D03* +X50000Y20000D03* +X50000Y10000D03* + +M02* diff --git a/tests/expects/dxf_save_mousebites.txt b/tests/expects/dxf_save_mousebites.txt new file mode 100644 index 0000000..4a371ef --- /dev/null +++ b/tests/expects/dxf_save_mousebites.txt @@ -0,0 +1,29 @@ +M48 +FMAT,2 +ICI,OFF +METRIC,TZ,000.000 +M71 +T01C0.500 +% +T01 +X1000Y9000 +X1000Y8000 +X1000Y7000 +X1000Y6000 +X1000Y5000 +X1000Y4000 +X1000Y3000 +X1000Y2000 +X1000Y1000 + +X5000Y9000 +X5000Y8000 +X5000Y7000 +X5000Y6000 +X5000Y5000 +X5000Y4000 +X5000Y3000 +X5000Y2000 +X5000Y1000 + +M30 diff --git a/tests/expects/dxf_to_inch.gtl b/tests/expects/dxf_to_inch.gtl new file mode 100644 index 0000000..ee630c9 --- /dev/null +++ b/tests/expects/dxf_to_inch.gtl @@ -0,0 +1,42 @@ +G75* +%MOIN*% +%OFA0B0*% +%FSLAX25Y25*% +%IPPOS*% +%LPD*% +%ADD10C,0*% +D10* +G01* +X35433Y0D02* +G75* +G01* +X3937Y0D01* +G02* +X0Y3937I0J3937D01* +G01* +X0Y35433D01* +G02* +X3937Y39370I3937J0D01* +G01* +X35433Y39370D01* +G02* +X39370Y35433I0J-3937D01* +G01* +X39370Y3937D01* +G02* +X35433Y0I-3937J0D01* +G01* +X3610Y19685D02* +G75* +G03* +X3610Y19685I-1181J0D01* +G01* +X3610Y29570D02* +G75* +G02* +X1573Y28756I-1181J0D01* +G01* +X2429Y29570D01* +G01* +X3610Y29570D01* +M02* diff --git a/tests/expects/excellon_offset.txt b/tests/expects/excellon_offset.txt new file mode 100644 index 0000000..2007248 --- /dev/null +++ b/tests/expects/excellon_offset.txt @@ -0,0 +1,43 @@ +M48 +FMAT,2 +ICI,OFF +METRIC,TZ,000.000 +M71 +T01C0.100 +T02C0.200 +% +T01 +X16000Y14500 +X16200Y14500 +X16400Y14500 +X16600Y14500 +X16800Y14500 +X17000Y14500 +X17200Y14500 +X17400Y14500 +X17600Y14500 +X17800Y14500 +X18000Y14500 +X18200Y14500 +X18400Y14500 +X18600Y14500 +X18800Y14500 +X19000Y14500 +X19200Y14500 +X19400Y14500 +X19600Y14500 +X19800Y14500 +X20000Y14500 +T02 +X16000Y5500 +X16400Y5500 +X16800Y5500 +X17200Y5500 +X17600Y5500 +X18000Y5500 +X18400Y5500 +X18800Y5500 +X19200Y5500 +X19600Y5500 +X20000Y5500 +M30 diff --git a/tests/expects/excellon_rotate.txt b/tests/expects/excellon_rotate.txt new file mode 100644 index 0000000..2ef3540 --- /dev/null +++ b/tests/expects/excellon_rotate.txt @@ -0,0 +1,43 @@ +M48 +FMAT,2 +ICI,OFF +METRIC,TZ,000.000 +M71 +T01C0.100 +T02C0.200 +% +T01 +X5473Y7820 +X5660Y7888 +X5848Y7957 +X6036Y8025 +X6224Y8094 +X6412Y8162 +X6600Y8230 +X6788Y8299 +X6976Y8367 +X7164Y8436 +X7352Y8504 +X7540Y8572 +X7728Y8641 +X7916Y8709 +X8104Y8778 +X8292Y8846 +X8480Y8915 +X8668Y8983 +X8855Y9051 +X9043Y9120 +X9231Y9188 +T02 +X8551Y-637 +X8927Y-500 +X9302Y-364 +X9678Y-227 +X10054Y-90 +X10430Y47 +X10806Y184 +X11182Y320 +X11558Y457 +X11934Y594 +X12309Y731 +M30 diff --git a/tests/expects/excellon_save.txt b/tests/expects/excellon_save.txt new file mode 100644 index 0000000..a1d2ba8 --- /dev/null +++ b/tests/expects/excellon_save.txt @@ -0,0 +1,43 @@ +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/expects/excellon_to_inch.txt b/tests/expects/excellon_to_inch.txt new file mode 100644 index 0000000..8d31df0 --- /dev/null +++ b/tests/expects/excellon_to_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/expects/excellon_to_metric.txt b/tests/expects/excellon_to_metric.txt new file mode 100644 index 0000000..a634742 --- /dev/null +++ b/tests/expects/excellon_to_metric.txt @@ -0,0 +1,43 @@ +M48 +FMAT,2 +ICI,OFF +METRIC,TZ,000.000 +M71 +T01C0.099 +T02C0.198 +% +T01 +X5001Y9500 +X5199Y9500 +X5400Y9500 +X5601Y9500 +X5799Y9500 +X5999Y9500 +X6200Y9500 +X6401Y9500 +X6599Y9500 +X6800Y9500 +X7000Y9500 +X7201Y9500 +X7399Y9500 +X7600Y9500 +X7800Y9500 +X8001Y9500 +X8199Y9500 +X8400Y9500 +X8600Y9500 +X8801Y9500 +X8999Y9500 +T02 +X5001Y500 +X5400Y500 +X5799Y500 +X6200Y500 +X6599Y500 +X7000Y500 +X7399Y500 +X7800Y500 +X8199Y500 +X8600Y500 +X8999Y500 +M30 diff --git a/tests/test_am_expression.py b/tests/test_am_expression.py new file mode 100644 index 0000000..6786cc3 --- /dev/null +++ b/tests/test_am_expression.py @@ -0,0 +1,207 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2019 Hiroshi Murayama + +import unittest +from gerberex.am_expression import * +from gerberex.am_expression import AMOperatorExpression as Op +from gerber.utils import inch, metric +from gerber.am_read import read_macro + +class TestAMConstantExpression(unittest.TestCase): + def setUp(self): + self.const_int_value = 7 + self.const_int = AMConstantExpression(self.const_int_value) + self.const_float_value = 1.2345 + self.const_float = AMConstantExpression(self.const_float_value) + + def test_contruct(self): + self.assertEqual(self.const_int.value, self.const_int_value) + self.assertEqual(self.const_float.value, self.const_float_value) + + def test_optimize(self): + ov = self.const_int.optimize() + self.assertEqual(ov.value, self.const_int_value) + ov = self.const_float.optimize() + self.assertEqual(ov.value, self.const_float_value) + + def test_to_gerber(self): + self.assertEqual(self.const_int.to_gerber(), '7') + self.assertEqual(self.const_float.to_gerber(), '1.2345') + + def test_to_instructions(self): + self.const_int.to_instructions() + self.const_float.to_instructions() + +class TestAMVariableExpression(unittest.TestCase): + def setUp(self): + self.var1_num = 1 + self.var1 = AMVariableExpression(self.var1_num) + self.var2_num = 512 + self.var2 = AMVariableExpression(self.var2_num) + + def test_construction(self): + self.assertEqual(self.var1.number, self.var1_num) + self.assertEqual(self.var2.number, self.var2_num) + + def test_optimize(self): + ov = self.var1.optimize() + self.assertTrue(isinstance(ov, AMVariableExpression)) + self.assertEqual(ov.number, self.var1_num) + ov = self.var2.optimize() + self.assertTrue(isinstance(ov, AMVariableExpression)) + self.assertEqual(ov.number, self.var2_num) + + def test_to_gerber(self): + self.assertEqual(self.var1.to_gerber(), '$1') + self.assertEqual(self.var2.to_gerber(), '$512') + + def test_to_instructions(self): + self.var1.to_instructions() + self.var2.to_instructions() + +class TestAMOperatorExpression(unittest.TestCase): + def setUp(self): + self.c1 = 10 + self.c2 = 20 + self.v1 = 5 + self.v2 = 9 + c1 = AMConstantExpression(self.c1) + c2 = AMConstantExpression(self.c2) + v1 = AMVariableExpression(self.v1) + v2 = AMVariableExpression(self.v2) + + self.cc_exps = [ + (Op.ADD, AMOperatorExpression(Op.ADD, c1, c2)), + (Op.SUB, AMOperatorExpression(Op.SUB, c1, c2)), + (Op.MUL, AMOperatorExpression(Op.MUL, c1, c2)), + (Op.DIV, AMOperatorExpression(Op.DIV, c1, c2)), + ] + + self.cv_exps = [ + (Op.ADD, AMOperatorExpression(Op.ADD, c1, v2)), + (Op.SUB, AMOperatorExpression(Op.SUB, c1, v2)), + (Op.MUL, AMOperatorExpression(Op.MUL, c1, v2)), + (Op.DIV, AMOperatorExpression(Op.DIV, c1, v2)), + ] + self.vc_exps = [ + (Op.ADD, AMOperatorExpression(Op.ADD, v1, c2)), + (Op.SUB, AMOperatorExpression(Op.SUB, v1, c2)), + (Op.MUL, AMOperatorExpression(Op.MUL, v1, c2)), + (Op.DIV, AMOperatorExpression(Op.DIV, v1, c2)), + ] + + self.composition = AMOperatorExpression(Op.ADD, + self.cc_exps[0][1], self.cc_exps[0][1]) + + def test_optimize(self): + self.assertEqual(self.cc_exps[0][1].optimize().value, self.c1 + self.c2) + self.assertEqual(self.cc_exps[1][1].optimize().value, self.c1 - self.c2) + self.assertEqual(self.cc_exps[2][1].optimize().value, self.c1 * self.c2) + self.assertEqual(self.cc_exps[3][1].optimize().value, self.c1 / self.c2) + + for op, expression in self.cv_exps: + o = expression.optimize() + self.assertTrue(isinstance(o, AMOperatorExpression)) + self.assertEqual(o.op, op) + self.assertEqual(o.lvalue.value, self.c1) + self.assertEqual(o.rvalue.number, self.v2) + + for op, expression in self.vc_exps: + o = expression.optimize() + self.assertTrue(isinstance(o, AMOperatorExpression)) + self.assertEqual(o.op, op) + self.assertEqual(o.lvalue.number, self.v1) + self.assertEqual(o.rvalue.value, self.c2) + + self.assertEqual(self.composition.optimize().value, (self.c1 + self.c2) * 2) + + def test_to_gerber(self): + for op, expression in self.cc_exps: + self.assertEqual(expression.to_gerber(), + '({0}){1}({2})'.format(self.c1, op, self.c2)) + for op, expression in self.cv_exps: + self.assertEqual(expression.to_gerber(), + '({0}){1}(${2})'.format(self.c1, op, self.v2)) + for op, expression in self.vc_exps: + self.assertEqual(expression.to_gerber(), + '(${0}){1}({2})'.format(self.v1, op, self.c2)) + self.assertEqual(self.composition.to_gerber(), + '(({0})+({1}))+(({2})+({3}))'.format( + self.c1, self.c2, self.c1, self.c2 + )) + + def test_to_instructions(self): + for of, expression in self.vc_exps + self.cv_exps + self.cc_exps: + expression.to_instructions() + self.composition.to_instructions() + +class TestAMExpression(unittest.TestCase): + def setUp(self): + self.c1 = 10 + self.c1_exp = AMConstantExpression(self.c1) + self.v1 = 5 + self.v1_exp = AMVariableExpression(self.v1) + self.op_exp = AMOperatorExpression(Op.ADD, self.c1_exp, self.v1_exp) + + def test_to_inch(self): + o = self.c1_exp.to_inch().optimize() + self.assertEqual(o.value, inch(self.c1)) + o = self.v1_exp.to_inch().optimize() + self.assertTrue(isinstance(o, AMOperatorExpression)) + self.assertEqual(o.op, Op.DIV) + o = self.op_exp.to_inch().optimize() + self.assertTrue(isinstance(o, AMOperatorExpression)) + self.assertEqual(o.op, Op.DIV) + + def test_to_metric(self): + o = self.c1_exp.to_metric().optimize() + self.assertEqual(o.value, metric(self.c1)) + o = self.v1_exp.to_metric().optimize() + self.assertTrue(isinstance(o, AMOperatorExpression)) + self.assertEqual(o.op, Op.MUL) + o = self.op_exp.to_metric().optimize() + self.assertTrue(isinstance(o, AMOperatorExpression)) + self.assertEqual(o.op, Op.MUL) + +class TestEvalMacro(unittest.TestCase): + def test_eval_macro(self): + macros = [ + '$1=5.5*', + '$2=$3*', + '$3=(1.23)+(4.56)*', + '$3=(1.23)-(4.56)*', + '$3=(1.23)X(4.56)*', + '$3=(1.23)/(4.56)*', + '$3=(10.2)X($2)*', + '1,1.2*', + '1,$2*', + '1,($2)+($3)*', + #'1,(2.0)-($3)*', # This doesn't pass due to pcb-tools bug + '1,($2)X($3)*', + '1,($2)/($3)*', + '1,2.1,3.2*2,(3.1)/($1),$2*' + ] + for macro in macros: + self._eval_macro_string(macro) + + def _eval_macro_string(self, macro): + expressions = eval_macro(read_macro(macro)) + gerber = self._to_gerber(expressions) + self.assertEqual(macro, gerber) + + def _to_gerber(self, expressions_list): + gerber = '' + for number, expressions in expressions_list: + self.assertTrue(isinstance(number, int)) + if number > 0: + egerbers = [exp.to_gerber() for exp in expressions] + gerber += '{0},{1}*'.format(number, ','.join(egerbers)) + else: + self.assertEqual(len(expressions), 1) + gerber += '${0}={1}*'.format(-number, expressions[0].to_gerber()) + return gerber + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_dxf.py b/tests/test_dxf.py new file mode 100644 index 0000000..31589da --- /dev/null +++ b/tests/test_dxf.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2019 Hiroshi Murayama + +import os +import unittest +import gerberex +from gerber.utils import inch, metric + + +class TestExcellon(unittest.TestCase): + @classmethod + def setUpClass(cls): + os.chdir(os.path.dirname(__file__)) + cls.INDIR = 'data' + cls.OUTDIR = 'outputs' + cls.EXPECTSDIR = 'expects' + cls.OUTPREFIX = 'dxf_' + cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_dxf_metric.dxf') + cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_dxf_inch.dxf') + cls.MOUSEBITES_FILE = os.path.join(cls.INDIR, 'ref_dxf_mousebites.dxf') + try: + os.mkdir(cls.OUTDIR) + except FileExistsError: + pass + + def _checkResult(self, file): + with open(file, 'r') as f: + data = f.read() + with open(os.path.join(self.EXPECTSDIR, os.path.basename(file)), 'r') as f: + expect = f.read() + self.assertEqual(data, expect) + + def test_save_line(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_line.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.draw_mode = dxf.DM_LINE + dxf.write(outfile) + self._checkResult(outfile) + + def test_save_fill(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_fill.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.draw_mode = dxf.DM_FILL + dxf.write(outfile) + self._checkResult(outfile) + + def test_save_mousebites(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_mousebites.gtl') + dxf = gerberex.read(self.MOUSEBITES_FILE) + dxf.draw_mode = dxf.DM_MOUSE_BITES + dxf.width = 0.5 + dxf.pitch = 1 + dxf.write(outfile) + self._checkResult(outfile) + + def test_save_excellon(self): + outfile = os.path.join( + self.OUTDIR, self.OUTPREFIX + 'save_mousebites.txt') + dxf = gerberex.read(self.MOUSEBITES_FILE) + dxf.draw_mode = dxf.DM_MOUSE_BITES + dxf.format = (3,3) + dxf.width = 0.5 + dxf.pitch = 1 + dxf.write(outfile, filetype=dxf.FT_EXCELLON) + self._checkResult(outfile) + + def test_to_inch(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_inch.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.to_inch() + dxf.format = (2, 5) + dxf.write(outfile) + self._checkResult(outfile) + + def _test_to_metric(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_metric.gtl') + dxf = gerberex.read(self.INCH_FILE) + dxf.to_metric() + dxf.format = (3, 5) + dxf.write(outfile) + self._checkResult(outfile) + + def test_offset(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'offset.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.offset(11, 5) + dxf.write(outfile) + self._checkResult(outfile) + + def test_rotate(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rotate.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.rotate(20, (10, 10)) + dxf.write(outfile) + self._checkResult(outfile) + + def test_rectangle_metric(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rectangle_metric.gtl') + dxf = gerberex.DxfFile.rectangle(width=10, height=10, units='metric') + dxf.write(outfile) + self._checkResult(outfile) + + def test_rectangle_inch(self): + outfile = os.path.join( + self.OUTDIR, self.OUTPREFIX + 'rectangle_inch.gtl') + dxf = gerberex.DxfFile.rectangle(width=inch(10), height=inch(10), units='inch') + dxf.write(outfile) + self._checkResult(outfile) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_excellon.py b/tests/test_excellon.py new file mode 100644 index 0000000..36093cd --- /dev/null +++ b/tests/test_excellon.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2019 Hiroshi Murayama + +import os +import unittest +import gerberex + + +class TestExcellon(unittest.TestCase): + @classmethod + def setUpClass(cls): + os.chdir(os.path.dirname(__file__)) + cls.INDIR = 'data' + cls.OUTDIR = 'outputs' + cls.EXPECTSDIR = 'expects' + cls.OUTPREFIX = 'excellon_' + cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_drill_metric.txt') + cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_drill_inch.txt') + try: + os.mkdir(cls.OUTDIR) + except FileExistsError: + pass + + def _checkResult(self, file): + with open(file, 'r') as f: + data = f.read() + with open(os.path.join(self.EXPECTSDIR, os.path.basename(file)), 'r') as f: + expect = f.read() + self.assertEqual(data, expect) + pass + + def test_save(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save.txt') + drill = gerberex.read(self.METRIC_FILE) + drill.write(outfile) + self._checkResult(outfile) + + def test_to_inch(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_inch.txt') + drill = gerberex.read(self.METRIC_FILE) + drill.to_inch() + drill.format = (2, 4) + drill.write(outfile) + self._checkResult(outfile) + + def test_to_metric(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_metric.txt') + drill = gerberex.read(self.INCH_FILE) + drill.to_metric() + drill.format = (3, 3) + drill.write(outfile) + self._checkResult(outfile) + + def test_offset(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'offset.txt') + drill = gerberex.read(self.METRIC_FILE) + drill.offset(11, 5) + drill.write(outfile) + self._checkResult(outfile) + + def test_rotate(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rotate.txt') + drill = gerberex.read(self.METRIC_FILE) + drill.rotate(20, (10, 10)) + drill.write(outfile) + self._checkResult(outfile) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_rs274x.py b/tests/test_rs274x.py new file mode 100644 index 0000000..3e44066 --- /dev/null +++ b/tests/test_rs274x.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2019 Hiroshi Murayama + +import os +import unittest +import gerberex + +class TestRs274x(unittest.TestCase): + @classmethod + def setUpClass(cls): + os.chdir(os.path.dirname(__file__)) + cls.INDIR = 'data' + cls.OUTDIR = 'outputs' + cls.EXPECTSDIR = 'expects' + cls.OUTPREFIX = 'RS2724x_' + cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_gerber_metric.gtl') + cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_gerber_inch.gtl') + try: + os.mkdir(cls.OUTDIR) + except FileExistsError: + pass + + def _checkResult(self, file): + with open(file, 'r') as f: + data = f.read() + with open(os.path.join(self.EXPECTSDIR, os.path.basename(file)), 'r') as f: + expect = f.read() + self.assertEqual(data, expect) + + def test_save(self): + outfile=os.path.join(self.OUTDIR, self.OUTPREFIX + 'save.gtl') + gerber = gerberex.read(self.METRIC_FILE) + gerber.write(outfile) + self._checkResult(outfile) + + def test_to_inch(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_inch.gtl') + gerber = gerberex.read(self.METRIC_FILE) + gerber.to_inch() + gerber.format = (2,5) + gerber.write(outfile) + self._checkResult(outfile) + + def test_to_metric(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'to_metric.gtl') + gerber = gerberex.read(self.INCH_FILE) + gerber.to_metric() + gerber.format = (3, 4) + gerber.write(outfile) + self._checkResult(outfile) + + def test_offset(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'offset.gtl') + gerber = gerberex.read(self.METRIC_FILE) + gerber.offset(11, 5) + gerber.write(outfile) + self._checkResult(outfile) + + def test_rotate(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'rotate.gtl') + gerber = gerberex.read(self.METRIC_FILE) + gerber.rotate(20, (10,10)) + gerber.write(outfile) + self._checkResult(outfile) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_utility.py b/tests/test_utility.py new file mode 100644 index 0000000..4ede8d5 --- /dev/null +++ b/tests/test_utility.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2019 Hiroshi Murayama + +import unittest + +from gerberex.utility import * +from math import sqrt + +class TestUtility(unittest.TestCase): + def test_rotate(self): + x0, y0 = (10, 0) + + x1, y1 = rotate(x0, y0, 60, (0, 0)) + self.assertAlmostEqual(x1, 5) + self.assertAlmostEqual(y1, 10 * sqrt(3) / 2) + + x1, y1 = rotate(x0, y0, 180, (5, 0)) + self.assertAlmostEqual(x1, 0) + self.assertAlmostEqual(y1, 0) + + x1, y1 = rotate(x0, y0, -90, (10, 5)) + self.assertAlmostEqual(x1, 5) + self.assertAlmostEqual(y1, 5) + + def test_is_equal_value(self): + a = 10.0001 + b = 10.01 + + self.assertTrue(is_equal_value(a, b, 0.1)) + self.assertTrue(is_equal_value(a, b, 0.01)) + self.assertFalse(is_equal_value(a, b, 0.001)) + self.assertFalse(is_equal_value(a, b)) + + self.assertTrue(is_equal_value(b, a, 0.1)) + self.assertTrue(is_equal_value(b, a, 0.01)) + self.assertFalse(is_equal_value(b, a, 0.001)) + self.assertFalse(is_equal_value(b, a)) + + def test_is_equal_point(self): + p0 = (10.01, 5.001) + p1 = (10.0001, 5) + self.assertTrue(is_equal_point(p0, p1, 0.1)) + self.assertTrue(is_equal_point(p0, p1, 0.01)) + self.assertFalse(is_equal_point(p0, p1, 0.001)) + self.assertFalse(is_equal_point(p0, p1)) + self.assertTrue(is_equal_point(p1, p0, 0.1)) + self.assertTrue(is_equal_point(p1, p0, 0.01)) + self.assertFalse(is_equal_point(p1, p0, 0.001)) + self.assertFalse(is_equal_point(p1, p0)) + + p0 = (5.001, 10.01) + p1 = (5, 10.0001) + self.assertTrue(is_equal_point(p0, p1, 0.1)) + self.assertTrue(is_equal_point(p0, p1, 0.01)) + self.assertFalse(is_equal_point(p0, p1, 0.001)) + self.assertFalse(is_equal_point(p0, p1)) + self.assertTrue(is_equal_point(p1, p0, 0.1)) + self.assertTrue(is_equal_point(p1, p0, 0.01)) + self.assertFalse(is_equal_point(p1, p0, 0.001)) + self.assertFalse(is_equal_point(p1, p0)) + +if __name__ == '__main__': + unittest.main() -- cgit From 4c7aef6a8215758e8b91b5ad118f45694d842472 Mon Sep 17 00:00:00 2001 From: opiopan Date: Sun, 28 Jul 2019 01:11:40 +0900 Subject: modify test codes --- tests/expects/RS2724x_offset.gtl | 14 +++++------ tests/expects/RS2724x_rotate.gtl | 38 ++++++++++++++-------------- tests/expects/RS2724x_save.gtl | 14 +++++------ tests/expects/RS2724x_to_inch.gtl | 14 +++++------ tests/expects/RS2724x_to_metric.gtl | 14 +++++------ tests/test_am_expression.py | 49 +++++++++++++++++++------------------ 6 files changed, 72 insertions(+), 71 deletions(-) (limited to 'tests') diff --git a/tests/expects/RS2724x_offset.gtl b/tests/expects/RS2724x_offset.gtl index 9f15f4c..f54e85b 100644 --- a/tests/expects/RS2724x_offset.gtl +++ b/tests/expects/RS2724x_offset.gtl @@ -3,13 +3,13 @@ %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*% +20,1,0.200000,0.000000,0.100000,0.400000,0.100000,$1* +21,1,0.400000,0.200000,-0.200000,-0.100000,$1* +1,1,0.400000,-1.200000,0.000000,$1* +4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.400000,1.000000,-0.200000,1.200000,0.000000,$1* +5,1,6.000000,1.200000,0.200000,0.400000,$1* +6,-0.700000,0.000000,0.500000,0.050000,0.150000,2.000000,0.050000,0.600000,$1* +7,0.700000,0.000000,0.600000,0.500000,0.150000,$1*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12R,1X0.5X0.2*% diff --git a/tests/expects/RS2724x_rotate.gtl b/tests/expects/RS2724x_rotate.gtl index 0a2d1aa..9401fa7 100644 --- a/tests/expects/RS2724x_rotate.gtl +++ b/tests/expects/RS2724x_rotate.gtl @@ -3,33 +3,33 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.2,0,0.1,0.4,0.1,($1)+(20)* -21,1,0.4,0.2,-0.2,-0.1,($1)+(20)* -1,1,0.4,-1.2,0,($1)+(20)* -4,1,4,1.2,0,1.4,-0.2,1.2,-0.4,1,-0.2,1.2,0,($1)+(20)* -5,1,6,1.2,0.2,0.4,($1)+(20)* -6,-0.7,0,0.5,0.05,0.15,2,0.05,0.6,($1)+(20)* -7,0.7,0,0.6,0.5,0.15,($1)+(20)*% +20,1,0.200000,0.000000,0.100000,0.400000,0.100000,($1)+(20.000000)* +21,1,0.400000,0.200000,-0.200000,-0.100000,($1)+(20.000000)* +1,1,0.400000,-1.200000,0.000000,($1)+(20.000000)* +4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.400000,1.000000,-0.200000,1.200000,0.000000,($1)+(20.000000)* +5,1,6.000000,1.200000,0.200000,0.400000,($1)+(20.000000)* +6,-0.700000,0.000000,0.500000,0.050000,0.150000,2.000000,0.050000,0.600000,($1)+(20.000000)* +7,0.700000,0.000000,0.600000,0.500000,0.150000,($1)+(20.000000)*% %AMMACP* -5,1,$2,0,0,$1,($3)+(20)* -1,0,$4,0,0,20*% +5,1,$2,0.000000,0.000000,$1,($3)+(20.000000)* +1,0,$4,0.000000,0.000000,20.000000*% %AMMACPO* $4=($2)-($1)* $5=($2)-($4)* -21,1,$1,$5,0,0,20* -1,1,$4,0,($4)/(2),20* -1,1,$4,0,($4)/(-2),20* -1,0,$3,0,0,20*% +21,1,$1,$5,0.000000,0.000000,20.000000* +1,1,$4,0.000000,($4)/(2.000000),20.000000* +1,1,$4,0.000000,($4)/(-2.000000),20.000000* +1,0,$3,0.000000,0.000000,20.000000*% %AMMACLO* $4=($1)-($2)* $5=($1)-($4)* -21,1,$5,$2,0,0,20* -1,1,$4,($4)/(2),0,20* -1,1,$4,($4)/(-2),0,20* -1,0,$3,0,0,20*% +21,1,$5,$2,0.000000,0.000000,20.000000* +1,1,$4,($4)/(2.000000),0.000000,20.000000* +1,1,$4,($4)/(-2.000000),0.000000,20.000000* +1,0,$3,0.000000,0.000000,20.000000*% %AMMACR* -21,1,$1,$2,0,0,20* -1,0,$3,0,0,20*% +21,1,$1,$2,0.000000,0.000000,20.000000* +1,0,$3,0.000000,0.000000,20.000000*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12MACR,1X0.5X0.2*% diff --git a/tests/expects/RS2724x_save.gtl b/tests/expects/RS2724x_save.gtl index 02dbaa8..45841e8 100644 --- a/tests/expects/RS2724x_save.gtl +++ b/tests/expects/RS2724x_save.gtl @@ -3,13 +3,13 @@ %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*% +20,1,0.200000,0.000000,0.100000,0.400000,0.100000,$1* +21,1,0.400000,0.200000,-0.200000,-0.100000,$1* +1,1,0.400000,-1.200000,0.000000,$1* +4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.400000,1.000000,-0.200000,1.200000,0.000000,$1* +5,1,6.000000,1.200000,0.200000,0.400000,$1* +6,-0.700000,0.000000,0.500000,0.050000,0.150000,2.000000,0.050000,0.600000,$1* +7,0.700000,0.000000,0.600000,0.500000,0.150000,$1*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12R,1X0.5X0.2*% diff --git a/tests/expects/RS2724x_to_inch.gtl b/tests/expects/RS2724x_to_inch.gtl index 3ec60d8..36bc604 100644 --- a/tests/expects/RS2724x_to_inch.gtl +++ b/tests/expects/RS2724x_to_inch.gtl @@ -3,13 +3,13 @@ %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*% +20,1,0.007874,0.000000,0.003937,0.015748,0.003937,$1* +21,1,0.015748,0.007874,-0.007874,-0.003937,$1* +1,1,0.015748,-0.047244,0.000000,$1* +4,1,4,0.047244,0.000000,0.055118,-0.007874,0.047244,-0.015748,0.039370,-0.007874,0.047244,0.000000,$1* +5,1,6.000000,0.047244,0.007874,0.015748,$1* +6,-0.027559,0.000000,0.019685,0.001969,0.005906,2.000000,0.001969,0.023622,$1* +7,0.027559,0.000000,0.023622,0.019685,0.005906,$1*% %ADD10C,0.0003937*% %ADD11C,0.03937X0.01575*% %ADD12R,0.03937X0.01969X0.007874*% diff --git a/tests/expects/RS2724x_to_metric.gtl b/tests/expects/RS2724x_to_metric.gtl index 93adfc1..72464f3 100644 --- a/tests/expects/RS2724x_to_metric.gtl +++ b/tests/expects/RS2724x_to_metric.gtl @@ -3,13 +3,13 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.2,0,0.1,0.399999,0.1,$1* -21,1,0.399999,0.2,-0.2,-0.1,$1* -1,1,0.399999,-1.2,0,$1* -4,1,4,1.2,0,1.4,-0.2,1.2,-0.399999,1,-0.2,1.2,0,$1* -5,1,6,1.2,0.2,0.399999,$1* -6,-0.700001,0,0.499999,0.0499999,0.15,2,0.0499999,0.599999,$1* -7,0.700001,0,0.599999,0.499999,0.15,$1*% +20,1,0.200000,0.000000,0.100000,0.399999,0.100000,$1* +21,1,0.399999,0.200000,-0.200000,-0.100000,$1* +1,1,0.399999,-1.200000,0.000000,$1* +4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.399999,1.000001,-0.200000,1.200000,0.000000,$1* +5,1,6.000000,1.200000,0.200000,0.399999,$1* +6,-0.700001,0.000000,0.499999,0.050000,0.150000,2.000000,0.050000,0.599999,$1* +7,0.700001,0.000000,0.599999,0.499999,0.150000,$1*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12R,1X0.5001X0.2*% diff --git a/tests/test_am_expression.py b/tests/test_am_expression.py index 6786cc3..0f064e6 100644 --- a/tests/test_am_expression.py +++ b/tests/test_am_expression.py @@ -27,8 +27,8 @@ class TestAMConstantExpression(unittest.TestCase): self.assertEqual(ov.value, self.const_float_value) def test_to_gerber(self): - self.assertEqual(self.const_int.to_gerber(), '7') - self.assertEqual(self.const_float.to_gerber(), '1.2345') + self.assertEqual(self.const_int.to_gerber(), '7.000000') + self.assertEqual(self.const_float.to_gerber(), '1.234500') def test_to_instructions(self): self.const_int.to_instructions() @@ -120,15 +120,15 @@ class TestAMOperatorExpression(unittest.TestCase): def test_to_gerber(self): for op, expression in self.cc_exps: self.assertEqual(expression.to_gerber(), - '({0}){1}({2})'.format(self.c1, op, self.c2)) + '(%.6f)%s(%.6f)' % (self.c1, op, self.c2)) for op, expression in self.cv_exps: self.assertEqual(expression.to_gerber(), - '({0}){1}(${2})'.format(self.c1, op, self.v2)) + '(%.6f)%s($%d)' % (self.c1, op, self.v2)) for op, expression in self.vc_exps: self.assertEqual(expression.to_gerber(), - '(${0}){1}({2})'.format(self.v1, op, self.c2)) + '($%d)%s(%.6f)' % (self.v1, op, self.c2)) self.assertEqual(self.composition.to_gerber(), - '(({0})+({1}))+(({2})+({3}))'.format( + '((%.6f)+(%.6f))+((%.6f)+(%.6f))' % ( self.c1, self.c2, self.c1, self.c2 )) @@ -168,28 +168,29 @@ class TestAMExpression(unittest.TestCase): class TestEvalMacro(unittest.TestCase): def test_eval_macro(self): macros = [ - '$1=5.5*', - '$2=$3*', - '$3=(1.23)+(4.56)*', - '$3=(1.23)-(4.56)*', - '$3=(1.23)X(4.56)*', - '$3=(1.23)/(4.56)*', - '$3=(10.2)X($2)*', - '1,1.2*', - '1,$2*', - '1,($2)+($3)*', - #'1,(2.0)-($3)*', # This doesn't pass due to pcb-tools bug - '1,($2)X($3)*', - '1,($2)/($3)*', - '1,2.1,3.2*2,(3.1)/($1),$2*' + ('$1=5.5*', '$1=5.500000*'), + ('$1=0.0000001*', '$1=0.000000*'), + ('$2=$3*', '$2=$3*'), + ('$3=(1.23)+(4.56)*', '$3=(1.230000)+(4.560000)*'), + ('$3=(1.23)-(4.56)*', '$3=(1.230000)-(4.560000)*'), + ('$3=(1.23)X(4.56)*', '$3=(1.230000)X(4.560000)*'), + ('$3=(1.23)/(4.56)*', '$3=(1.230000)/(4.560000)*'), + ('$3=(10.2)X($2)*', '$3=(10.200000)X($2)*'), + ('1,1.2*', '1,1.200000*'), + ('1,$2*', '1,$2*'), + ('1,($2)+($3)*', '1,($2)+($3)*'), + #('1,(2.0)-($3)*', '1,(2.0)-($3)*'), # This doesn't pass due to pcb-tools bug + ('1,($2)X($3)*', '1,($2)X($3)*'), + ('1,($2)/($3)*', '1,($2)/($3)*'), + ('1,2.1,3.2*2,(3.1)/($1),$2*', '1,2.100000,3.200000*2,(3.100000)/($1),$2*'), ] - for macro in macros: - self._eval_macro_string(macro) + for macro, expected in macros: + self._eval_macro_string(macro, expected) - def _eval_macro_string(self, macro): + def _eval_macro_string(self, macro, expected): expressions = eval_macro(read_macro(macro)) gerber = self._to_gerber(expressions) - self.assertEqual(macro, gerber) + self.assertEqual(gerber, expected) def _to_gerber(self, expressions_list): gerber = '' -- cgit From 02258202793e9c70f212171fe4a92f6bab3a6f72 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sun, 18 Aug 2019 14:16:22 +0900 Subject: fix a bug that unit traslation of excellon fail --- tests/data/ref_drill_inch.txt | 66 ++++++++++++++++------------------ tests/data/ref_drill_metric.txt | 68 +++++++++++++++++------------------- tests/expects/excellon_offset.txt | 66 ++++++++++++++++------------------ tests/expects/excellon_rotate.txt | 66 ++++++++++++++++------------------ tests/expects/excellon_save.txt | 66 ++++++++++++++++------------------ tests/expects/excellon_to_inch.txt | 66 ++++++++++++++++------------------ tests/expects/excellon_to_metric.txt | 66 ++++++++++++++++------------------ 7 files changed, 218 insertions(+), 246 deletions(-) (limited to 'tests') diff --git a/tests/data/ref_drill_inch.txt b/tests/data/ref_drill_inch.txt index 8d31df0..6aea2e0 100644 --- a/tests/data/ref_drill_inch.txt +++ b/tests/data/ref_drill_inch.txt @@ -2,42 +2,38 @@ M48 FMAT,2 ICI,OFF INCH,TZ,00.0000 -M72 -T01C0.0039 -T02C0.0078 +T01C0.0236 +T02C0.0275 +T03C0.0314 +T04C0.0393 % +G90 +M72 T01 -X1969Y3740 -X2047Y3740 -X2126Y3740 -X2205Y3740 -X2283Y3740 -X2362Y3740 -X2441Y3740 -X2520Y3740 -X2598Y3740 -X2677Y3740 -X2756Y3740 -X2835Y3740 -X2913Y3740 -X2992Y3740 -X3071Y3740 -X3150Y3740 -X3228Y3740 -X3307Y3740 -X3386Y3740 -X3465Y3740 -X3543Y3740 +X1815Y960 +X1815Y1344 +X1421Y2402G85X827Y2402 T02 -X1969Y197 -X2126Y197 -X2283Y197 -X2441Y197 -X2598Y197 -X2756Y197 -X2913Y197 -X3071Y197 -X3228Y197 -X3386Y197 -X3543Y197 +X1421Y1535 +X1421Y768 +X843Y768 +X807Y1535 +T03 +G00X1421Y1152 +M15 +G01X843Y1152 +M16 +G05 +X1417Y2795 +T04 +G00X236Y669 +M15 +G03X630Y276A394 +G01X2598Y276 +G01X2598Y1614 +G03X2205Y2008A394 +G01X236Y2008 +G01X236Y669 +M16 +G05 M30 diff --git a/tests/data/ref_drill_metric.txt b/tests/data/ref_drill_metric.txt index 87f20f5..903fc48 100644 --- a/tests/data/ref_drill_metric.txt +++ b/tests/data/ref_drill_metric.txt @@ -2,44 +2,40 @@ M48 FMAT,2 ICI,OFF METRIC,TZ,000.000 -M71 -T01C0.100 -T02C0.200 +T01C0.600 +T02C0.700 +T03C0.800 +T04C1.000 % +G90 +M71 T01 -X5000Y9500 -X5200Y9500 -X5400Y9500 -X5600Y9500 -X5800Y9500 -X6000Y9500 -X6200Y9500 -X6400Y9500 -X6600Y9500 -X6800Y9500 -X7000Y9500 -X7200Y9500 -X7400Y9500 -X7600Y9500 -X7800Y9500 -X8000Y9500 -X8200Y9500 -X8400Y9500 -X8600Y9500 -X8800Y9500 -X9000Y9500 - +X4610Y2438 +X4610Y3413 +X3610Y6100G85X2100Y6100 T02 -X5000Y500 -X5400Y500 -X5800Y500 -X6200Y500 -X6600Y500 -X7000Y500 -X7400Y500 -X7800Y500 -X8200Y500 -X8600Y500 -X9000Y500 +X3610Y3900 +X3610Y1950 +X2140Y1950 +X2050Y3900 +T03 +G00X3610Y2925 +M15 +G01X2140Y2925 +M16 +G05 + +X3600Y7100 +T04 +G00X600Y1700 +M15 +G03X1600Y700A1000 +G01X6600Y700 +G01X6600Y4100 +G03X5600Y5100A1000 +G01X600Y5100 +G01X600Y1700 +M16 +G05 M30 diff --git a/tests/expects/excellon_offset.txt b/tests/expects/excellon_offset.txt index 2007248..41dbf3e 100644 --- a/tests/expects/excellon_offset.txt +++ b/tests/expects/excellon_offset.txt @@ -2,42 +2,38 @@ M48 FMAT,2 ICI,OFF METRIC,TZ,000.000 -M71 -T01C0.100 -T02C0.200 +T01C0.600 +T02C0.700 +T03C0.800 +T04C1.000 % +G90 +M71 T01 -X16000Y14500 -X16200Y14500 -X16400Y14500 -X16600Y14500 -X16800Y14500 -X17000Y14500 -X17200Y14500 -X17400Y14500 -X17600Y14500 -X17800Y14500 -X18000Y14500 -X18200Y14500 -X18400Y14500 -X18600Y14500 -X18800Y14500 -X19000Y14500 -X19200Y14500 -X19400Y14500 -X19600Y14500 -X19800Y14500 -X20000Y14500 +X15610Y7438 +X15610Y8413 +X14610Y11100G85X13100Y11100 T02 -X16000Y5500 -X16400Y5500 -X16800Y5500 -X17200Y5500 -X17600Y5500 -X18000Y5500 -X18400Y5500 -X18800Y5500 -X19200Y5500 -X19600Y5500 -X20000Y5500 +X14610Y8900 +X14610Y6950 +X13140Y6950 +X13050Y8900 +T03 +G00X14610Y7925 +M15 +G01X13140Y7925 +M16 +G05 +X14600Y12100 +T04 +G00X11600Y6700 +M15 +G03X12600Y5700A1000 +G01X17600Y5700 +G01X17600Y9100 +G03X16600Y10100A1000 +G01X11600Y10100 +G01X11600Y6700 +M16 +G05 M30 diff --git a/tests/expects/excellon_rotate.txt b/tests/expects/excellon_rotate.txt index 2ef3540..9983909 100644 --- a/tests/expects/excellon_rotate.txt +++ b/tests/expects/excellon_rotate.txt @@ -2,42 +2,38 @@ M48 FMAT,2 ICI,OFF METRIC,TZ,000.000 -M71 -T01C0.100 -T02C0.200 +T01C0.600 +T02C0.700 +T03C0.800 +T04C1.000 % +G90 +M71 T01 -X5473Y7820 -X5660Y7888 -X5848Y7957 -X6036Y8025 -X6224Y8094 -X6412Y8162 -X6600Y8230 -X6788Y8299 -X6976Y8367 -X7164Y8436 -X7352Y8504 -X7540Y8572 -X7728Y8641 -X7916Y8709 -X8104Y8778 -X8292Y8846 -X8480Y8915 -X8668Y8983 -X8855Y9051 -X9043Y9120 -X9231Y9188 +X7521Y1051 +X7188Y1967 +X5329Y4150G85X3910Y3633 T02 -X8551Y-637 -X8927Y-500 -X9302Y-364 -X9678Y-227 -X10054Y-90 -X10430Y47 -X10806Y184 -X11182Y320 -X11558Y457 -X11934Y594 -X12309Y731 +X6082Y2082 +X6749Y250 +X5367Y-253 +X4616Y1549 +T03 +G00X6415Y1166 +M15 +G01X5034Y663 +M16 +G05 +X4978Y5086 +T04 +G00X4006Y-1014 +M15 +G03X5287Y-1612A1000 +G01X9986Y98 +G01X8823Y3293 +G03X7541Y3891A1000 +G01X2843Y2181 +G01X4006Y-1014 +M16 +G05 M30 diff --git a/tests/expects/excellon_save.txt b/tests/expects/excellon_save.txt index a1d2ba8..6a22a7d 100644 --- a/tests/expects/excellon_save.txt +++ b/tests/expects/excellon_save.txt @@ -2,42 +2,38 @@ M48 FMAT,2 ICI,OFF METRIC,TZ,000.000 -M71 -T01C0.100 -T02C0.200 +T01C0.600 +T02C0.700 +T03C0.800 +T04C1.000 % +G90 +M71 T01 -X5000Y9500 -X5200Y9500 -X5400Y9500 -X5600Y9500 -X5800Y9500 -X6000Y9500 -X6200Y9500 -X6400Y9500 -X6600Y9500 -X6800Y9500 -X7000Y9500 -X7200Y9500 -X7400Y9500 -X7600Y9500 -X7800Y9500 -X8000Y9500 -X8200Y9500 -X8400Y9500 -X8600Y9500 -X8800Y9500 -X9000Y9500 +X4610Y2438 +X4610Y3413 +X3610Y6100G85X2100Y6100 T02 -X5000Y500 -X5400Y500 -X5800Y500 -X6200Y500 -X6600Y500 -X7000Y500 -X7400Y500 -X7800Y500 -X8200Y500 -X8600Y500 -X9000Y500 +X3610Y3900 +X3610Y1950 +X2140Y1950 +X2050Y3900 +T03 +G00X3610Y2925 +M15 +G01X2140Y2925 +M16 +G05 +X3600Y7100 +T04 +G00X600Y1700 +M15 +G03X1600Y700A1000 +G01X6600Y700 +G01X6600Y4100 +G03X5600Y5100A1000 +G01X600Y5100 +G01X600Y1700 +M16 +G05 M30 diff --git a/tests/expects/excellon_to_inch.txt b/tests/expects/excellon_to_inch.txt index 8d31df0..6aea2e0 100644 --- a/tests/expects/excellon_to_inch.txt +++ b/tests/expects/excellon_to_inch.txt @@ -2,42 +2,38 @@ M48 FMAT,2 ICI,OFF INCH,TZ,00.0000 -M72 -T01C0.0039 -T02C0.0078 +T01C0.0236 +T02C0.0275 +T03C0.0314 +T04C0.0393 % +G90 +M72 T01 -X1969Y3740 -X2047Y3740 -X2126Y3740 -X2205Y3740 -X2283Y3740 -X2362Y3740 -X2441Y3740 -X2520Y3740 -X2598Y3740 -X2677Y3740 -X2756Y3740 -X2835Y3740 -X2913Y3740 -X2992Y3740 -X3071Y3740 -X3150Y3740 -X3228Y3740 -X3307Y3740 -X3386Y3740 -X3465Y3740 -X3543Y3740 +X1815Y960 +X1815Y1344 +X1421Y2402G85X827Y2402 T02 -X1969Y197 -X2126Y197 -X2283Y197 -X2441Y197 -X2598Y197 -X2756Y197 -X2913Y197 -X3071Y197 -X3228Y197 -X3386Y197 -X3543Y197 +X1421Y1535 +X1421Y768 +X843Y768 +X807Y1535 +T03 +G00X1421Y1152 +M15 +G01X843Y1152 +M16 +G05 +X1417Y2795 +T04 +G00X236Y669 +M15 +G03X630Y276A394 +G01X2598Y276 +G01X2598Y1614 +G03X2205Y2008A394 +G01X236Y2008 +G01X236Y669 +M16 +G05 M30 diff --git a/tests/expects/excellon_to_metric.txt b/tests/expects/excellon_to_metric.txt index a634742..1bb4287 100644 --- a/tests/expects/excellon_to_metric.txt +++ b/tests/expects/excellon_to_metric.txt @@ -2,42 +2,38 @@ M48 FMAT,2 ICI,OFF METRIC,TZ,000.000 -M71 -T01C0.099 -T02C0.198 +T01C0.599 +T02C0.698 +T03C0.797 +T04C0.998 % +G90 +M71 T01 -X5001Y9500 -X5199Y9500 -X5400Y9500 -X5601Y9500 -X5799Y9500 -X5999Y9500 -X6200Y9500 -X6401Y9500 -X6599Y9500 -X6800Y9500 -X7000Y9500 -X7201Y9500 -X7399Y9500 -X7600Y9500 -X7800Y9500 -X8001Y9500 -X8199Y9500 -X8400Y9500 -X8600Y9500 -X8801Y9500 -X8999Y9500 +X4610Y2438 +X4610Y3414 +X3609Y6101G85X2101Y6101 T02 -X5001Y500 -X5400Y500 -X5799Y500 -X6200Y500 -X6599Y500 -X7000Y500 -X7399Y500 -X7800Y500 -X8199Y500 -X8600Y500 -X8999Y500 +X3609Y3899 +X3609Y1951 +X2141Y1951 +X2050Y3899 +T03 +G00X3609Y2926 +M15 +G01X2141Y2926 +M16 +G05 +X3599Y7099 +T04 +G00X599Y1699 +M15 +G03X1600Y701A1001 +G01X6599Y701 +G01X6599Y4100 +G03X5601Y5100A1001 +G01X599Y5100 +G01X599Y1699 +M16 +G05 M30 -- cgit From f8fe16708502e0588d9d0be42d097a933d6f12d3 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sun, 18 Aug 2019 18:33:41 +0900 Subject: zero supressing in aperture macro definition --- tests/expects/RS2724x_offset.gtl | 14 +++++------ tests/expects/RS2724x_rotate.gtl | 38 ++++++++++++++-------------- tests/expects/RS2724x_save.gtl | 14 +++++------ tests/expects/RS2724x_to_inch.gtl | 14 +++++------ tests/expects/RS2724x_to_metric.gtl | 14 +++++------ tests/test_am_expression.py | 50 ++++++++++++++++++------------------- 6 files changed, 72 insertions(+), 72 deletions(-) (limited to 'tests') diff --git a/tests/expects/RS2724x_offset.gtl b/tests/expects/RS2724x_offset.gtl index f54e85b..9f15f4c 100644 --- a/tests/expects/RS2724x_offset.gtl +++ b/tests/expects/RS2724x_offset.gtl @@ -3,13 +3,13 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.200000,0.000000,0.100000,0.400000,0.100000,$1* -21,1,0.400000,0.200000,-0.200000,-0.100000,$1* -1,1,0.400000,-1.200000,0.000000,$1* -4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.400000,1.000000,-0.200000,1.200000,0.000000,$1* -5,1,6.000000,1.200000,0.200000,0.400000,$1* -6,-0.700000,0.000000,0.500000,0.050000,0.150000,2.000000,0.050000,0.600000,$1* -7,0.700000,0.000000,0.600000,0.500000,0.150000,$1*% +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*% diff --git a/tests/expects/RS2724x_rotate.gtl b/tests/expects/RS2724x_rotate.gtl index 9401fa7..0a2d1aa 100644 --- a/tests/expects/RS2724x_rotate.gtl +++ b/tests/expects/RS2724x_rotate.gtl @@ -3,33 +3,33 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.200000,0.000000,0.100000,0.400000,0.100000,($1)+(20.000000)* -21,1,0.400000,0.200000,-0.200000,-0.100000,($1)+(20.000000)* -1,1,0.400000,-1.200000,0.000000,($1)+(20.000000)* -4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.400000,1.000000,-0.200000,1.200000,0.000000,($1)+(20.000000)* -5,1,6.000000,1.200000,0.200000,0.400000,($1)+(20.000000)* -6,-0.700000,0.000000,0.500000,0.050000,0.150000,2.000000,0.050000,0.600000,($1)+(20.000000)* -7,0.700000,0.000000,0.600000,0.500000,0.150000,($1)+(20.000000)*% +20,1,0.2,0,0.1,0.4,0.1,($1)+(20)* +21,1,0.4,0.2,-0.2,-0.1,($1)+(20)* +1,1,0.4,-1.2,0,($1)+(20)* +4,1,4,1.2,0,1.4,-0.2,1.2,-0.4,1,-0.2,1.2,0,($1)+(20)* +5,1,6,1.2,0.2,0.4,($1)+(20)* +6,-0.7,0,0.5,0.05,0.15,2,0.05,0.6,($1)+(20)* +7,0.7,0,0.6,0.5,0.15,($1)+(20)*% %AMMACP* -5,1,$2,0.000000,0.000000,$1,($3)+(20.000000)* -1,0,$4,0.000000,0.000000,20.000000*% +5,1,$2,0,0,$1,($3)+(20)* +1,0,$4,0,0,20*% %AMMACPO* $4=($2)-($1)* $5=($2)-($4)* -21,1,$1,$5,0.000000,0.000000,20.000000* -1,1,$4,0.000000,($4)/(2.000000),20.000000* -1,1,$4,0.000000,($4)/(-2.000000),20.000000* -1,0,$3,0.000000,0.000000,20.000000*% +21,1,$1,$5,0,0,20* +1,1,$4,0,($4)/(2),20* +1,1,$4,0,($4)/(-2),20* +1,0,$3,0,0,20*% %AMMACLO* $4=($1)-($2)* $5=($1)-($4)* -21,1,$5,$2,0.000000,0.000000,20.000000* -1,1,$4,($4)/(2.000000),0.000000,20.000000* -1,1,$4,($4)/(-2.000000),0.000000,20.000000* -1,0,$3,0.000000,0.000000,20.000000*% +21,1,$5,$2,0,0,20* +1,1,$4,($4)/(2),0,20* +1,1,$4,($4)/(-2),0,20* +1,0,$3,0,0,20*% %AMMACR* -21,1,$1,$2,0.000000,0.000000,20.000000* -1,0,$3,0.000000,0.000000,20.000000*% +21,1,$1,$2,0,0,20* +1,0,$3,0,0,20*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12MACR,1X0.5X0.2*% diff --git a/tests/expects/RS2724x_save.gtl b/tests/expects/RS2724x_save.gtl index 45841e8..02dbaa8 100644 --- a/tests/expects/RS2724x_save.gtl +++ b/tests/expects/RS2724x_save.gtl @@ -3,13 +3,13 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.200000,0.000000,0.100000,0.400000,0.100000,$1* -21,1,0.400000,0.200000,-0.200000,-0.100000,$1* -1,1,0.400000,-1.200000,0.000000,$1* -4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.400000,1.000000,-0.200000,1.200000,0.000000,$1* -5,1,6.000000,1.200000,0.200000,0.400000,$1* -6,-0.700000,0.000000,0.500000,0.050000,0.150000,2.000000,0.050000,0.600000,$1* -7,0.700000,0.000000,0.600000,0.500000,0.150000,$1*% +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*% diff --git a/tests/expects/RS2724x_to_inch.gtl b/tests/expects/RS2724x_to_inch.gtl index 36bc604..3ec60d8 100644 --- a/tests/expects/RS2724x_to_inch.gtl +++ b/tests/expects/RS2724x_to_inch.gtl @@ -3,13 +3,13 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.007874,0.000000,0.003937,0.015748,0.003937,$1* -21,1,0.015748,0.007874,-0.007874,-0.003937,$1* -1,1,0.015748,-0.047244,0.000000,$1* -4,1,4,0.047244,0.000000,0.055118,-0.007874,0.047244,-0.015748,0.039370,-0.007874,0.047244,0.000000,$1* -5,1,6.000000,0.047244,0.007874,0.015748,$1* -6,-0.027559,0.000000,0.019685,0.001969,0.005906,2.000000,0.001969,0.023622,$1* -7,0.027559,0.000000,0.023622,0.019685,0.005906,$1*% +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*% diff --git a/tests/expects/RS2724x_to_metric.gtl b/tests/expects/RS2724x_to_metric.gtl index 72464f3..93adfc1 100644 --- a/tests/expects/RS2724x_to_metric.gtl +++ b/tests/expects/RS2724x_to_metric.gtl @@ -3,13 +3,13 @@ %INTop Layer*% %IPPOS*% %AMCOMP* -20,1,0.200000,0.000000,0.100000,0.399999,0.100000,$1* -21,1,0.399999,0.200000,-0.200000,-0.100000,$1* -1,1,0.399999,-1.200000,0.000000,$1* -4,1,4,1.200000,0.000000,1.400000,-0.200000,1.200000,-0.399999,1.000001,-0.200000,1.200000,0.000000,$1* -5,1,6.000000,1.200000,0.200000,0.399999,$1* -6,-0.700001,0.000000,0.499999,0.050000,0.150000,2.000000,0.050000,0.599999,$1* -7,0.700001,0.000000,0.599999,0.499999,0.150000,$1*% +20,1,0.2,0,0.1,0.399999,0.1,$1* +21,1,0.399999,0.2,-0.2,-0.1,$1* +1,1,0.399999,-1.2,0,$1* +4,1,4,1.2,0,1.4,-0.2,1.2,-0.399999,1,-0.2,1.2,0,$1* +5,1,6,1.2,0.2,0.399999,$1* +6,-0.700001,0,0.499999,0.0499999,0.15,2,0.0499999,0.599999,$1* +7,0.700001,0,0.599999,0.499999,0.15,$1*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12R,1X0.5001X0.2*% diff --git a/tests/test_am_expression.py b/tests/test_am_expression.py index 0f064e6..7490284 100644 --- a/tests/test_am_expression.py +++ b/tests/test_am_expression.py @@ -27,8 +27,8 @@ class TestAMConstantExpression(unittest.TestCase): self.assertEqual(ov.value, self.const_float_value) def test_to_gerber(self): - self.assertEqual(self.const_int.to_gerber(), '7.000000') - self.assertEqual(self.const_float.to_gerber(), '1.234500') + self.assertEqual(self.const_int.to_gerber(), '7') + self.assertEqual(self.const_float.to_gerber(), '1.2345') def test_to_instructions(self): self.const_int.to_instructions() @@ -120,15 +120,15 @@ class TestAMOperatorExpression(unittest.TestCase): def test_to_gerber(self): for op, expression in self.cc_exps: self.assertEqual(expression.to_gerber(), - '(%.6f)%s(%.6f)' % (self.c1, op, self.c2)) + '({0}){1}({2})'.format(self.c1, op, self.c2)) for op, expression in self.cv_exps: self.assertEqual(expression.to_gerber(), - '(%.6f)%s($%d)' % (self.c1, op, self.v2)) + '({0}){1}(${2})'.format(self.c1, op, self.v2)) for op, expression in self.vc_exps: self.assertEqual(expression.to_gerber(), - '($%d)%s(%.6f)' % (self.v1, op, self.c2)) + '(${0}){1}({2})'.format(self.v1, op, self.c2)) self.assertEqual(self.composition.to_gerber(), - '((%.6f)+(%.6f))+((%.6f)+(%.6f))' % ( + '(({0})+({1}))+(({2})+({3}))'.format( self.c1, self.c2, self.c1, self.c2 )) @@ -168,29 +168,29 @@ class TestAMExpression(unittest.TestCase): class TestEvalMacro(unittest.TestCase): def test_eval_macro(self): macros = [ - ('$1=5.5*', '$1=5.500000*'), - ('$1=0.0000001*', '$1=0.000000*'), - ('$2=$3*', '$2=$3*'), - ('$3=(1.23)+(4.56)*', '$3=(1.230000)+(4.560000)*'), - ('$3=(1.23)-(4.56)*', '$3=(1.230000)-(4.560000)*'), - ('$3=(1.23)X(4.56)*', '$3=(1.230000)X(4.560000)*'), - ('$3=(1.23)/(4.56)*', '$3=(1.230000)/(4.560000)*'), - ('$3=(10.2)X($2)*', '$3=(10.200000)X($2)*'), - ('1,1.2*', '1,1.200000*'), - ('1,$2*', '1,$2*'), - ('1,($2)+($3)*', '1,($2)+($3)*'), - #('1,(2.0)-($3)*', '1,(2.0)-($3)*'), # This doesn't pass due to pcb-tools bug - ('1,($2)X($3)*', '1,($2)X($3)*'), - ('1,($2)/($3)*', '1,($2)/($3)*'), - ('1,2.1,3.2*2,(3.1)/($1),$2*', '1,2.100000,3.200000*2,(3.100000)/($1),$2*'), + '$1=5.5*', + '$1=0.000001*' + '$2=$3*', + '$3=(1.23)+(4.56)*', + '$3=(1.23)-(4.56)*', + '$3=(1.23)X(4.56)*', + '$3=(1.23)/(4.56)*', + '$3=(10.2)X($2)*', + '1,1.2*', + '1,$2*', + '1,($2)+($3)*', + #'1,(2.0)-($3)*', # This doesn't pass due to pcb-tools bug + '1,($2)X($3)*', + '1,($2)/($3)*', + '1,2.1,3.2*2,(3.1)/($1),$2*' ] - for macro, expected in macros: - self._eval_macro_string(macro, expected) + for macro in macros: + self._eval_macro_string(macro) - def _eval_macro_string(self, macro, expected): + def _eval_macro_string(self, macro): expressions = eval_macro(read_macro(macro)) gerber = self._to_gerber(expressions) - self.assertEqual(gerber, expected) + self.assertEqual(macro, gerber) def _to_gerber(self, expressions_list): gerber = '' -- cgit From 36956f93fe1773229b6b7bb1b851adf169f97f79 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sun, 25 Aug 2019 12:39:01 +0900 Subject: improve routing mode compatibility with excellon specification --- tests/data/ref_drill_inch.txt | 10 ++++++---- tests/data/ref_drill_metric.txt | 24 +++++++++++++++--------- tests/expects/excellon_offset.txt | 8 +++++--- tests/expects/excellon_rotate.txt | 8 +++++--- tests/expects/excellon_save.txt | 8 +++++--- tests/expects/excellon_to_inch.txt | 10 ++++++---- tests/expects/excellon_to_metric.txt | 8 +++++--- 7 files changed, 47 insertions(+), 29 deletions(-) (limited to 'tests') diff --git a/tests/data/ref_drill_inch.txt b/tests/data/ref_drill_inch.txt index 6aea2e0..6af5494 100644 --- a/tests/data/ref_drill_inch.txt +++ b/tests/data/ref_drill_inch.txt @@ -1,7 +1,7 @@ M48 FMAT,2 ICI,OFF -INCH,TZ,00.0000 +INCH,TZ T01C0.0236 T02C0.0275 T03C0.0314 @@ -28,10 +28,12 @@ X1417Y2795 T04 G00X236Y669 M15 -G03X630Y276A394 +G02X630Y276I0J-394 +G03X1024Y-118A394 +G03X1417Y276A394 G01X2598Y276 -G01X2598Y1614 -G03X2205Y2008A394 +G01X2598Y1024 +G03X1614Y2008I-984J0 G01X236Y2008 G01X236Y669 M16 diff --git a/tests/data/ref_drill_metric.txt b/tests/data/ref_drill_metric.txt index 903fc48..3a50856 100644 --- a/tests/data/ref_drill_metric.txt +++ b/tests/data/ref_drill_metric.txt @@ -24,18 +24,24 @@ M15 G01X2140Y2925 M16 G05 - X3600Y7100 T04 -G00X600Y1700 +G00 +X600Y1700 M15 -G03X1600Y700A1000 -G01X6600Y700 -G01X6600Y4100 -G03X5600Y5100A1000 -G01X600Y5100 -G01X600Y1700 +I0J-1000 +G02X1600Y700 +G03 +A1000 +I-2000J0 +X2600Y-300 +X3600Y700 +G01X6600 +Y2600 +G03X4100Y5100I-2500J0 +G01 +X600 +Y1700 M16 G05 - M30 diff --git a/tests/expects/excellon_offset.txt b/tests/expects/excellon_offset.txt index 41dbf3e..9a0b430 100644 --- a/tests/expects/excellon_offset.txt +++ b/tests/expects/excellon_offset.txt @@ -28,10 +28,12 @@ X14600Y12100 T04 G00X11600Y6700 M15 -G03X12600Y5700A1000 +G02X12600Y5700I0J-1000 +G03X13600Y4700A1000 +G03X14600Y5700A1000 G01X17600Y5700 -G01X17600Y9100 -G03X16600Y10100A1000 +G01X17600Y7600 +G03X15100Y10100I-2500J0 G01X11600Y10100 G01X11600Y6700 M16 diff --git a/tests/expects/excellon_rotate.txt b/tests/expects/excellon_rotate.txt index 9983909..f33dcfd 100644 --- a/tests/expects/excellon_rotate.txt +++ b/tests/expects/excellon_rotate.txt @@ -28,10 +28,12 @@ X4978Y5086 T04 G00X4006Y-1014 M15 -G03X5287Y-1612A1000 +G02X5287Y-1612I342J-940 +G03X6569Y-2210A1000 +G03X7167Y-928A1000 G01X9986Y98 -G01X8823Y3293 -G03X7541Y3891A1000 +G01X9336Y1883 +G03X6132Y3378I-2349J-855 G01X2843Y2181 G01X4006Y-1014 M16 diff --git a/tests/expects/excellon_save.txt b/tests/expects/excellon_save.txt index 6a22a7d..18fdcc4 100644 --- a/tests/expects/excellon_save.txt +++ b/tests/expects/excellon_save.txt @@ -28,10 +28,12 @@ X3600Y7100 T04 G00X600Y1700 M15 -G03X1600Y700A1000 +G02X1600Y700I0J-1000 +G03X2600Y-300A1000 +G03X3600Y700A1000 G01X6600Y700 -G01X6600Y4100 -G03X5600Y5100A1000 +G01X6600Y2600 +G03X4100Y5100I-2500J0 G01X600Y5100 G01X600Y1700 M16 diff --git a/tests/expects/excellon_to_inch.txt b/tests/expects/excellon_to_inch.txt index 6aea2e0..6af5494 100644 --- a/tests/expects/excellon_to_inch.txt +++ b/tests/expects/excellon_to_inch.txt @@ -1,7 +1,7 @@ M48 FMAT,2 ICI,OFF -INCH,TZ,00.0000 +INCH,TZ T01C0.0236 T02C0.0275 T03C0.0314 @@ -28,10 +28,12 @@ X1417Y2795 T04 G00X236Y669 M15 -G03X630Y276A394 +G02X630Y276I0J-394 +G03X1024Y-118A394 +G03X1417Y276A394 G01X2598Y276 -G01X2598Y1614 -G03X2205Y2008A394 +G01X2598Y1024 +G03X1614Y2008I-984J0 G01X236Y2008 G01X236Y669 M16 diff --git a/tests/expects/excellon_to_metric.txt b/tests/expects/excellon_to_metric.txt index 1bb4287..20f698e 100644 --- a/tests/expects/excellon_to_metric.txt +++ b/tests/expects/excellon_to_metric.txt @@ -28,10 +28,12 @@ X3599Y7099 T04 G00X599Y1699 M15 -G03X1600Y701A1001 +G02X1600Y701I0J-1001 +G03X2601Y-300A1001 +G03X3599Y701A1001 G01X6599Y701 -G01X6599Y4100 -G03X5601Y5100A1001 +G01X6599Y2601 +G03X4100Y5100I-2499J0 G01X599Y5100 G01X599Y1699 M16 -- cgit From 13ab9db6e7571f3d0fcb406bfe6795eea9ce4e1c Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sun, 25 Aug 2019 20:16:53 +0900 Subject: support incremental coordinate for excellon --- tests/expects/dxf_save_mousebites.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/expects/dxf_save_mousebites.txt b/tests/expects/dxf_save_mousebites.txt index 4a371ef..e82825a 100644 --- a/tests/expects/dxf_save_mousebites.txt +++ b/tests/expects/dxf_save_mousebites.txt @@ -2,9 +2,10 @@ M48 FMAT,2 ICI,OFF METRIC,TZ,000.000 -M71 T01C0.500 % +G90 +M71 T01 X1000Y9000 X1000Y8000 -- cgit From 2b1c751ff76ebd6901633235ee694cc93dabce81 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Mon, 9 Sep 2019 09:07:38 +0900 Subject: improve compatibility with RS-274x specification: - can merge multiple files having different file scope modifier, such as AS, MI, OF, SF, and IR - support modal coordinate notation --- tests/expects/RS2724x_offset.gtl | 1 - tests/expects/RS2724x_rotate.gtl | 23 +++++++++++------------ tests/expects/RS2724x_save.gtl | 1 - tests/expects/RS2724x_to_inch.gtl | 1 - tests/expects/RS2724x_to_metric.gtl | 1 - tests/expects/dxf_offset.gtl | 5 ++--- tests/expects/dxf_rectangle_inch.gtl | 5 ++--- tests/expects/dxf_rectangle_metric.gtl | 5 ++--- tests/expects/dxf_rotate.gtl | 5 ++--- tests/expects/dxf_save_fill.gtl | 5 ++--- tests/expects/dxf_save_line.gtl | 5 ++--- tests/expects/dxf_save_mousebites.gtl | 5 ++--- tests/expects/dxf_to_inch.gtl | 5 ++--- 13 files changed, 27 insertions(+), 40 deletions(-) (limited to 'tests') diff --git a/tests/expects/RS2724x_offset.gtl b/tests/expects/RS2724x_offset.gtl index 9f15f4c..3dc3e6a 100644 --- a/tests/expects/RS2724x_offset.gtl +++ b/tests/expects/RS2724x_offset.gtl @@ -1,6 +1,5 @@ %MOMM*% %FSLAX34Y34*% -%INTop Layer*% %IPPOS*% %AMCOMP* 20,1,0.2,0,0.1,0.4,0.1,$1* diff --git a/tests/expects/RS2724x_rotate.gtl b/tests/expects/RS2724x_rotate.gtl index 0a2d1aa..f7c82cd 100644 --- a/tests/expects/RS2724x_rotate.gtl +++ b/tests/expects/RS2724x_rotate.gtl @@ -1,6 +1,5 @@ %MOMM*% %FSLAX34Y34*% -%INTop Layer*% %IPPOS*% %AMCOMP* 20,1,0.2,0,0.1,0.4,0.1,($1)+(20)* @@ -10,15 +9,8 @@ 5,1,6,1.2,0.2,0.4,($1)+(20)* 6,-0.7,0,0.5,0.05,0.15,2,0.05,0.6,($1)+(20)* 7,0.7,0,0.6,0.5,0.15,($1)+(20)*% -%AMMACP* -5,1,$2,0,0,$1,($3)+(20)* -1,0,$4,0,0,20*% -%AMMACPO* -$4=($2)-($1)* -$5=($2)-($4)* -21,1,$1,$5,0,0,20* -1,1,$4,0,($4)/(2),20* -1,1,$4,0,($4)/(-2),20* +%AMMACR* +21,1,$1,$2,0,0,20* 1,0,$3,0,0,20*% %AMMACLO* $4=($1)-($2)* @@ -27,9 +19,16 @@ $5=($1)-($4)* 1,1,$4,($4)/(2),0,20* 1,1,$4,($4)/(-2),0,20* 1,0,$3,0,0,20*% -%AMMACR* -21,1,$1,$2,0,0,20* +%AMMACPO* +$4=($2)-($1)* +$5=($2)-($4)* +21,1,$1,$5,0,0,20* +1,1,$4,0,($4)/(2),20* +1,1,$4,0,($4)/(-2),20* 1,0,$3,0,0,20*% +%AMMACP* +5,1,$2,0,0,$1,($3)+(20)* +1,0,$4,0,0,20*% %ADD10C,0.01*% %ADD11C,1X0.4*% %ADD12MACR,1X0.5X0.2*% diff --git a/tests/expects/RS2724x_save.gtl b/tests/expects/RS2724x_save.gtl index 02dbaa8..5053d99 100644 --- a/tests/expects/RS2724x_save.gtl +++ b/tests/expects/RS2724x_save.gtl @@ -1,6 +1,5 @@ %MOMM*% %FSLAX34Y34*% -%INTop Layer*% %IPPOS*% %AMCOMP* 20,1,0.2,0,0.1,0.4,0.1,$1* diff --git a/tests/expects/RS2724x_to_inch.gtl b/tests/expects/RS2724x_to_inch.gtl index 3ec60d8..cb9234e 100644 --- a/tests/expects/RS2724x_to_inch.gtl +++ b/tests/expects/RS2724x_to_inch.gtl @@ -1,6 +1,5 @@ %MOIN*% %FSLAX25Y25*% -%INTop Layer*% %IPPOS*% %AMCOMP* 20,1,0.00787402,0,0.00393701,0.015748,0.00393701,$1* diff --git a/tests/expects/RS2724x_to_metric.gtl b/tests/expects/RS2724x_to_metric.gtl index 93adfc1..a8efda8 100644 --- a/tests/expects/RS2724x_to_metric.gtl +++ b/tests/expects/RS2724x_to_metric.gtl @@ -1,6 +1,5 @@ %MOMM*% %FSLAX34Y34*% -%INTop Layer*% %IPPOS*% %AMCOMP* 20,1,0.2,0,0.1,0.399999,0.1,$1* diff --git a/tests/expects/dxf_offset.gtl b/tests/expects/dxf_offset.gtl index 18d7a62..3d2646d 100644 --- a/tests/expects/dxf_offset.gtl +++ b/tests/expects/dxf_offset.gtl @@ -1,10 +1,9 @@ -G75* %MOMM*% -%OFA0B0*% %FSLAX34Y34*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G01* X200000Y50000D02* diff --git a/tests/expects/dxf_rectangle_inch.gtl b/tests/expects/dxf_rectangle_inch.gtl index ca99021..44bb5ed 100644 --- a/tests/expects/dxf_rectangle_inch.gtl +++ b/tests/expects/dxf_rectangle_inch.gtl @@ -1,10 +1,9 @@ -G75* %MOIN*% -%OFA0B0*% %FSLAX25Y25*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G01* X0Y0D02* diff --git a/tests/expects/dxf_rectangle_metric.gtl b/tests/expects/dxf_rectangle_metric.gtl index db4c439..fed828a 100644 --- a/tests/expects/dxf_rectangle_metric.gtl +++ b/tests/expects/dxf_rectangle_metric.gtl @@ -1,10 +1,9 @@ -G75* %MOMM*% -%OFA0B0*% %FSLAX34Y34*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G01* X0Y0D02* diff --git a/tests/expects/dxf_rotate.gtl b/tests/expects/dxf_rotate.gtl index 912ad60..71f9f83 100644 --- a/tests/expects/dxf_rotate.gtl +++ b/tests/expects/dxf_rotate.gtl @@ -1,10 +1,9 @@ -G75* %MOMM*% -%OFA0B0*% %FSLAX34Y34*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G01* X124805Y2611D02* diff --git a/tests/expects/dxf_save_fill.gtl b/tests/expects/dxf_save_fill.gtl index c293826..54624b8 100644 --- a/tests/expects/dxf_save_fill.gtl +++ b/tests/expects/dxf_save_fill.gtl @@ -1,10 +1,9 @@ -G75* %MOMM*% -%OFA0B0*% %FSLAX34Y34*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G36* G01* diff --git a/tests/expects/dxf_save_line.gtl b/tests/expects/dxf_save_line.gtl index e9a931b..6a15313 100644 --- a/tests/expects/dxf_save_line.gtl +++ b/tests/expects/dxf_save_line.gtl @@ -1,10 +1,9 @@ -G75* %MOMM*% -%OFA0B0*% %FSLAX34Y34*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G01* X90000Y0D02* diff --git a/tests/expects/dxf_save_mousebites.gtl b/tests/expects/dxf_save_mousebites.gtl index b893454..282234d 100644 --- a/tests/expects/dxf_save_mousebites.gtl +++ b/tests/expects/dxf_save_mousebites.gtl @@ -1,10 +1,9 @@ -G75* %MOMM*% -%OFA0B0*% %FSLAX34Y34*% %IPPOS*% -%LPD*% %ADD10C,0.5*% +G75* +%LPD*% D10* X10000Y90000D03* X10000Y80000D03* diff --git a/tests/expects/dxf_to_inch.gtl b/tests/expects/dxf_to_inch.gtl index ee630c9..74a4118 100644 --- a/tests/expects/dxf_to_inch.gtl +++ b/tests/expects/dxf_to_inch.gtl @@ -1,10 +1,9 @@ -G75* %MOIN*% -%OFA0B0*% %FSLAX25Y25*% %IPPOS*% -%LPD*% %ADD10C,0*% +G75* +%LPD*% D10* G01* X35433Y0D02* -- cgit From 4c4ba0762b30fdd4633a6d2868c508184d681b7d Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Mon, 9 Sep 2019 21:52:52 +0900 Subject: fix issue #2: single quadrant mode is supported --- tests/data/ref_gerber_single_quadrant.gtl | 40 +++++++++++++++++++++++++++++++ tests/expects/RS2724x_single_quadrant.gtl | 35 +++++++++++++++++++++++++++ tests/test_rs274x.py | 7 ++++++ 3 files changed, 82 insertions(+) create mode 100644 tests/data/ref_gerber_single_quadrant.gtl create mode 100644 tests/expects/RS2724x_single_quadrant.gtl (limited to 'tests') diff --git a/tests/data/ref_gerber_single_quadrant.gtl b/tests/data/ref_gerber_single_quadrant.gtl new file mode 100644 index 0000000..f31f1e7 --- /dev/null +++ b/tests/data/ref_gerber_single_quadrant.gtl @@ -0,0 +1,40 @@ +%MOMM*% +%FSLAX34Y34*% +%IPPOS*% +%ADD10C,0.1*% +G74* +%LPD*% + +D10* + +G36* +G01* +X0Y10000D02* +Y90000D01* +G02* +X10000Y100000I10000* +X20000Y90000J10000* +G01* +Y20000* +X40000* +G02* +X50000Y10000J10000* +X40000Y0I10000* +G01* +X10000* +G02* +X0Y10000J10000* +G37* + +G03* +X70000Y50000D02* +X60000Y60000I10000D01* +X50000Y50000J10000* +X60000Y40000I10000* +X70000Y50000J10000* + +G02* +X60000Y90000D02* +X60000Y90000I10000D01* + +M02* diff --git a/tests/expects/RS2724x_single_quadrant.gtl b/tests/expects/RS2724x_single_quadrant.gtl new file mode 100644 index 0000000..dbec705 --- /dev/null +++ b/tests/expects/RS2724x_single_quadrant.gtl @@ -0,0 +1,35 @@ +%MOMM*% +%FSLAX34Y34*% +%IPPOS*% +%ADD10C,0.1*% +G75* +%LPD*% +D10* +G36* +G01* +X0Y10000D02* +X0Y90000D01* +G02* +X10000Y100000I10000J0D01* +X20000Y90000I0J-10000D01* +G01* +X20000Y20000D01* +X40000Y20000D01* +G02* +X50000Y10000I0J-10000D01* +X40000Y0I-10000J0D01* +G01* +X10000Y0D01* +G02* +X0Y10000I0J10000D01* +G37* +G03* +X70000Y50000D02* +X60000Y60000I-10000J0D01* +X50000Y50000I0J-10000D01* +X60000Y40000I10000J0D01* +X70000Y50000I0J10000D01* +G02* +X60000Y90000D02* +X60000Y90000I0J0D01* +M02* diff --git a/tests/test_rs274x.py b/tests/test_rs274x.py index 3e44066..dbb5f62 100644 --- a/tests/test_rs274x.py +++ b/tests/test_rs274x.py @@ -17,6 +17,7 @@ class TestRs274x(unittest.TestCase): cls.OUTPREFIX = 'RS2724x_' cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_gerber_metric.gtl') cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_gerber_inch.gtl') + cls.SQ_FILE = os.path.join(cls.INDIR, 'ref_gerber_single_quadrant.gtl') try: os.mkdir(cls.OUTDIR) except FileExistsError: @@ -65,5 +66,11 @@ class TestRs274x(unittest.TestCase): gerber.write(outfile) self._checkResult(outfile) + def test_single_quadrant(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'single_quadrant.gtl') + gerber = gerberex.read(self.SQ_FILE) + gerber.write(outfile) + self._checkResult(outfile) + if __name__ == '__main__': unittest.main() -- cgit From fc3f1a23b87d9c4e51967abb0ed4107daa2be5cf Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sat, 28 Sep 2019 17:40:09 +0900 Subject: improve DXF file handling functions: - DM_LINE mode support to generate Excellon routing sequence - DM_MOUSE_BITES mode support to generate mouse bites along all path also, not only line object --- tests/expects/dxf_offset.gtl | 10 +++++----- tests/expects/dxf_rectangle_inch.gtl | 11 +++++------ tests/expects/dxf_rectangle_metric.gtl | 11 +++++------ tests/expects/dxf_rotate.gtl | 10 +++++----- tests/expects/dxf_save_fill.gtl | 10 +++++----- tests/expects/dxf_save_line.gtl | 10 +++++----- tests/expects/dxf_to_inch.gtl | 10 +++++----- 7 files changed, 35 insertions(+), 37 deletions(-) (limited to 'tests') diff --git a/tests/expects/dxf_offset.gtl b/tests/expects/dxf_offset.gtl index 3d2646d..634664e 100644 --- a/tests/expects/dxf_offset.gtl +++ b/tests/expects/dxf_offset.gtl @@ -25,11 +25,6 @@ X210000Y60000D01* G02* X200000Y50000I-10000J0D01* G01* -X119171Y100000D02* -G75* -G03* -X119171Y100000I-3000J0D01* -G01* X119171Y125107D02* G75* G02* @@ -38,4 +33,9 @@ G01* X116171Y125107D01* G01* X119171Y125107D01* +G01* +X119171Y100000D02* +G75* +G02* +X119171Y100000I-3000J0D01* M02* diff --git a/tests/expects/dxf_rectangle_inch.gtl b/tests/expects/dxf_rectangle_inch.gtl index 44bb5ed..c196f92 100644 --- a/tests/expects/dxf_rectangle_inch.gtl +++ b/tests/expects/dxf_rectangle_inch.gtl @@ -6,15 +6,14 @@ G75* %LPD*% D10* G01* -X0Y0D02* +X0Y39370D02* +G75* +G01* +X0Y0D01* +G01* X39370Y0D01* G01* -X39370Y0D02* X39370Y39370D01* G01* -X39370Y39370D02* X0Y39370D01* -G01* -X0Y39370D02* -X0Y0D01* M02* diff --git a/tests/expects/dxf_rectangle_metric.gtl b/tests/expects/dxf_rectangle_metric.gtl index fed828a..092471f 100644 --- a/tests/expects/dxf_rectangle_metric.gtl +++ b/tests/expects/dxf_rectangle_metric.gtl @@ -6,15 +6,14 @@ G75* %LPD*% D10* G01* -X0Y0D02* +X0Y100000D02* +G75* +G01* +X0Y0D01* +G01* X100000Y0D01* G01* -X100000Y0D02* X100000Y100000D01* G01* -X100000Y100000D02* X0Y100000D01* -G01* -X0Y100000D02* -X0Y0D01* M02* diff --git a/tests/expects/dxf_rotate.gtl b/tests/expects/dxf_rotate.gtl index 71f9f83..71e1647 100644 --- a/tests/expects/dxf_rotate.gtl +++ b/tests/expects/dxf_rotate.gtl @@ -25,11 +25,6 @@ X130782Y15428D01* G02* X124805Y2611I-9397J-3420D01* G01* -X31930Y20924D02* -G75* -G03* -X31930Y20924I-3000J0D01* -G01* X23162Y45543D02* G75* G02* @@ -38,4 +33,9 @@ G01* X20343Y44517D01* G01* X23162Y45543D01* +G01* +X31749Y21950D02* +G75* +G02* +X31749Y21950I-2819J-1026D01* M02* diff --git a/tests/expects/dxf_save_fill.gtl b/tests/expects/dxf_save_fill.gtl index 54624b8..3cd2572 100644 --- a/tests/expects/dxf_save_fill.gtl +++ b/tests/expects/dxf_save_fill.gtl @@ -26,11 +26,6 @@ X100000Y10000D01* G02* X90000Y0I-10000J0D01* G01* -X9171Y50000D02* -G75* -G03* -X9171Y50000I-3000J0D01* -G01* X9171Y75107D02* G75* G02* @@ -39,5 +34,10 @@ G01* X6171Y75107D01* G01* X9171Y75107D01* +G01* +X9171Y50000D02* +G75* +G02* +X9171Y50000I-3000J0D01* G37* M02* diff --git a/tests/expects/dxf_save_line.gtl b/tests/expects/dxf_save_line.gtl index 6a15313..eb993f4 100644 --- a/tests/expects/dxf_save_line.gtl +++ b/tests/expects/dxf_save_line.gtl @@ -25,11 +25,6 @@ X100000Y10000D01* G02* X90000Y0I-10000J0D01* G01* -X9171Y50000D02* -G75* -G03* -X9171Y50000I-3000J0D01* -G01* X9171Y75107D02* G75* G02* @@ -38,4 +33,9 @@ G01* X6171Y75107D01* G01* X9171Y75107D01* +G01* +X9171Y50000D02* +G75* +G02* +X9171Y50000I-3000J0D01* M02* diff --git a/tests/expects/dxf_to_inch.gtl b/tests/expects/dxf_to_inch.gtl index 74a4118..16a94cf 100644 --- a/tests/expects/dxf_to_inch.gtl +++ b/tests/expects/dxf_to_inch.gtl @@ -25,11 +25,6 @@ X39370Y3937D01* G02* X35433Y0I-3937J0D01* G01* -X3610Y19685D02* -G75* -G03* -X3610Y19685I-1181J0D01* -G01* X3610Y29570D02* G75* G02* @@ -38,4 +33,9 @@ G01* X2429Y29570D01* G01* X3610Y29570D01* +G01* +X3610Y19685D02* +G75* +G02* +X3610Y19685I-1181J0D01* M02* -- cgit From 48b35377b1cce897a70d1d037b3e73b616af9be7 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sat, 28 Sep 2019 20:42:11 +0900 Subject: minor refactoring --- tests/expects/dxf_offset.gtl | 2 +- tests/expects/dxf_rotate.gtl | 2 +- tests/expects/dxf_save_fill.gtl | 2 +- tests/expects/dxf_save_line.gtl | 2 +- tests/expects/dxf_to_inch.gtl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/expects/dxf_offset.gtl b/tests/expects/dxf_offset.gtl index 634664e..ff0cdda 100644 --- a/tests/expects/dxf_offset.gtl +++ b/tests/expects/dxf_offset.gtl @@ -36,6 +36,6 @@ X119171Y125107D01* G01* X119171Y100000D02* G75* -G02* +G03* X119171Y100000I-3000J0D01* M02* diff --git a/tests/expects/dxf_rotate.gtl b/tests/expects/dxf_rotate.gtl index 71e1647..c6449ca 100644 --- a/tests/expects/dxf_rotate.gtl +++ b/tests/expects/dxf_rotate.gtl @@ -36,6 +36,6 @@ X23162Y45543D01* G01* X31749Y21950D02* G75* -G02* +G03* X31749Y21950I-2819J-1026D01* M02* diff --git a/tests/expects/dxf_save_fill.gtl b/tests/expects/dxf_save_fill.gtl index 3cd2572..f18c9f7 100644 --- a/tests/expects/dxf_save_fill.gtl +++ b/tests/expects/dxf_save_fill.gtl @@ -37,7 +37,7 @@ X9171Y75107D01* G01* X9171Y50000D02* G75* -G02* +G03* X9171Y50000I-3000J0D01* G37* M02* diff --git a/tests/expects/dxf_save_line.gtl b/tests/expects/dxf_save_line.gtl index eb993f4..d1966ad 100644 --- a/tests/expects/dxf_save_line.gtl +++ b/tests/expects/dxf_save_line.gtl @@ -36,6 +36,6 @@ X9171Y75107D01* G01* X9171Y50000D02* G75* -G02* +G03* X9171Y50000I-3000J0D01* M02* diff --git a/tests/expects/dxf_to_inch.gtl b/tests/expects/dxf_to_inch.gtl index 16a94cf..aa862bf 100644 --- a/tests/expects/dxf_to_inch.gtl +++ b/tests/expects/dxf_to_inch.gtl @@ -36,6 +36,6 @@ X3610Y29570D01* G01* X3610Y19685D02* G75* -G02* +G03* X3610Y19685I-1181J0D01* M02* -- cgit From 244fcaa5346f4fad819cc2b72857cfb2c472944a Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sat, 28 Dec 2019 23:45:33 +0900 Subject: add a function that generate filled gerberdata with representing internal shape by fliping polarity --- tests/data/ref_dxf_metric.dxf | 304 +++++++++++++++-- tests/data/ref_dxf_mousebites.dxf | 344 ------------------- tests/expects/dxf_offset.gtl | 82 ++++- tests/expects/dxf_rotate.gtl | 82 ++++- tests/expects/dxf_save_fill.gtl | 71 +++- tests/expects/dxf_save_fill_simple.gtl | 78 +++++ tests/expects/dxf_save_line.gtl | 84 ++++- tests/expects/dxf_save_line.txt | 84 +++++ tests/expects/dxf_save_mousebites.gtl | 592 +++++++++++++++++++++++++++++++-- tests/expects/dxf_save_mousebites.txt | 592 +++++++++++++++++++++++++++++++-- tests/expects/dxf_to_inch.gtl | 82 ++++- tests/test_dxf.py | 30 +- 12 files changed, 1934 insertions(+), 491 deletions(-) delete mode 100644 tests/data/ref_dxf_mousebites.dxf create mode 100644 tests/expects/dxf_save_fill_simple.gtl create mode 100644 tests/expects/dxf_save_line.txt (limited to 'tests') diff --git a/tests/data/ref_dxf_metric.dxf b/tests/data/ref_dxf_metric.dxf index 89af1e7..8861d4b 100644 --- a/tests/data/ref_dxf_metric.dxf +++ b/tests/data/ref_dxf_metric.dxf @@ -271,49 +271,105 @@ AcDbPolyline 43 0.0 10 -9 +40 20 0 10 -1 +9.9999999999999982 20 -0 +1.1102230246251565e-15 42 --0.41421356237309515 +-0.41421356237309565 10 -0 +1.1102230246251565e-15 +20 +10 +10 +1.1102230246251565e-15 20 -0.99999999999999978 +40 +42 +-0.41421356237309553 +10 10 -6.9388939039072284e-16 20 -9 +50 +10 +40 +20 +50 +42 +-0.41421356237309603 +10 +50 +20 +40 +10 +50 +20 +9.9999999999999982 42 -0.41421356237309548 +0 +LWPOLYLINE +5 +101 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +8 +70 +1 +43 +0.0 10 -0.99999999999999978 +74.270404858697972 20 +75.039392445007664 10 +74.270404858697972 +20 +45.039392445007664 +42 +-0.41421356237309553 10 -9 +64.270404858697972 20 +35.039392445007664 10 +34.270404858697965 +20 +35.039392445007664 42 --0.41421356237309509 +-0.41421356237309553 10 +24.270404858697965 +20 +45.039392445007664 10 +24.270404858697958 20 -9 +75.039392445007664 +42 +-0.41421356237309553 10 +34.270404858697965 +20 +85.039392445007678 10 +64.270404858697972 20 -1 +85.039392445007678 42 --0.41421356237309548 +-0.41421356237309603 0 CIRCLE 5 -101 +102 100 AcDbEntity 8 @@ -321,17 +377,121 @@ AcDbEntity 100 AcDbCircle 10 -0.61705708382705282 +80.154604804025013 20 +12.631646043929035 +30 +0 +40 +12.546259950593821 +210 +0 +220 +0 +230 +1 +0 +CIRCLE 5 +103 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +50 +20 +65 30 0 40 -0.29999999999999999 +10.277260744660863 +210 +0 +220 +0 +230 +1 +0 +ARC +5 +104 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +50 +20 +65 +30 +0 +40 +6.4592498736207826 +210 +0 +220 +-0 +230 +1 +100 +AcDbArc +50 +90 +51 +345.73898023603914 +0 +LINE +5 +105 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +50 +20 +65 +30 +0 +11 +56.26019871530297 +21 +63.408830312383643 +31 +0 +0 +LINE +5 +106 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +50 +20 +65 +30 +0 +11 +50 +21 +71.459249873620777 +31 +0 0 LWPOLYLINE 5 -102 +107 100 AcDbEntity 8 @@ -339,25 +499,115 @@ AcDbEntity 100 AcDbPolyline 90 -3 +4 70 1 43 0.0 10 -0.91705708382705309 +38.203772564818578 20 -7.5106817728417301 -42 --0.67748879940688445 +42.206179116779516 +10 +13.451174232106741 +20 +42.206179116779516 +10 +13.451174232106741 +20 +13.596032991956758 +10 +38.203772564818578 +20 +13.596032991956758 +0 +LINE +5 +108 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +80 +20 +85 +30 +0 +11 +80 +21 +35 +31 +0 +0 +LINE +5 +109 +100 +AcDbEntity +8 +0 +100 +AcDbLine 10 -0.39955725374872897 +90 20 -7.3040569342673214 +85 +30 +0 +11 +90 +21 +35 +31 +0 +0 +LINE +5 +110 +100 +AcDbEntity +8 +0 +100 +AcDbLine 10 -0.61705708382705282 20 -7.5106817728417301 +20 +32.938987371135568 +30 +0 +11 +32.582672402541192 +21 +32.938987371135568 +31 +0 +0 +LINE +5 +111 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +32.582672402541192 +20 +32.938987371135568 +30 +0 +11 +32.582672402541192 +21 +17.844276543429842 +31 +0 0 ENDSEC 0 diff --git a/tests/data/ref_dxf_mousebites.dxf b/tests/data/ref_dxf_mousebites.dxf deleted file mode 100644 index fcc56a5..0000000 --- a/tests/data/ref_dxf_mousebites.dxf +++ /dev/null @@ -1,344 +0,0 @@ -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/expects/dxf_offset.gtl b/tests/expects/dxf_offset.gtl index ff0cdda..df1b015 100644 --- a/tests/expects/dxf_offset.gtl +++ b/tests/expects/dxf_offset.gtl @@ -6,36 +6,88 @@ G75* %LPD*% D10* G01* -X200000Y50000D02* +X910000Y900000D02* G75* G01* -X120000Y50000D01* +X910000Y400000D01* +G01* +X1010000Y900000D02* +G75* +G01* +X1010000Y400000D01* +G01* +X310000Y379390D02* +G75* +G01* +X435827Y379390D01* +G01* +X435827Y228443D01* +G01* +X510000Y50000D02* +G75* +G01* +X210000Y50000D01* G02* -X110000Y60000I0J10000D01* +X110000Y150000I0J100000D01* G01* -X110000Y140000D01* +X110000Y450000D01* G02* -X120000Y150000I10000J0D01* +X210000Y550000I100000J0D01* G01* -X200000Y150000D01* +X510000Y550000D01* G02* -X210000Y140000I0J-10000D01* +X610000Y450000I0J-100000D01* G01* -X210000Y60000D01* +X610000Y150000D01* G02* -X200000Y50000I-10000J0D01* +X510000Y50000I-100000J0D01* G01* -X119171Y125107D02* +X852704Y800394D02* G75* +G01* +X852704Y500394D01* G02* -X113996Y123041I-3000J0D01* +X752704Y400394I-100000J0D01* G01* -X116171Y125107D01* +X452704Y400394D01* +G02* +X352704Y500394I0J100000D01* G01* -X119171Y125107D01* +X352704Y800394D01* +G02* +X452704Y900394I100000J0D01* +G01* +X752704Y900394D01* +G02* +X852704Y800394I0J-100000D01* G01* -X119171Y100000D02* +X492038Y472062D02* +G75* +G01* +X244512Y472062D01* +G01* +X244512Y185960D01* +G01* +X492038Y185960D01* +G01* +X492038Y472062D01* +G01* +X1037009Y176316D02* +G75* +G03* +X1037009Y176316I-125463J0D01* +G01* +X712773Y700000D02* G75* G03* -X119171Y100000I-3000J0D01* +X712773Y700000I-102773J0D01* +G01* +X610000Y700000D02* +G75* +G01* +X610000Y764592D01* +G03* +X672602Y684088I0J-64592D01* +G01* +X610000Y700000D01* M02* diff --git a/tests/expects/dxf_rotate.gtl b/tests/expects/dxf_rotate.gtl index c6449ca..5c04b64 100644 --- a/tests/expects/dxf_rotate.gtl +++ b/tests/expects/dxf_rotate.gtl @@ -6,36 +6,88 @@ G75* %LPD*% D10* G01* -X124805Y2611D02* +X501270Y1044184D02* G75* G01* -X49630Y-24751D01* +X672280Y574337D01* +G01* +X595239Y1078386D02* +G75* +G01* +X766249Y608539D01* +G01* +X115513Y349758D02* +G75* +G01* +X233752Y392793D01* +G01* +X285379Y250949D01* +G01* +X416110Y108637D02* +G75* +G01* +X134202Y6031D01* G02* -X36813Y-18774I-3420J9397D01* +X6031Y65798I-34202J93969D01* G01* -X9451Y56401D01* +X-96575Y347706D01* G02* -X15428Y69218I9397J3420D01* +X-36808Y475877I93969J34202D01* G01* -X90603Y96580D01* +X245100Y578483D01* G02* -X103420Y90603I3420J-9397D01* +X373271Y518716I34202J-93969D01* G01* -X130782Y15428D01* +X475877Y236808D01* G02* -X124805Y2611I-9397J-3420D01* +X416110Y108637I-93969J-34202D01* G01* -X23162Y45543D02* +X481496Y930988D02* G75* +G01* +X584102Y649080D01* G02* -X19006Y41831I-2819J-1026D01* +X524335Y520909I-93969J-34202D01* G01* -X20343Y44517D01* +X242427Y418303D01* +G02* +X114256Y478070I-34202J93969D01* G01* -X23162Y45543D01* +X11650Y759978D01* +G02* +X71417Y888149I93969J34202D01* +G01* +X353325Y990755D01* +G02* +X481496Y930988I34202J-93969D01* G01* -X31749Y21950D02* +X254877Y499102D02* +G75* +G01* +X22279Y414443D01* +G01* +X120131Y145595D01* +G01* +X352730Y230254D01* +G01* +X254877Y499102D01* +G01* +X868133Y407583D02* +G75* +G03* +X868133Y407583I-117896J-42911D01* +G01* +X384341Y788789D02* G75* G03* -X31749Y21950I-2819J-1026D01* +X384341Y788789I-96575J-35150D01* +G01* +X287766Y753639D02* +G75* +G01* +X265674Y814336D01* +G03* +X352035Y760098I22092J-60697D01* +G01* +X287766Y753639D01* M02* diff --git a/tests/expects/dxf_save_fill.gtl b/tests/expects/dxf_save_fill.gtl index f18c9f7..4b82fb2 100644 --- a/tests/expects/dxf_save_fill.gtl +++ b/tests/expects/dxf_save_fill.gtl @@ -7,37 +7,78 @@ G75* D10* G36* G01* -X90000Y0D02* +X400000Y0D02* G75* G01* -X10000Y0D01* +X100000Y0D01* G02* -X0Y10000I0J10000D01* +X0Y100000I0J100000D01* G01* -X0Y90000D01* +X0Y400000D01* G02* -X10000Y100000I10000J0D01* +X100000Y500000I100000J0D01* G01* -X90000Y100000D01* +X400000Y500000D01* G02* -X100000Y90000I0J-10000D01* +X500000Y400000I0J-100000D01* G01* -X100000Y10000D01* +X500000Y100000D01* G02* -X90000Y0I-10000J0D01* +X400000Y0I-100000J0D01* G01* -X9171Y75107D02* +X742704Y750394D02* G75* +G01* +X742704Y450394D01* +G02* +X642704Y350394I-100000J0D01* +G01* +X342704Y350394D01* +G02* +X242704Y450394I0J100000D01* +G01* +X242704Y750394D01* +G02* +X342704Y850394I100000J0D01* +G01* +X642704Y850394D01* G02* -X3996Y73041I-3000J0D01* +X742704Y750394I0J-100000D01* +G01* +X927009Y126316D02* +G75* +G03* +X927009Y126316I-125463J0D01* +G37* +%LPC*% +G36* G01* -X6171Y75107D01* +X382038Y422062D02* +G75* +G01* +X134512Y422062D01* +G01* +X134512Y135960D01* G01* -X9171Y75107D01* +X382038Y135960D01* +G01* +X382038Y422062D01* +G01* +X602773Y650000D02* +G75* +G03* +X602773Y650000I-102773J0D01* +G37* +%LPD*% +G36* G01* -X9171Y50000D02* +X500000Y650000D02* G75* +G01* +X500000Y714592D01* G03* -X9171Y50000I-3000J0D01* +X562602Y634088I0J-64592D01* +G01* +X500000Y650000D01* G37* M02* diff --git a/tests/expects/dxf_save_fill_simple.gtl b/tests/expects/dxf_save_fill_simple.gtl new file mode 100644 index 0000000..5ff4d55 --- /dev/null +++ b/tests/expects/dxf_save_fill_simple.gtl @@ -0,0 +1,78 @@ +%MOMM*% +%FSLAX34Y34*% +%IPPOS*% +%ADD10C,0*% +G75* +%LPD*% +D10* +G36* +G01* +X400000Y0D02* +G75* +G01* +X100000Y0D01* +G02* +X0Y100000I0J100000D01* +G01* +X0Y400000D01* +G02* +X100000Y500000I100000J0D01* +G01* +X400000Y500000D01* +G02* +X500000Y400000I0J-100000D01* +G01* +X500000Y100000D01* +G02* +X400000Y0I-100000J0D01* +G01* +X742704Y750394D02* +G75* +G01* +X742704Y450394D01* +G02* +X642704Y350394I-100000J0D01* +G01* +X342704Y350394D01* +G02* +X242704Y450394I0J100000D01* +G01* +X242704Y750394D01* +G02* +X342704Y850394I100000J0D01* +G01* +X642704Y850394D01* +G02* +X742704Y750394I0J-100000D01* +G01* +X382038Y422062D02* +G75* +G01* +X134512Y422062D01* +G01* +X134512Y135960D01* +G01* +X382038Y135960D01* +G01* +X382038Y422062D01* +G01* +X927009Y126316D02* +G75* +G03* +X927009Y126316I-125463J0D01* +G01* +X602773Y650000D02* +G75* +G03* +X602773Y650000I-102773J0D01* +G01* +X500000Y650000D02* +G75* +G01* +X500000Y714592D01* +G03* +X562602Y634088I0J-64592D01* +G01* +X500000Y650000D01* +G37* +M02* diff --git a/tests/expects/dxf_save_line.gtl b/tests/expects/dxf_save_line.gtl index d1966ad..b3ee8f1 100644 --- a/tests/expects/dxf_save_line.gtl +++ b/tests/expects/dxf_save_line.gtl @@ -1,41 +1,93 @@ %MOMM*% %FSLAX34Y34*% %IPPOS*% -%ADD10C,0*% +%ADD10C,0.2*% G75* %LPD*% D10* G01* -X90000Y0D02* +X800000Y850000D02* G75* G01* -X10000Y0D01* +X800000Y350000D01* +G01* +X900000Y850000D02* +G75* +G01* +X900000Y350000D01* +G01* +X200000Y329390D02* +G75* +G01* +X325827Y329390D01* +G01* +X325827Y178443D01* +G01* +X400000Y0D02* +G75* +G01* +X100000Y0D01* G02* -X0Y10000I0J10000D01* +X0Y100000I0J100000D01* G01* -X0Y90000D01* +X0Y400000D01* G02* -X10000Y100000I10000J0D01* +X100000Y500000I100000J0D01* G01* -X90000Y100000D01* +X400000Y500000D01* G02* -X100000Y90000I0J-10000D01* +X500000Y400000I0J-100000D01* G01* -X100000Y10000D01* +X500000Y100000D01* G02* -X90000Y0I-10000J0D01* +X400000Y0I-100000J0D01* G01* -X9171Y75107D02* +X742704Y750394D02* G75* +G01* +X742704Y450394D01* G02* -X3996Y73041I-3000J0D01* +X642704Y350394I-100000J0D01* G01* -X6171Y75107D01* +X342704Y350394D01* +G02* +X242704Y450394I0J100000D01* G01* -X9171Y75107D01* +X242704Y750394D01* +G02* +X342704Y850394I100000J0D01* +G01* +X642704Y850394D01* +G02* +X742704Y750394I0J-100000D01* G01* -X9171Y50000D02* +X382038Y422062D02* +G75* +G01* +X134512Y422062D01* +G01* +X134512Y135960D01* +G01* +X382038Y135960D01* +G01* +X382038Y422062D01* +G01* +X927009Y126316D02* +G75* +G03* +X927009Y126316I-125463J0D01* +G01* +X602773Y650000D02* G75* G03* -X9171Y50000I-3000J0D01* +X602773Y650000I-102773J0D01* +G01* +X500000Y650000D02* +G75* +G01* +X500000Y714592D01* +G03* +X562602Y634088I0J-64592D01* +G01* +X500000Y650000D01* M02* diff --git a/tests/expects/dxf_save_line.txt b/tests/expects/dxf_save_line.txt new file mode 100644 index 0000000..c3d73d4 --- /dev/null +++ b/tests/expects/dxf_save_line.txt @@ -0,0 +1,84 @@ +M48 +FMAT,2 +ICI,OFF +METRIC,TZ,000.000 +T01C0.200 +% +G90 +M71 +T01 +G00X80000Y85000 +M15 +G01X80000Y35000 +M16 +G05 + +G00X90000Y85000 +M15 +G01X90000Y35000 +M16 +G05 + +G00X20000Y32939 +M15 +G01X32583Y32939 +G01X32583Y17844 +M16 +G05 + +G00X40000Y0 +M15 +G01X10000Y0 +G02X0Y10000I0J10000 +G01X0Y40000 +G02X10000Y50000I10000J0 +G01X40000Y50000 +G02X50000Y40000I0J-10000 +G01X50000Y10000 +G02X40000Y0I-10000J0 +M16 +G05 + +G00X74270Y75039 +M15 +G01X74270Y45039 +G02X64270Y35039I-10000J0 +G01X34270Y35039 +G02X24270Y45039I0J10000 +G01X24270Y75039 +G02X34270Y85039I10000J0 +G01X64270Y85039 +G02X74270Y75039I0J-10000 +M16 +G05 + +G00X38204Y42206 +M15 +G01X13451Y42206 +G01X13451Y13596 +G01X38204Y13596 +G01X38204Y42206 +M16 +G05 + +G00X92701Y12632 +M15 +G03X92701Y12632I-12546J0 +M16 +G05 + +G00X60277Y65000 +M15 +G03X60277Y65000I-10277J0 +M16 +G05 + +G00X50000Y65000 +M15 +G01X50000Y71459 +G03X56260Y63409I0J-6459 +G01X50000Y65000 +M16 +G05 + +M30 diff --git a/tests/expects/dxf_save_mousebites.gtl b/tests/expects/dxf_save_mousebites.gtl index 282234d..64cc6d8 100644 --- a/tests/expects/dxf_save_mousebites.gtl +++ b/tests/expects/dxf_save_mousebites.gtl @@ -5,24 +5,578 @@ G75* %LPD*% D10* -X10000Y90000D03* -X10000Y80000D03* -X10000Y70000D03* -X10000Y60000D03* -X10000Y50000D03* -X10000Y40000D03* -X10000Y30000D03* -X10000Y20000D03* -X10000Y10000D03* - -X50000Y90000D03* -X50000Y80000D03* -X50000Y70000D03* -X50000Y60000D03* -X50000Y50000D03* -X50000Y40000D03* -X50000Y30000D03* -X50000Y20000D03* -X50000Y10000D03* +X800000Y850000D03* +X800000Y836000D03* +X800000Y822000D03* +X800000Y808000D03* +X800000Y794000D03* +X800000Y780000D03* +X800000Y766000D03* +X800000Y752000D03* +X800000Y738000D03* +X800000Y724000D03* +X800000Y710000D03* +X800000Y696000D03* +X800000Y682000D03* +X800000Y668000D03* +X800000Y654000D03* +X800000Y640000D03* +X800000Y626000D03* +X800000Y612000D03* +X800000Y598000D03* +X800000Y584000D03* +X800000Y570000D03* +X800000Y556000D03* +X800000Y542000D03* +X800000Y528000D03* +X800000Y514000D03* +X800000Y500000D03* +X800000Y486000D03* +X800000Y472000D03* +X800000Y458000D03* +X800000Y444000D03* +X800000Y430000D03* +X800000Y416000D03* +X800000Y402000D03* +X800000Y388000D03* +X800000Y374000D03* +X800000Y360000D03* + +X900000Y850000D03* +X900000Y836000D03* +X900000Y822000D03* +X900000Y808000D03* +X900000Y794000D03* +X900000Y780000D03* +X900000Y766000D03* +X900000Y752000D03* +X900000Y738000D03* +X900000Y724000D03* +X900000Y710000D03* +X900000Y696000D03* +X900000Y682000D03* +X900000Y668000D03* +X900000Y654000D03* +X900000Y640000D03* +X900000Y626000D03* +X900000Y612000D03* +X900000Y598000D03* +X900000Y584000D03* +X900000Y570000D03* +X900000Y556000D03* +X900000Y542000D03* +X900000Y528000D03* +X900000Y514000D03* +X900000Y500000D03* +X900000Y486000D03* +X900000Y472000D03* +X900000Y458000D03* +X900000Y444000D03* +X900000Y430000D03* +X900000Y416000D03* +X900000Y402000D03* +X900000Y388000D03* +X900000Y374000D03* +X900000Y360000D03* + +X200000Y329390D03* +X214000Y329390D03* +X228000Y329390D03* +X242000Y329390D03* +X256000Y329390D03* +X270000Y329390D03* +X284000Y329390D03* +X298000Y329390D03* +X312000Y329390D03* +X325827Y329217D03* +X325827Y315217D03* +X325827Y301217D03* +X325827Y287217D03* +X325827Y273217D03* +X325827Y259217D03* +X325827Y245217D03* +X325827Y231217D03* +X325827Y217217D03* +X325827Y203217D03* +X325827Y189217D03* + +X400000Y0D03* +X386000Y0D03* +X372000Y0D03* +X358000Y0D03* +X344000Y0D03* +X330000Y0D03* +X316000Y0D03* +X302000Y0D03* +X288000Y0D03* +X274000Y0D03* +X260000Y0D03* +X246000Y0D03* +X232000Y0D03* +X218000Y0D03* +X204000Y0D03* +X190000Y0D03* +X176000Y0D03* +X162000Y0D03* +X148000Y0D03* +X134000Y0D03* +X120000Y0D03* +X106000Y0D03* +X92009Y320D03* +X78177Y2410D03* +X64773Y6410D03* +X52057Y12242D03* +X40280Y19790D03* +X29672Y28909D03* +X20440Y39418D03* +X12764Y51113D03* +X6796Y63764D03* +X2652Y77125D03* +X412Y90933D03* +X0Y104920D03* +X0Y118920D03* +X0Y132920D03* +X0Y146920D03* +X0Y160920D03* +X0Y174920D03* +X0Y188920D03* +X0Y202920D03* +X0Y216920D03* +X0Y230920D03* +X0Y244920D03* +X0Y258920D03* +X0Y272920D03* +X0Y286920D03* +X0Y300920D03* +X0Y314920D03* +X0Y328920D03* +X0Y342920D03* +X0Y356920D03* +X0Y370920D03* +X0Y384920D03* +X0Y398920D03* +X834Y412884D03* +X3602Y426596D03* +X8256Y439788D03* +X14706Y452201D03* +X22825Y463592D03* +X32454Y473739D03* +X43404Y482444D03* +X55463Y489534D03* +X68392Y494873D03* +X81940Y498356D03* +X95842Y499914D03* +X109841Y500000D03* +X123841Y500000D03* +X137841Y500000D03* +X151841Y500000D03* +X165841Y500000D03* +X179841Y500000D03* +X193841Y500000D03* +X207841Y500000D03* +X221841Y500000D03* +X235841Y500000D03* +X249841Y500000D03* +X263841Y500000D03* +X277841Y500000D03* +X291841Y500000D03* +X305841Y500000D03* +X319841Y500000D03* +X333841Y500000D03* +X347841Y500000D03* +X361841Y500000D03* +X375841Y500000D03* +X389841Y500000D03* +X403840Y499926D03* +X417746Y498413D03* +X431305Y494974D03* +X444252Y489676D03* +X456333Y482623D03* +X467311Y473954D03* +X476972Y463838D03* +X485127Y452472D03* +X491617Y440080D03* +X496313Y426903D03* +X499125Y413200D03* +X500000Y399239D03* +X500000Y385239D03* +X500000Y371239D03* +X500000Y357239D03* +X500000Y343239D03* +X500000Y329239D03* +X500000Y315239D03* +X500000Y301239D03* +X500000Y287239D03* +X500000Y273239D03* +X500000Y259239D03* +X500000Y245239D03* +X500000Y231239D03* +X500000Y217239D03* +X500000Y203239D03* +X500000Y189239D03* +X500000Y175239D03* +X500000Y161239D03* +X500000Y147239D03* +X500000Y133239D03* +X500000Y119239D03* +X500000Y105239D03* +X499616Y91250D03* +X497421Y77435D03* +X493319Y64061D03* +X487391Y51391D03* +X479753Y39672D03* +X470554Y29133D03* +X459975Y19981D03* +X448222Y12395D03* +X435525Y6523D03* +X422134Y2480D03* +X408309Y346D03* + +X742704Y750394D03* +X742704Y736394D03* +X742704Y722394D03* +X742704Y708394D03* +X742704Y694394D03* +X742704Y680394D03* +X742704Y666394D03* +X742704Y652394D03* +X742704Y638394D03* +X742704Y624394D03* +X742704Y610394D03* +X742704Y596394D03* +X742704Y582394D03* +X742704Y568394D03* +X742704Y554394D03* +X742704Y540394D03* +X742704Y526394D03* +X742704Y512394D03* +X742704Y498394D03* +X742704Y484394D03* +X742704Y470394D03* +X742704Y456394D03* +X742384Y442402D03* +X740294Y428571D03* +X736294Y415167D03* +X730462Y402451D03* +X722914Y390674D03* +X713795Y380066D03* +X703286Y370834D03* +X691591Y363158D03* +X678940Y357190D03* +X665579Y353045D03* +X651771Y350806D03* +X637784Y350394D03* +X623784Y350394D03* +X609784Y350394D03* +X595784Y350394D03* +X581784Y350394D03* +X567784Y350394D03* +X553784Y350394D03* +X539784Y350394D03* +X525784Y350394D03* +X511784Y350394D03* +X497784Y350394D03* +X483784Y350394D03* +X469784Y350394D03* +X455784Y350394D03* +X441784Y350394D03* +X427784Y350394D03* +X413784Y350394D03* +X399784Y350394D03* +X385784Y350394D03* +X371784Y350394D03* +X357784Y350394D03* +X343784Y350394D03* +X329820Y351227D03* +X316108Y353996D03* +X302916Y358650D03* +X290503Y365100D03* +X279112Y373219D03* +X268965Y382848D03* +X260261Y393798D03* +X253170Y405856D03* +X247831Y418786D03* +X244348Y432334D03* +X242791Y446236D03* +X242704Y460235D03* +X242704Y474235D03* +X242704Y488235D03* +X242704Y502235D03* +X242704Y516235D03* +X242704Y530235D03* +X242704Y544235D03* +X242704Y558235D03* +X242704Y572235D03* +X242704Y586235D03* +X242704Y600235D03* +X242704Y614235D03* +X242704Y628235D03* +X242704Y642235D03* +X242704Y656235D03* +X242704Y670235D03* +X242704Y684235D03* +X242704Y698235D03* +X242704Y712235D03* +X242704Y726235D03* +X242704Y740235D03* +X242778Y754234D03* +X244291Y768140D03* +X247731Y781699D03* +X253028Y794646D03* +X260081Y806727D03* +X268750Y817705D03* +X278866Y827366D03* +X290232Y835521D03* +X302624Y842011D03* +X315801Y846707D03* +X329504Y849519D03* +X343465Y850394D03* +X357465Y850394D03* +X371465Y850394D03* +X385465Y850394D03* +X399465Y850394D03* +X413465Y850394D03* +X427465Y850394D03* +X441465Y850394D03* +X455465Y850394D03* +X469465Y850394D03* +X483465Y850394D03* +X497465Y850394D03* +X511465Y850394D03* +X525465Y850394D03* +X539465Y850394D03* +X553465Y850394D03* +X567465Y850394D03* +X581465Y850394D03* +X595465Y850394D03* +X609465Y850394D03* +X623465Y850394D03* +X637465Y850394D03* +X651454Y850010D03* +X665269Y847815D03* +X678643Y843713D03* +X691313Y837785D03* +X703032Y830147D03* +X713571Y820948D03* +X722723Y810369D03* +X730309Y798616D03* +X736181Y785919D03* +X740224Y772528D03* +X742358Y758703D03* + +X382038Y422062D03* +X368038Y422062D03* +X354038Y422062D03* +X340038Y422062D03* +X326038Y422062D03* +X312038Y422062D03* +X298038Y422062D03* +X284038Y422062D03* +X270038Y422062D03* +X256038Y422062D03* +X242038Y422062D03* +X228038Y422062D03* +X214038Y422062D03* +X200038Y422062D03* +X186038Y422062D03* +X172038Y422062D03* +X158038Y422062D03* +X144038Y422062D03* +X134512Y417588D03* +X134512Y403588D03* +X134512Y389588D03* +X134512Y375588D03* +X134512Y361588D03* +X134512Y347588D03* +X134512Y333588D03* +X134512Y319588D03* +X134512Y305588D03* +X134512Y291588D03* +X134512Y277588D03* +X134512Y263588D03* +X134512Y249588D03* +X134512Y235588D03* +X134512Y221588D03* +X134512Y207588D03* +X134512Y193588D03* +X134512Y179588D03* +X134512Y165588D03* +X134512Y151588D03* +X134512Y137588D03* +X146884Y135960D03* +X160884Y135960D03* +X174884Y135960D03* +X188884Y135960D03* +X202884Y135960D03* +X216884Y135960D03* +X230884Y135960D03* +X244884Y135960D03* +X258884Y135960D03* +X272884Y135960D03* +X286884Y135960D03* +X300884Y135960D03* +X314884Y135960D03* +X328884Y135960D03* +X342884Y135960D03* +X356884Y135960D03* +X370884Y135960D03* +X382038Y138807D03* +X382038Y152807D03* +X382038Y166807D03* +X382038Y180807D03* +X382038Y194807D03* +X382038Y208807D03* +X382038Y222807D03* +X382038Y236807D03* +X382038Y250807D03* +X382038Y264807D03* +X382038Y278807D03* +X382038Y292807D03* +X382038Y306807D03* +X382038Y320807D03* +X382038Y334807D03* +X382038Y348807D03* +X382038Y362807D03* +X382038Y376807D03* +X382038Y390807D03* +X382038Y404807D03* +X382038Y418807D03* + +X927009Y126316D03* +X926228Y140287D03* +X923897Y154085D03* +X920044Y167536D03* +X914717Y180475D03* +X907982Y192741D03* +X899924Y204180D03* +X890641Y214651D03* +X880251Y224022D03* +X868881Y232179D03* +X856674Y239019D03* +X843781Y244457D03* +X830363Y248425D03* +X816586Y250874D03* +X802622Y251774D03* +X788645Y251114D03* +X774828Y248901D03* +X761344Y245164D03* +X748360Y239948D03* +X736037Y233319D03* +X724529Y225358D03* +X713979Y216166D03* +X704519Y205856D03* +X696265Y194557D03* +X689321Y182409D03* +X683773Y169563D03* +X679689Y156179D03* +X677122Y142424D03* +X676102Y128469D03* +X676642Y114486D03* +X678737Y100651D03* +X682358Y87135D03* +X687463Y74107D03* +X693986Y61728D03* +X701847Y50152D03* +X710949Y39524D03* +X721177Y29975D03* +X732405Y21625D03* +X744493Y14576D03* +X757291Y8918D03* +X770639Y4720D03* +X784372Y2035D03* +X798318Y895D03* +X812304Y1316D03* +X826157Y3291D03* +X839703Y6797D03* +X852775Y11789D03* +X865210Y18206D03* +X876852Y25968D03* +X887558Y34978D03* +X897195Y45124D03* +X905641Y56280D03* +X912793Y68307D03* +X918560Y81056D03* +X922873Y94367D03* +X925676Y108077D03* +X926935Y122013D03* + +X602773Y650000D03* +X601821Y663957D03* +X598982Y677655D03* +X594309Y690841D03* +X587889Y703270D03* +X579841Y714712D03* +X570313Y724955D03* +X559483Y733809D03* +X547550Y741111D03* +X534737Y746724D03* +X521280Y750545D03* +X507428Y752504D03* +X493439Y752563D03* +X479572Y750722D03* +X466083Y747015D03* +X453222Y741510D03* +X441228Y734310D03* +X430323Y725547D03* +X420709Y715385D03* +X412565Y704012D03* +X406040Y691637D03* +X401256Y678491D03* +X398301Y664818D03* +X397231Y650870D03* +X398065Y636905D03* +X400788Y623184D03* +X405348Y609959D03* +X411663Y597476D03* +X419614Y585966D03* +X429055Y575643D03* +X439810Y566697D03* +X451680Y559295D03* +X464446Y553573D03* +X477870Y549638D03* +X491705Y547563D03* +X505693Y547385D03* +X519575Y549109D03* +X533095Y552702D03* +X546002Y558098D03* +X558056Y565196D03* +X569035Y573866D03* +X578734Y583946D03* +X586975Y595251D03* +X593605Y607569D03* +X598500Y620674D03* +X601570Y634322D03* +X602758Y648261D03* + +X500000Y650000D03* +X500000Y664000D03* +X500000Y678000D03* +X500000Y692000D03* +X500000Y706000D03* +X494599Y714366D03* +X480883Y711699D03* +X468062Y706144D03* +X456736Y697962D03* +X447434Y687536D03* +X440591Y675353D03* +X436529Y661984D03* +X435437Y648054D03* +X437366Y634216D03* +X442226Y621115D03* +X449789Y609367D03* +X459702Y599520D03* +X471501Y592035D03* +X484633Y587262D03* +X498484Y585425D03* +X512407Y586610D03* +X525748Y590761D03* +X537885Y597685D03* +X548249Y607056D03* +X556356Y618437D03* +X561825Y631294D03* +X551844Y636823D03* +X538276Y640271D03* +X524707Y643720D03* +X511139Y647169D03* M02* diff --git a/tests/expects/dxf_save_mousebites.txt b/tests/expects/dxf_save_mousebites.txt index e82825a..4a64514 100644 --- a/tests/expects/dxf_save_mousebites.txt +++ b/tests/expects/dxf_save_mousebites.txt @@ -7,24 +7,578 @@ T01C0.500 G90 M71 T01 -X1000Y9000 -X1000Y8000 -X1000Y7000 -X1000Y6000 -X1000Y5000 -X1000Y4000 -X1000Y3000 -X1000Y2000 -X1000Y1000 - -X5000Y9000 -X5000Y8000 -X5000Y7000 -X5000Y6000 -X5000Y5000 -X5000Y4000 -X5000Y3000 -X5000Y2000 -X5000Y1000 +X80000Y85000 +X80000Y83600 +X80000Y82200 +X80000Y80800 +X80000Y79400 +X80000Y78000 +X80000Y76600 +X80000Y75200 +X80000Y73800 +X80000Y72400 +X80000Y71000 +X80000Y69600 +X80000Y68200 +X80000Y66800 +X80000Y65400 +X80000Y64000 +X80000Y62600 +X80000Y61200 +X80000Y59800 +X80000Y58400 +X80000Y57000 +X80000Y55600 +X80000Y54200 +X80000Y52800 +X80000Y51400 +X80000Y50000 +X80000Y48600 +X80000Y47200 +X80000Y45800 +X80000Y44400 +X80000Y43000 +X80000Y41600 +X80000Y40200 +X80000Y38800 +X80000Y37400 +X80000Y36000 + +X90000Y85000 +X90000Y83600 +X90000Y82200 +X90000Y80800 +X90000Y79400 +X90000Y78000 +X90000Y76600 +X90000Y75200 +X90000Y73800 +X90000Y72400 +X90000Y71000 +X90000Y69600 +X90000Y68200 +X90000Y66800 +X90000Y65400 +X90000Y64000 +X90000Y62600 +X90000Y61200 +X90000Y59800 +X90000Y58400 +X90000Y57000 +X90000Y55600 +X90000Y54200 +X90000Y52800 +X90000Y51400 +X90000Y50000 +X90000Y48600 +X90000Y47200 +X90000Y45800 +X90000Y44400 +X90000Y43000 +X90000Y41600 +X90000Y40200 +X90000Y38800 +X90000Y37400 +X90000Y36000 + +X20000Y32939 +X21400Y32939 +X22800Y32939 +X24200Y32939 +X25600Y32939 +X27000Y32939 +X28400Y32939 +X29800Y32939 +X31200Y32939 +X32583Y32922 +X32583Y31522 +X32583Y30122 +X32583Y28722 +X32583Y27322 +X32583Y25922 +X32583Y24522 +X32583Y23122 +X32583Y21722 +X32583Y20322 +X32583Y18922 + +X40000Y0 +X38600Y0 +X37200Y0 +X35800Y0 +X34400Y0 +X33000Y0 +X31600Y0 +X30200Y0 +X28800Y0 +X27400Y0 +X26000Y0 +X24600Y0 +X23200Y0 +X21800Y0 +X20400Y0 +X19000Y0 +X17600Y0 +X16200Y0 +X14800Y0 +X13400Y0 +X12000Y0 +X10600Y0 +X9201Y32 +X7818Y241 +X6477Y641 +X5206Y1224 +X4028Y1979 +X2967Y2891 +X2044Y3942 +X1276Y5111 +X680Y6376 +X265Y7712 +X41Y9093 +X0Y10492 +X0Y11892 +X0Y13292 +X0Y14692 +X0Y16092 +X0Y17492 +X0Y18892 +X0Y20292 +X0Y21692 +X0Y23092 +X0Y24492 +X0Y25892 +X0Y27292 +X0Y28692 +X0Y30092 +X0Y31492 +X0Y32892 +X0Y34292 +X0Y35692 +X0Y37092 +X0Y38492 +X0Y39892 +X83Y41288 +X360Y42660 +X826Y43979 +X1471Y45220 +X2282Y46359 +X3245Y47374 +X4340Y48244 +X5546Y48953 +X6839Y49487 +X8194Y49836 +X9584Y49991 +X10984Y50000 +X12384Y50000 +X13784Y50000 +X15184Y50000 +X16584Y50000 +X17984Y50000 +X19384Y50000 +X20784Y50000 +X22184Y50000 +X23584Y50000 +X24984Y50000 +X26384Y50000 +X27784Y50000 +X29184Y50000 +X30584Y50000 +X31984Y50000 +X33384Y50000 +X34784Y50000 +X36184Y50000 +X37584Y50000 +X38984Y50000 +X40384Y49993 +X41775Y49841 +X43131Y49497 +X44425Y48968 +X45633Y48262 +X46731Y47395 +X47697Y46384 +X48513Y45247 +X49162Y44008 +X49631Y42690 +X49912Y41320 +X50000Y39924 +X50000Y38524 +X50000Y37124 +X50000Y35724 +X50000Y34324 +X50000Y32924 +X50000Y31524 +X50000Y30124 +X50000Y28724 +X50000Y27324 +X50000Y25924 +X50000Y24524 +X50000Y23124 +X50000Y21724 +X50000Y20324 +X50000Y18924 +X50000Y17524 +X50000Y16124 +X50000Y14724 +X50000Y13324 +X50000Y11924 +X50000Y10524 +X49962Y9125 +X49742Y7743 +X49332Y6406 +X48739Y5139 +X47975Y3967 +X47055Y2913 +X45997Y1998 +X44822Y1239 +X43553Y652 +X42213Y248 +X40831Y35 + +X74270Y75039 +X74270Y73639 +X74270Y72239 +X74270Y70839 +X74270Y69439 +X74270Y68039 +X74270Y66639 +X74270Y65239 +X74270Y63839 +X74270Y62439 +X74270Y61039 +X74270Y59639 +X74270Y58239 +X74270Y56839 +X74270Y55439 +X74270Y54039 +X74270Y52639 +X74270Y51239 +X74270Y49839 +X74270Y48439 +X74270Y47039 +X74270Y45639 +X74238Y44240 +X74029Y42857 +X73629Y41517 +X73046Y40245 +X72291Y39067 +X71380Y38007 +X70329Y37083 +X69159Y36316 +X67894Y35719 +X66558Y35305 +X65177Y35081 +X63778Y35039 +X62378Y35039 +X60978Y35039 +X59578Y35039 +X58178Y35039 +X56778Y35039 +X55378Y35039 +X53978Y35039 +X52578Y35039 +X51178Y35039 +X49778Y35039 +X48378Y35039 +X46978Y35039 +X45578Y35039 +X44178Y35039 +X42778Y35039 +X41378Y35039 +X39978Y35039 +X38578Y35039 +X37178Y35039 +X35778Y35039 +X34378Y35039 +X32982Y35123 +X31611Y35400 +X30292Y35865 +X29050Y36510 +X27911Y37322 +X26896Y38285 +X26026Y39380 +X25317Y40586 +X24783Y41879 +X24435Y43233 +X24279Y44624 +X24270Y46023 +X24270Y47423 +X24270Y48823 +X24270Y50223 +X24270Y51623 +X24270Y53023 +X24270Y54423 +X24270Y55823 +X24270Y57223 +X24270Y58623 +X24270Y60023 +X24270Y61423 +X24270Y62823 +X24270Y64223 +X24270Y65623 +X24270Y67023 +X24270Y68423 +X24270Y69823 +X24270Y71223 +X24270Y72623 +X24270Y74023 +X24278Y75423 +X24429Y76814 +X24773Y78170 +X25303Y79465 +X26008Y80673 +X26875Y81771 +X27887Y82737 +X29023Y83552 +X30262Y84201 +X31580Y84671 +X32950Y84952 +X34347Y85039 +X35747Y85039 +X37147Y85039 +X38547Y85039 +X39947Y85039 +X41347Y85039 +X42747Y85039 +X44147Y85039 +X45547Y85039 +X46947Y85039 +X48347Y85039 +X49747Y85039 +X51147Y85039 +X52547Y85039 +X53947Y85039 +X55347Y85039 +X56747Y85039 +X58147Y85039 +X59547Y85039 +X60947Y85039 +X62347Y85039 +X63747Y85039 +X65145Y85001 +X66527Y84781 +X67864Y84371 +X69131Y83778 +X70303Y83015 +X71357Y82095 +X72272Y81037 +X73031Y79862 +X73618Y78592 +X74022Y77253 +X74236Y75870 + +X38204Y42206 +X36804Y42206 +X35404Y42206 +X34004Y42206 +X32604Y42206 +X31204Y42206 +X29804Y42206 +X28404Y42206 +X27004Y42206 +X25604Y42206 +X24204Y42206 +X22804Y42206 +X21404Y42206 +X20004Y42206 +X18604Y42206 +X17204Y42206 +X15804Y42206 +X14404Y42206 +X13451Y41759 +X13451Y40359 +X13451Y38959 +X13451Y37559 +X13451Y36159 +X13451Y34759 +X13451Y33359 +X13451Y31959 +X13451Y30559 +X13451Y29159 +X13451Y27759 +X13451Y26359 +X13451Y24959 +X13451Y23559 +X13451Y22159 +X13451Y20759 +X13451Y19359 +X13451Y17959 +X13451Y16559 +X13451Y15159 +X13451Y13759 +X14688Y13596 +X16088Y13596 +X17488Y13596 +X18888Y13596 +X20288Y13596 +X21688Y13596 +X23088Y13596 +X24488Y13596 +X25888Y13596 +X27288Y13596 +X28688Y13596 +X30088Y13596 +X31488Y13596 +X32888Y13596 +X34288Y13596 +X35688Y13596 +X37088Y13596 +X38204Y13881 +X38204Y15281 +X38204Y16681 +X38204Y18081 +X38204Y19481 +X38204Y20881 +X38204Y22281 +X38204Y23681 +X38204Y25081 +X38204Y26481 +X38204Y27881 +X38204Y29281 +X38204Y30681 +X38204Y32081 +X38204Y33481 +X38204Y34881 +X38204Y36281 +X38204Y37681 +X38204Y39081 +X38204Y40481 +X38204Y41881 + +X92701Y12632 +X92623Y14029 +X92390Y15408 +X92004Y16754 +X91472Y18048 +X90798Y19274 +X89992Y20418 +X89064Y21465 +X88025Y22402 +X86888Y23218 +X85667Y23902 +X84378Y24446 +X83036Y24842 +X81659Y25087 +X80262Y25177 +X78865Y25111 +X77483Y24890 +X76134Y24516 +X74836Y23995 +X73604Y23332 +X72453Y22536 +X71398Y21617 +X70452Y20586 +X69626Y19456 +X68932Y18241 +X68377Y16956 +X67969Y15618 +X67712Y14242 +X67610Y12847 +X67664Y11449 +X67874Y10065 +X68236Y8714 +X68746Y7411 +X69399Y6173 +X70185Y5015 +X71095Y3952 +X72118Y2997 +X73241Y2162 +X74449Y1458 +X75729Y892 +X77064Y472 +X78437Y203 +X79832Y90 +X81230Y132 +X82616Y329 +X83970Y680 +X85278Y1179 +X86521Y1821 +X87685Y2597 +X88756Y3498 +X89719Y4512 +X90564Y5628 +X91279Y6831 +X91856Y8106 +X92287Y9437 +X92568Y10808 +X92693Y12201 + +X60277Y65000 +X60182Y66396 +X59898Y67765 +X59431Y69084 +X58789Y70327 +X57984Y71471 +X57031Y72495 +X55948Y73381 +X54755Y74111 +X53474Y74672 +X52128Y75055 +X50743Y75250 +X49344Y75256 +X47957Y75072 +X46608Y74701 +X45322Y74151 +X44123Y73431 +X43032Y72555 +X42071Y71539 +X41256Y70401 +X40604Y69164 +X40126Y67849 +X39830Y66482 +X39723Y65087 +X39807Y63691 +X40079Y62318 +X40535Y60996 +X41166Y59748 +X41961Y58597 +X42905Y57564 +X43981Y56670 +X45168Y55929 +X46445Y55357 +X47787Y54964 +X49170Y54756 +X50569Y54739 +X51958Y54911 +X53310Y55270 +X54600Y55810 +X55806Y56520 +X56903Y57387 +X57873Y58395 +X58698Y59525 +X59360Y60757 +X59850Y62067 +X60157Y63432 +X60276Y64826 + +X50000Y65000 +X50000Y66400 +X50000Y67800 +X50000Y69200 +X50000Y70600 +X49460Y71437 +X48088Y71170 +X46806Y70614 +X45674Y69796 +X44743Y68754 +X44059Y67535 +X43653Y66198 +X43544Y64805 +X43737Y63422 +X44223Y62112 +X44979Y60937 +X45970Y59952 +X47150Y59203 +X48463Y58726 +X49848Y58543 +X51241Y58661 +X52575Y59076 +X53789Y59768 +X54825Y60706 +X55636Y61844 +X56182Y63129 +X55184Y63682 +X53828Y64027 +X52471Y64372 +X51114Y64717 M30 diff --git a/tests/expects/dxf_to_inch.gtl b/tests/expects/dxf_to_inch.gtl index aa862bf..f838214 100644 --- a/tests/expects/dxf_to_inch.gtl +++ b/tests/expects/dxf_to_inch.gtl @@ -6,36 +6,88 @@ G75* %LPD*% D10* G01* -X35433Y0D02* +X314961Y334646D02* G75* G01* -X3937Y0D01* +X314961Y137795D01* +G01* +X354331Y334646D02* +G75* +G01* +X354331Y137795D01* +G01* +X78740Y129681D02* +G75* +G01* +X128278Y129681D01* +G01* +X128278Y70253D01* +G01* +X157480Y0D02* +G75* +G01* +X39370Y0D01* G02* -X0Y3937I0J3937D01* +X0Y39370I0J39370D01* G01* -X0Y35433D01* +X0Y157480D01* G02* -X3937Y39370I3937J0D01* +X39370Y196850I39370J0D01* G01* -X35433Y39370D01* +X157480Y196850D01* G02* -X39370Y35433I0J-3937D01* +X196850Y157480I0J-39370D01* G01* -X39370Y3937D01* +X196850Y39370D01* G02* -X35433Y0I-3937J0D01* +X157480Y0I-39370J0D01* G01* -X3610Y29570D02* +X292403Y295431D02* G75* +G01* +X292403Y177320D01* G02* -X1573Y28756I-1181J0D01* +X253033Y137950I-39370J0D01* G01* -X2429Y29570D01* +X134923Y137950D01* +G02* +X95553Y177320I0J39370D01* G01* -X3610Y29570D01* +X95553Y295431D01* +G02* +X134923Y334801I39370J0D01* +G01* +X253033Y334801D01* +G02* +X292403Y295431I0J-39370D01* G01* -X3610Y19685D02* +X150409Y166166D02* +G75* +G01* +X52957Y166166D01* +G01* +X52957Y53528D01* +G01* +X150409Y53528D01* +G01* +X150409Y166166D01* +G01* +X364964Y49731D02* +G75* +G03* +X364964Y49731I-49395J0D01* +G01* +X237312Y255906D02* G75* G03* -X3610Y19685I-1181J0D01* +X237312Y255906I-40462J0D01* +G01* +X196850Y255906D02* +G75* +G01* +X196850Y281336D01* +G03* +X221497Y249641I0J-25430D01* +G01* +X196850Y255906D01* M02* diff --git a/tests/test_dxf.py b/tests/test_dxf.py index 31589da..3d4d28e 100644 --- a/tests/test_dxf.py +++ b/tests/test_dxf.py @@ -19,7 +19,6 @@ class TestExcellon(unittest.TestCase): cls.OUTPREFIX = 'dxf_' cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_dxf_metric.dxf') cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_dxf_inch.dxf') - cls.MOUSEBITES_FILE = os.path.join(cls.INDIR, 'ref_dxf_mousebites.dxf') try: os.mkdir(cls.OUTDIR) except FileExistsError: @@ -36,6 +35,7 @@ class TestExcellon(unittest.TestCase): outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_line.gtl') dxf = gerberex.read(self.METRIC_FILE) dxf.draw_mode = dxf.DM_LINE + dxf.width = 0.2 dxf.write(outfile) self._checkResult(outfile) @@ -46,23 +46,41 @@ class TestExcellon(unittest.TestCase): dxf.write(outfile) self._checkResult(outfile) + def test_save_fill_simple(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_fill_simple.gtl') + dxf = gerberex.read(self.METRIC_FILE) + dxf.draw_mode = dxf.DM_FILL + dxf.fill_mode = dxf.FM_SIMPLE + dxf.write(outfile) + self._checkResult(outfile) + def test_save_mousebites(self): outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'save_mousebites.gtl') - dxf = gerberex.read(self.MOUSEBITES_FILE) + dxf = gerberex.read(self.METRIC_FILE) dxf.draw_mode = dxf.DM_MOUSE_BITES dxf.width = 0.5 - dxf.pitch = 1 + dxf.pitch = 1.4 dxf.write(outfile) self._checkResult(outfile) def test_save_excellon(self): + outfile = os.path.join( + self.OUTDIR, self.OUTPREFIX + 'save_line.txt') + dxf = gerberex.read(self.METRIC_FILE) + dxf.draw_mode = dxf.DM_LINE + dxf.format = (3,3) + dxf.width = 0.2 + dxf.write(outfile, filetype=dxf.FT_EXCELLON) + self._checkResult(outfile) + + def test_save_excellon_mousebites(self): outfile = os.path.join( self.OUTDIR, self.OUTPREFIX + 'save_mousebites.txt') - dxf = gerberex.read(self.MOUSEBITES_FILE) + dxf = gerberex.read(self.METRIC_FILE) dxf.draw_mode = dxf.DM_MOUSE_BITES - dxf.format = (3,3) + dxf.format = (3, 3) dxf.width = 0.5 - dxf.pitch = 1 + dxf.pitch = 1.4 dxf.write(outfile, filetype=dxf.FT_EXCELLON) self._checkResult(outfile) -- cgit From ca23fbd9534ab3cba3fd7b032816766c1150ebf9 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Mon, 30 Dec 2019 17:51:48 +0900 Subject: fix bugs that fail judgement of path's containment --- tests/data/ref_dxf_complex.dxf | 7500 +++++++++++++++++++++++++++++++ tests/expects/dxf_complex_fill.gtl | 729 +++ tests/expects/dxf_complex_fill_flip.gtl | 746 +++ tests/test_dxf.py | 22 + 4 files changed, 8997 insertions(+) create mode 100644 tests/data/ref_dxf_complex.dxf create mode 100644 tests/expects/dxf_complex_fill.gtl create mode 100644 tests/expects/dxf_complex_fill_flip.gtl (limited to 'tests') diff --git a/tests/data/ref_dxf_complex.dxf b/tests/data/ref_dxf_complex.dxf new file mode 100644 index 0000000..b9a89da --- /dev/null +++ b/tests/data/ref_dxf_complex.dxf @@ -0,0 +1,7500 @@ +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 +4 +70 +1 +43 +0.0 +10 +62.450000000000003 +20 +62.034999999999997 +10 +62.450000000000003 +20 +63.335000000000001 +42 +0.99999999999999989 +10 +61.25 +20 +63.335000000000001 +10 +61.25 +20 +62.034999999999997 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +101 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +82.450000000000017 +20 +62.034999999999997 +42 +-0.99999999999999989 +10 +81.25 +20 +62.034999999999997 +10 +81.250000000000014 +20 +63.335000000000001 +42 +-0.99999999999999989 +10 +82.449999999999989 +20 +63.335000000000001 +0 +LWPOLYLINE +5 +102 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +72.950000000000003 +20 +63.335000000000001 +42 +-0.99999999999999989 +10 +74.150000000000006 +20 +63.335000000000001 +10 +74.150000000000006 +20 +62.034999999999997 +42 +-0.99999999999999989 +10 +72.950000000000003 +20 +62.034999999999997 +0 +CIRCLE +5 +103 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +65.450000000000003 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +LWPOLYLINE +5 +104 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +14.150000000000002 +20 +62.034999999999997 +10 +14.150000000000002 +20 +63.335000000000001 +42 +0.99999999999999989 +10 +12.950000000000001 +20 +63.335000000000001 +10 +12.949999999999999 +20 +62.034999999999997 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +105 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +21.25 +20 +42.965000000000003 +10 +21.25 +20 +41.664999999999999 +42 +0.99999999999999989 +10 +22.450000000000003 +20 +41.664999999999999 +10 +22.450000000000003 +20 +42.965000000000003 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +106 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +34.149999999999999 +20 +41.664999999999999 +10 +34.149999999999999 +20 +42.965000000000003 +42 +0.99999999999999989 +10 +32.950000000000003 +20 +42.965000000000003 +10 +32.950000000000003 +20 +41.664999999999999 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +107 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +34.149999999999999 +20 +62.034999999999997 +10 +34.149999999999999 +20 +63.335000000000001 +42 +0.99999999999999989 +10 +32.950000000000003 +20 +63.335000000000001 +10 +32.950000000000003 +20 +62.034999999999997 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +108 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +62.450000000000003 +20 +41.664999999999999 +10 +62.450000000000003 +20 +42.965000000000003 +42 +0.99999999999999989 +10 +61.25 +20 +42.965000000000003 +10 +61.25 +20 +41.664999999999999 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +109 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +72.950000000000003 +20 +42.965000000000003 +10 +72.950000000000003 +20 +41.664999999999999 +42 +0.99999999999999989 +10 +74.150000000000006 +20 +41.664999999999999 +10 +74.150000000000006 +20 +42.965000000000003 +42 +0.99999999999999989 +0 +CIRCLE +5 +110 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +89.949999999999989 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +LWPOLYLINE +5 +111 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +54.149999999999991 +20 +62.034999999999997 +42 +-0.99999999999999989 +10 +52.950000000000003 +20 +62.034999999999997 +10 +52.949999999999989 +20 +63.335000000000001 +42 +-0.99999999999999989 +10 +54.149999999999999 +20 +63.335000000000001 +0 +CIRCLE +5 +112 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +49.949999999999989 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +113 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.549999999999997 +20 +62.034999999999997 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +-180 +51 +0 +0 +LWPOLYLINE +5 +114 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +92.950000000000003 +20 +63.335000000000001 +42 +-0.99999999999999989 +10 +94.150000000000006 +20 +63.335000000000001 +10 +94.150000000000006 +20 +62.034999999999997 +42 +-0.99999999999999989 +10 +92.950000000000003 +20 +62.034999999999997 +0 +CIRCLE +5 +115 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +85.450000000000003 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +LINE +5 +116 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +34.149999999999999 +20 +42.965000000000003 +30 +0 +11 +34.149999999999999 +21 +41.664999999999999 +31 +0 +0 +LINE +5 +117 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +74.150000000000006 +20 +42.965000000000003 +30 +0 +11 +74.150000000000006 +21 +41.664999999999999 +31 +0 +0 +LWPOLYLINE +5 +118 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +41.249999999999993 +20 +42.965000000000003 +10 +41.249999999999993 +20 +41.664999999999999 +42 +0.99999999999999989 +10 +42.449999999999989 +20 +41.664999999999999 +10 +42.449999999999989 +20 +42.965000000000003 +42 +0.99999999999999989 +0 +LINE +5 +119 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +41.249999999999993 +20 +41.664999999999999 +30 +0 +11 +41.249999999999993 +21 +42.965000000000003 +31 +0 +0 +LINE +5 +120 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +39.999999999999993 +20 +5 +30 +0 +11 +55.399999999999991 +21 +5 +31 +0 +0 +LWPOLYLINE +5 +121 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +22.450000000000003 +20 +62.034999999999997 +10 +22.450000000000003 +20 +63.335000000000001 +42 +0.99999999999999989 +10 +21.25 +20 +63.335000000000001 +10 +21.25 +20 +62.034999999999997 +42 +0.99999999999999989 +0 +ARC +5 +122 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.849999999999994 +20 +62.034999999999997 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +123 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.550000000000011 +20 +63.335000000000001 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +0 +51 +180 +0 +CIRCLE +5 +124 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +69.950000000000003 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +125 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.550000000000011 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +126 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +32.950000000000003 +20 +41.664999999999999 +30 +0 +11 +32.950000000000003 +21 +42.965000000000003 +31 +0 +0 +LINE +5 +127 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +22.450000000000003 +20 +42.965000000000003 +30 +0 +11 +22.450000000000003 +21 +41.664999999999999 +31 +0 +0 +LINE +5 +128 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +21.25 +20 +41.664999999999999 +30 +0 +11 +21.25 +21 +42.965000000000003 +31 +0 +0 +CIRCLE +5 +129 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +69.950000000000003 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +CIRCLE +5 +130 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +65.450000000000003 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +131 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.849999999999994 +20 +42.965000000000003 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +132 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.550000000000011 +20 +42.965000000000003 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +133 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.550000000000011 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +134 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.849999999999994 +20 +41.664999999999999 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +-180 +51 +0 +0 +LWPOLYLINE +5 +135 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +54.149999999999991 +20 +41.664999999999999 +42 +-0.99999999999999989 +10 +52.950000000000003 +20 +41.664999999999999 +10 +52.950000000000003 +20 +42.965000000000003 +42 +-0.99999999999999989 +10 +54.149999999999991 +20 +42.965000000000003 +0 +CIRCLE +5 +136 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +49.949999999999989 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +137 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.549999999999997 +20 +42.965000000000003 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +138 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.549999999999997 +20 +41.664999999999999 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +139 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.549999999999997 +20 +63.335000000000001 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +140 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.550000000000011 +20 +63.335000000000001 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +0 +51 +180 +0 +LWPOLYLINE +5 +141 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +12.949999999999999 +20 +42.965000000000003 +42 +-0.99999999999999989 +10 +14.15 +20 +42.965000000000003 +10 +14.15 +20 +41.664999999999999 +42 +-0.99999999999999989 +10 +12.949999999999999 +20 +41.664999999999999 +0 +LWPOLYLINE +5 +142 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +2.4499999999999988 +20 +41.664999999999999 +42 +-0.99999999999999989 +10 +1.2499999999999978 +20 +41.664999999999999 +10 +1.2499999999999956 +20 +42.965000000000003 +42 +-0.99999999999999989 +10 +2.4500000000000011 +20 +42.965000000000003 +0 +LWPOLYLINE +5 +143 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +94.150000000000006 +20 +41.664999999999999 +42 +-0.99999999999999989 +10 +92.950000000000003 +20 +41.664999999999999 +10 +92.950000000000017 +20 +42.965000000000003 +42 +-0.99999999999999989 +10 +94.149999999999991 +20 +42.965000000000003 +0 +LWPOLYLINE +5 +144 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +42.449999999999989 +20 +62.034999999999997 +10 +42.449999999999989 +20 +63.335000000000001 +42 +0.99999999999999989 +10 +41.25 +20 +63.335000000000001 +10 +41.25 +20 +62.034999999999997 +42 +0.99999999999999989 +0 +LWPOLYLINE +5 +145 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +82.450000000000017 +20 +41.664999999999999 +42 +-0.99999999999999989 +10 +81.25 +20 +41.664999999999999 +10 +81.25 +20 +42.965000000000003 +42 +-0.99999999999999989 +10 +82.450000000000017 +20 +42.965000000000003 +0 +CIRCLE +5 +146 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +25.449999999999999 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +147 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.850000000000009 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +CIRCLE +5 +148 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +89.949999999999989 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +149 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.550000000000011 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +150 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +-6.6613381477509392e-15 +20 +5 +30 +0 +11 +15.399999999999995 +21 +5 +31 +0 +0 +CIRCLE +5 +151 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +45.450000000000003 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +CIRCLE +5 +152 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +45.450000000000003 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +LINE +5 +153 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +42.449999999999989 +20 +42.965000000000003 +30 +0 +11 +42.449999999999989 +21 +41.664999999999999 +31 +0 +0 +LWPOLYLINE +5 +154 +100 +AcDbEntity +8 +0 +100 +AcDbPolyline +90 +4 +70 +1 +43 +0.0 +10 +1.25 +20 +63.335000000000001 +10 +1.25 +20 +62.034999999999997 +42 +0.99999999999999989 +10 +2.4500000000000002 +20 +62.034999999999997 +10 +2.4500000000000002 +20 +63.335000000000001 +42 +0.99999999999999989 +0 +LINE +5 +155 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +2.4500000000000002 +20 +63.335000000000001 +30 +0 +11 +2.4500000000000002 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +156 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +1.25 +20 +62.034999999999997 +30 +0 +11 +1.25 +21 +63.335000000000001 +31 +0 +0 +LINE +5 +157 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +12.949999999999999 +20 +62.034999999999997 +30 +0 +11 +12.950000000000001 +21 +63.335000000000001 +31 +0 +0 +CIRCLE +5 +158 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +5.4500000000000002 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +159 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.550000000000001 +20 +42.965000000000003 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +160 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +14.15 +20 +42.965000000000003 +30 +0 +11 +14.15 +21 +41.664999999999999 +31 +0 +0 +LINE +5 +161 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +34.149999999999999 +20 +63.335000000000001 +30 +0 +11 +34.149999999999999 +21 +62.034999999999997 +31 +0 +0 +ARC +5 +162 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.8500000000000003 +20 +63.335000000000001 +30 +0 +40 +0.59999999999999998 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +163 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +35.399999999999999 +20 +100 +30 +0 +11 +20 +21 +100 +31 +0 +0 +LINE +5 +164 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +15.4 +20 +100 +30 +0 +11 +0 +21 +100 +31 +0 +0 +LINE +5 +165 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +0 +20 +100 +30 +0 +11 +0 +21 +60 +31 +0 +0 +LINE +5 +166 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +0 +20 +45 +30 +0 +11 +-6.6613381477509392e-15 +21 +5 +31 +0 +0 +LINE +5 +167 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +19.999999999999993 +20 +5 +30 +0 +11 +35.399999999999999 +21 +5 +31 +0 +0 +LINE +5 +168 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +75.400000000000006 +20 +100 +30 +0 +11 +60 +21 +100 +31 +0 +0 +LINE +5 +169 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +95.399999999999991 +20 +100 +30 +0 +11 +80 +21 +100 +31 +0 +0 +LINE +5 +170 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +59.999999999999993 +20 +5 +30 +0 +11 +75.399999999999991 +21 +5 +31 +0 +0 +CIRCLE +5 +171 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +9.9499999999999993 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +LINE +5 +172 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +79.999999999999986 +20 +5 +30 +0 +11 +95.399999999999991 +21 +5 +31 +0 +0 +ARC +5 +173 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.550000000000002 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000275 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +174 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +95.399999999999991 +20 +5 +30 +0 +11 +95.399999999999991 +21 +45 +31 +0 +0 +LINE +5 +175 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +92.950000000000003 +20 +62.034999999999997 +30 +0 +11 +92.950000000000003 +21 +63.335000000000001 +31 +0 +0 +CIRCLE +5 +176 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +5.4499999999999993 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +177 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.8499999999999983 +20 +42.965000000000003 +30 +0 +40 +0.60000000000000275 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +178 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.550000000000001 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +179 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.8499999999999983 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +180 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +22.450000000000003 +20 +63.335000000000001 +30 +0 +11 +22.450000000000003 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +181 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +14.150000000000002 +20 +63.335000000000001 +30 +0 +11 +14.150000000000002 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +182 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +72.950000000000003 +20 +41.664999999999999 +30 +0 +11 +72.950000000000003 +21 +42.965000000000003 +31 +0 +0 +CIRCLE +5 +183 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +29.950000000000003 +20 +62.685000000000002 +30 +0 +40 +0.59999999999999998 +0 +LINE +5 +184 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +61.25 +20 +41.664999999999999 +30 +0 +11 +61.25 +21 +42.965000000000003 +31 +0 +0 +LINE +5 +185 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +62.450000000000003 +20 +42.965000000000003 +30 +0 +11 +62.450000000000003 +21 +41.664999999999999 +31 +0 +0 +ARC +5 +186 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.849999999999994 +20 +42.965000000000003 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +187 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.849999999999994 +20 +63.335000000000001 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +188 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +54.149999999999991 +20 +42.965000000000003 +30 +0 +11 +54.149999999999991 +21 +41.664999999999999 +31 +0 +0 +LINE +5 +189 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +52.950000000000003 +20 +41.664999999999999 +30 +0 +11 +52.950000000000003 +21 +42.965000000000003 +31 +0 +0 +ARC +5 +190 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.850000000000001 +20 +63.335000000000001 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +191 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +21.25 +20 +62.034999999999997 +30 +0 +11 +21.25 +21 +63.335000000000001 +31 +0 +0 +LINE +5 +192 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +32.950000000000003 +20 +62.034999999999997 +30 +0 +11 +32.950000000000003 +21 +63.335000000000001 +31 +0 +0 +ARC +5 +193 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.850000000000009 +20 +42.965000000000003 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +194 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.550000000000011 +20 +42.965000000000003 +30 +0 +40 +0.59999999999998721 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +195 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.550000000000004 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +196 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.550000000000004 +20 +63.335000000000001 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +197 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.850000000000001 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +-180 +51 +0 +0 +CIRCLE +5 +198 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +85.450000000000003 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +LINE +5 +199 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +92.950000000000003 +20 +41.664999999999999 +30 +0 +11 +92.950000000000003 +21 +42.965000000000003 +31 +0 +0 +LINE +5 +200 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +82.450000000000017 +20 +42.965000000000003 +30 +0 +11 +82.449999999999989 +21 +41.664999999999999 +31 +0 +0 +ARC +5 +201 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.849999999999994 +20 +62.034999999999997 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +202 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.849999999999994 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +203 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +55.399999999999991 +20 +100 +30 +0 +11 +39.999999999999993 +21 +100 +31 +0 +0 +LINE +5 +204 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +42.449999999999989 +20 +63.335000000000001 +30 +0 +11 +42.449999999999989 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +205 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +41.25 +20 +62.034999999999997 +30 +0 +11 +41.25 +21 +63.335000000000001 +31 +0 +0 +ARC +5 +206 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.850000000000009 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +207 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +81.25 +20 +62.034999999999997 +30 +0 +11 +81.25 +21 +63.335000000000001 +31 +0 +0 +LINE +5 +208 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +12.949999999999999 +20 +41.664999999999999 +30 +0 +11 +12.949999999999999 +21 +42.965000000000003 +31 +0 +0 +LINE +5 +209 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +1.2499999999999978 +20 +41.664999999999999 +30 +0 +11 +1.2499999999999978 +21 +42.965000000000003 +31 +0 +0 +LINE +5 +210 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +2.4500000000000011 +20 +42.965000000000003 +30 +0 +11 +2.4499999999999988 +21 +41.664999999999999 +31 +0 +0 +ARC +5 +211 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.8500000000000003 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000031 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +212 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.550000000000002 +20 +63.335000000000001 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +213 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +72.950000000000003 +20 +62.034999999999997 +30 +0 +11 +72.950000000000003 +21 +63.335000000000001 +31 +0 +0 +LINE +5 +214 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +62.450000000000003 +20 +63.335000000000001 +30 +0 +11 +62.450000000000003 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +215 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +74.150000000000006 +20 +63.335000000000001 +30 +0 +11 +74.150000000000006 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +216 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +61.25 +20 +62.034999999999997 +30 +0 +11 +61.25 +21 +63.335000000000001 +31 +0 +0 +LINE +5 +217 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +52.950000000000003 +20 +62.034999999999997 +30 +0 +11 +52.950000000000003 +21 +63.335000000000001 +31 +0 +0 +LINE +5 +218 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +54.149999999999999 +20 +63.335000000000001 +30 +0 +11 +54.149999999999999 +21 +62.034999999999997 +31 +0 +0 +ARC +5 +219 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.550000000000011 +20 +62.034999999999997 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +-180 +51 +0 +0 +LINE +5 +220 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +82.449999999999989 +20 +63.335000000000001 +30 +0 +11 +82.449999999999989 +21 +62.034999999999997 +31 +0 +0 +LINE +5 +221 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +94.149999999999991 +20 +42.965000000000003 +30 +0 +11 +94.149999999999991 +21 +41.664999999999999 +31 +0 +0 +LINE +5 +222 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +81.25 +20 +41.664999999999999 +30 +0 +11 +81.25 +21 +42.965000000000003 +31 +0 +0 +CIRCLE +5 +223 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +25.449999999999999 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +CIRCLE +5 +224 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +29.950000000000003 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +LINE +5 +225 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +94.150000000000006 +20 +63.335000000000001 +30 +0 +11 +94.150000000000006 +21 +62.034999999999997 +31 +0 +0 +ARC +5 +226 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.850000000000009 +20 +63.335000000000001 +30 +0 +40 +0.59999999999998721 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +227 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.849999999999994 +20 +63.335000000000001 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +228 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +95.399999999999991 +20 +60 +30 +0 +11 +95.399999999999991 +21 +100 +31 +0 +0 +CIRCLE +5 +229 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +9.9499999999999993 +20 +42.314999999999998 +30 +0 +40 +0.59999999999999998 +0 +ARC +5 +230 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.849999999999994 +20 +41.664999999999999 +30 +0 +40 +0.59999999999999609 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +231 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.549999999999997 +20 +41.664999999999999 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +-180 +51 +0 +0 +ARC +5 +232 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.549999999999997 +20 +42.965000000000003 +30 +0 +40 +0.60000000000000053 +100 +AcDbArc +50 +0 +51 +180 +0 +ARC +5 +233 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.849999999999994 +20 +42.965000000000003 +30 +0 +40 +0.60000000000000497 +100 +AcDbArc +50 +0 +51 +180 +0 +LINE +5 +234 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +95.399999999999991 +20 +56 +30 +0 +11 +95.399999999999991 +21 +49 +31 +0 +0 +LINE +5 +235 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +0 +20 +56 +30 +0 +11 +0 +21 +49 +31 +0 +0 +LINE +5 +236 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +3.7000000000000002 +20 +58 +30 +0 +11 +3.7000000000000002 +21 +58 +31 +0 +0 +LINE +5 +237 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +11.699999999999999 +20 +58 +30 +0 +11 +11.699999999999999 +21 +58 +31 +0 +0 +LINE +5 +238 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +23.700000000000003 +20 +58 +30 +0 +11 +23.700000000000003 +21 +58 +31 +0 +0 +LINE +5 +239 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +31.699999999999999 +20 +58 +30 +0 +11 +31.699999999999999 +21 +58 +31 +0 +0 +LINE +5 +240 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +43.700000000000003 +20 +58 +30 +0 +11 +43.700000000000003 +21 +58 +31 +0 +0 +LINE +5 +241 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +51.700000000000003 +20 +58 +30 +0 +11 +51.700000000000003 +21 +58 +31 +0 +0 +LINE +5 +242 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +63.700000000000003 +20 +58 +30 +0 +11 +63.700000000000003 +21 +58 +31 +0 +0 +LINE +5 +243 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +71.700000000000003 +20 +58 +30 +0 +11 +71.700000000000003 +21 +58 +31 +0 +0 +LINE +5 +244 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +83.699999999999989 +20 +58 +30 +0 +11 +83.699999999999989 +21 +58 +31 +0 +0 +LINE +5 +245 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +91.699999999999989 +20 +58 +30 +0 +11 +91.699999999999989 +21 +58 +31 +0 +0 +LINE +5 +246 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +3.7000000000000002 +20 +47 +30 +0 +11 +3.7000000000000002 +21 +47 +31 +0 +0 +LINE +5 +247 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +11.699999999999999 +20 +46.999999999999993 +30 +0 +11 +11.699999999999999 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +248 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +23.700000000000003 +20 +46.999999999999993 +30 +0 +11 +23.700000000000003 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +249 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +31.699999999999999 +20 +46.999999999999993 +30 +0 +11 +31.699999999999999 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +250 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +43.700000000000003 +20 +46.999999999999993 +30 +0 +11 +43.700000000000003 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +251 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +51.700000000000003 +20 +46.999999999999993 +30 +0 +11 +51.700000000000003 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +252 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +63.700000000000003 +20 +46.999999999999993 +30 +0 +11 +63.700000000000003 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +253 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +71.700000000000003 +20 +46.999999999999993 +30 +0 +11 +71.700000000000003 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +254 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +83.699999999999989 +20 +46.999999999999993 +30 +0 +11 +83.699999999999989 +21 +46.999999999999993 +31 +0 +0 +LINE +5 +255 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +91.699999999999989 +20 +47 +30 +0 +11 +91.699999999999989 +21 +47 +31 +0 +0 +LINE +5 +256 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +0 +20 +60 +30 +0 +11 +1.7000000000000002 +21 +60 +31 +0 +0 +LINE +5 +257 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +13.699999999999999 +20 +60 +30 +0 +11 +15.4 +21 +60 +31 +0 +0 +LINE +5 +258 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +20 +20 +60 +30 +0 +11 +21.699999999999999 +21 +60 +31 +0 +0 +LINE +5 +259 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +33.700000000000003 +20 +60 +30 +0 +11 +35.399999999999999 +21 +60 +31 +0 +0 +LINE +5 +260 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +39.999999999999993 +20 +60 +30 +0 +11 +41.700000000000003 +21 +60.000000000000007 +31 +0 +0 +LINE +5 +261 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +53.700000000000003 +20 +60 +30 +0 +11 +55.399999999999991 +21 +60 +31 +0 +0 +LINE +5 +262 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +60 +20 +60 +30 +0 +11 +61.700000000000003 +21 +60.000000000000007 +31 +0 +0 +LINE +5 +263 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +73.700000000000003 +20 +60 +30 +0 +11 +75.400000000000006 +21 +60 +31 +0 +0 +LINE +5 +264 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +80 +20 +60 +30 +0 +11 +81.700000000000003 +21 +59.999999999999993 +31 +0 +0 +LINE +5 +265 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +93.699999999999974 +20 +59.999999999999993 +30 +0 +11 +95.399999999999991 +21 +60 +31 +0 +0 +LINE +5 +266 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +95.399999999999991 +20 +56 +30 +0 +11 +93.699999999999974 +21 +56.000000000000007 +31 +0 +0 +LINE +5 +267 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +81.700000000000003 +20 +56.000000000000007 +30 +0 +11 +73.700000000000003 +21 +56 +31 +0 +0 +LINE +5 +268 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +61.700000000000003 +20 +55.999999999999986 +30 +0 +11 +53.700000000000003 +21 +56 +31 +0 +0 +LINE +5 +269 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +41.700000000000003 +20 +55.999999999999986 +30 +0 +11 +33.700000000000003 +21 +56 +31 +0 +0 +LINE +5 +270 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +21.699999999999999 +20 +56 +30 +0 +11 +13.699999999999999 +21 +56 +31 +0 +0 +LINE +5 +271 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +1.6999999999999997 +20 +56 +30 +0 +11 +0 +21 +56 +31 +0 +0 +LINE +5 +272 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +0 +20 +49 +30 +0 +11 +1.7000000000000055 +21 +49 +31 +0 +0 +LINE +5 +273 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +13.699999999999999 +20 +48.999999999999986 +30 +0 +11 +21.699999999999999 +21 +48.999999999999993 +31 +0 +0 +LINE +5 +274 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +33.700000000000003 +20 +48.999999999999993 +30 +0 +11 +41.700000000000003 +21 +48.999999999999993 +31 +0 +0 +LINE +5 +275 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +53.700000000000003 +20 +48.999999999999986 +30 +0 +11 +61.700000000000003 +21 +48.999999999999993 +31 +0 +0 +LINE +5 +276 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +73.700000000000003 +20 +48.999999999999986 +30 +0 +11 +81.700000000000017 +21 +48.999999999999993 +31 +0 +0 +LINE +5 +277 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +93.699999999999974 +20 +49.000000000000014 +30 +0 +11 +95.399999999999991 +21 +49 +31 +0 +0 +LINE +5 +278 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +95.399999999999991 +20 +45 +30 +0 +11 +93.699999999999974 +21 +45.000000000000007 +31 +0 +0 +LINE +5 +279 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +81.700000000000003 +20 +45.000000000000007 +30 +0 +11 +80 +21 +45 +31 +0 +0 +LINE +5 +280 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +75.400000000000006 +20 +45 +30 +0 +11 +73.700000000000017 +21 +45 +31 +0 +0 +LINE +5 +281 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +61.699999999999989 +20 +45 +30 +0 +11 +60 +21 +45 +31 +0 +0 +LINE +5 +282 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +55.399999999999991 +20 +45 +30 +0 +11 +53.70000000000001 +21 +45 +31 +0 +0 +LINE +5 +283 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +41.699999999999989 +20 +45 +30 +0 +11 +39.999999999999993 +21 +45 +31 +0 +0 +LINE +5 +284 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +35.399999999999999 +20 +45 +30 +0 +11 +33.700000000000003 +21 +45 +31 +0 +0 +LINE +5 +285 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +21.699999999999996 +20 +45 +30 +0 +11 +20 +21 +45 +31 +0 +0 +LINE +5 +286 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +15.4 +20 +45 +30 +0 +11 +13.700000000000003 +21 +45 +31 +0 +0 +LINE +5 +287 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +1.6999999999999948 +20 +45 +30 +0 +11 +0 +21 +45 +31 +0 +0 +LINE +5 +288 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +17.399999999999999 +20 +72 +30 +0 +11 +18 +21 +72 +31 +0 +0 +LINE +5 +289 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +18 +20 +87.999999999999986 +30 +0 +11 +17.399999999999999 +21 +87.999999999999986 +31 +0 +0 +LINE +5 +290 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +38 +20 +87.999999999999986 +30 +0 +11 +37.400000000000006 +21 +87.999999999999986 +31 +0 +0 +LINE +5 +291 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +37.400000000000006 +20 +72 +30 +0 +11 +38 +21 +72 +31 +0 +0 +LINE +5 +292 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +58 +20 +87.999999999999986 +30 +0 +11 +57.399999999999991 +21 +87.999999999999986 +31 +0 +0 +LINE +5 +293 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +57.399999999999991 +20 +72 +30 +0 +11 +58 +21 +72 +31 +0 +0 +LINE +5 +294 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +78 +20 +87.999999999999986 +30 +0 +11 +77.399999999999991 +21 +87.999999999999986 +31 +0 +0 +LINE +5 +295 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +77.399999999999991 +20 +72 +30 +0 +11 +78 +21 +72 +31 +0 +0 +LINE +5 +296 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +18 +20 +32.999999999999986 +30 +0 +11 +17.399999999999999 +21 +32.999999999999986 +31 +0 +0 +LINE +5 +297 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +38 +20 +32.999999999999986 +30 +0 +11 +37.400000000000006 +21 +32.999999999999986 +31 +0 +0 +LINE +5 +298 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +58 +20 +32.999999999999986 +30 +0 +11 +57.399999999999991 +21 +32.999999999999986 +31 +0 +0 +LINE +5 +299 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +78 +20 +32.999999999999986 +30 +0 +11 +77.399999999999991 +21 +32.999999999999986 +31 +0 +0 +LINE +5 +300 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +77.399999999999991 +20 +17 +30 +0 +11 +78 +21 +17 +31 +0 +0 +LINE +5 +301 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +57.399999999999991 +20 +17 +30 +0 +11 +58 +21 +17 +31 +0 +0 +LINE +5 +302 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +37.400000000000006 +20 +17 +30 +0 +11 +38 +21 +17 +31 +0 +0 +LINE +5 +303 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +17.399999999999999 +20 +17 +30 +0 +11 +18 +21 +17 +31 +0 +0 +LINE +5 +304 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +15.399999999999995 +20 +5 +30 +0 +11 +15.4 +21 +15.000000000000002 +31 +0 +0 +LINE +5 +305 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +15.4 +20 +34.999999999999993 +30 +0 +11 +15.4 +21 +45 +31 +0 +0 +LINE +5 +306 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +20 +20 +45 +30 +0 +11 +20 +21 +34.999999999999993 +31 +0 +0 +LINE +5 +307 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +19.999999999999996 +20 +15 +30 +0 +11 +19.999999999999993 +21 +5 +31 +0 +0 +LINE +5 +308 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +35.399999999999999 +20 +5 +30 +0 +11 +35.399999999999999 +21 +15.000000000000002 +31 +0 +0 +LINE +5 +309 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +35.399999999999999 +20 +34.999999999999993 +30 +0 +11 +35.399999999999999 +21 +45 +31 +0 +0 +LINE +5 +310 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +39.999999999999993 +20 +45 +30 +0 +11 +40 +21 +34.999999999999993 +31 +0 +0 +LINE +5 +311 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +40 +20 +15 +30 +0 +11 +39.999999999999993 +21 +5 +31 +0 +0 +LINE +5 +312 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +55.399999999999991 +20 +5 +30 +0 +11 +55.399999999999991 +21 +15.000000000000002 +31 +0 +0 +LINE +5 +313 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +55.399999999999991 +20 +34.999999999999993 +30 +0 +11 +55.399999999999991 +21 +45 +31 +0 +0 +LINE +5 +314 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +60 +20 +45 +30 +0 +11 +60 +21 +34.999999999999993 +31 +0 +0 +LINE +5 +315 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +60 +20 +15 +30 +0 +11 +59.999999999999993 +21 +5 +31 +0 +0 +LINE +5 +316 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +75.399999999999991 +20 +5 +30 +0 +11 +75.400000000000006 +21 +15.000000000000004 +31 +0 +0 +LINE +5 +317 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +75.399999999999991 +20 +34.999999999999993 +30 +0 +11 +75.400000000000006 +21 +45 +31 +0 +0 +LINE +5 +318 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +80 +20 +45 +30 +0 +11 +80 +21 +34.999999999999993 +31 +0 +0 +LINE +5 +319 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +80 +20 +15 +30 +0 +11 +79.999999999999986 +21 +5 +31 +0 +0 +LINE +5 +320 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +80 +20 +60 +30 +0 +11 +80 +21 +70 +31 +0 +0 +LINE +5 +321 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +79.999999999999986 +20 +89.999999999999986 +30 +0 +11 +80 +21 +100 +31 +0 +0 +LINE +5 +322 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +75.400000000000006 +20 +100 +30 +0 +11 +75.399999999999991 +21 +89.999999999999972 +31 +0 +0 +LINE +5 +323 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +75.399999999999991 +20 +70 +30 +0 +11 +75.400000000000006 +21 +60 +31 +0 +0 +LINE +5 +324 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +60 +20 +60 +30 +0 +11 +60.000000000000007 +21 +70 +31 +0 +0 +LINE +5 +325 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +59.999999999999993 +20 +89.999999999999986 +30 +0 +11 +60 +21 +100 +31 +0 +0 +LINE +5 +326 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +55.399999999999991 +20 +100 +30 +0 +11 +55.399999999999999 +21 +89.999999999999986 +31 +0 +0 +LINE +5 +327 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +55.399999999999984 +20 +70 +30 +0 +11 +55.399999999999991 +21 +60 +31 +0 +0 +LINE +5 +328 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +39.999999999999993 +20 +60 +30 +0 +11 +40 +21 +70 +31 +0 +0 +LINE +5 +329 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +39.999999999999993 +20 +89.999999999999986 +30 +0 +11 +39.999999999999993 +21 +100 +31 +0 +0 +LINE +5 +330 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +35.399999999999999 +20 +100 +30 +0 +11 +35.400000000000006 +21 +89.999999999999986 +31 +0 +0 +LINE +5 +331 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +35.399999999999999 +20 +70 +30 +0 +11 +35.399999999999999 +21 +60 +31 +0 +0 +LINE +5 +332 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +20 +20 +60 +30 +0 +11 +20.000000000000007 +21 +70 +31 +0 +0 +LINE +5 +333 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +20.000000000000004 +20 +89.999999999999986 +30 +0 +11 +20 +21 +100 +31 +0 +0 +LINE +5 +334 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +15.4 +20 +100 +30 +0 +11 +15.399999999999995 +21 +89.999999999999986 +31 +0 +0 +LINE +5 +335 +100 +AcDbEntity +8 +0 +100 +AcDbLine +10 +15.399999999999993 +20 +70 +30 +0 +11 +15.4 +21 +60 +31 +0 +0 +ARC +5 +336 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +17.399999999999988 +20 +89.999999999999986 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +180 +51 +270.00000000000034 +0 +ARC +5 +337 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +18.000000000000011 +20 +89.999999999999986 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +-90.000000000000313 +51 +0 +0 +ARC +5 +338 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +17.400000000000006 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000199 +51 +180 +0 +ARC +5 +339 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +17.999999999999996 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000129 +100 +AcDbArc +50 +0 +51 +89.999999999999901 +0 +ARC +5 +340 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +37.399999999999999 +20 +89.999999999999986 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +180 +51 +270.00000000000023 +0 +ARC +5 +341 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +38 +20 +89.999999999999986 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +-90 +51 +0 +0 +ARC +5 +342 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +37.400000000000013 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000199 +51 +180 +0 +ARC +5 +343 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +37.999999999999986 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +344 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.399999999999977 +20 +89.999999999999972 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +180 +51 +270.0000000000004 +0 +ARC +5 +345 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +58.000000000000014 +20 +89.999999999999972 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +-90.000000000000398 +51 +0 +0 +ARC +5 +346 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.400000000000006 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +347 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.999999999999986 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +348 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.399999999999977 +20 +89.999999999999986 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +180 +51 +270.0000000000004 +0 +ARC +5 +349 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +78.000000000000014 +20 +89.999999999999972 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +-90.000000000000398 +51 +0 +0 +ARC +5 +350 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.399999999999977 +20 +70.000000000000014 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +89.999999999999588 +51 +180 +0 +ARC +5 +351 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.999999999999986 +20 +69.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +352 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.69999999999999 +20 +57.999999999999986 +30 +0 +40 +2.0000000000000102 +100 +AcDbArc +50 +0 +51 +89.999999999999716 +0 +ARC +5 +353 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.700000000000008 +20 +57.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000256 +51 +180 +0 +ARC +5 +354 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.69999999999999 +20 +58.000000000000007 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +270.00000000000034 +51 +360 +0 +ARC +5 +355 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.700000000000008 +20 +58.000000000000007 +30 +0 +40 +2.0000000000000084 +100 +AcDbArc +50 +180 +51 +269.99999999999972 +0 +ARC +5 +356 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.699999999999985 +20 +57.999999999999986 +30 +0 +40 +2.0000000000000151 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +357 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.699999999999985 +20 +58.000000000000007 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +270.0000000000004 +51 +360 +0 +ARC +5 +358 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.700000000000017 +20 +57.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +359 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.700000000000017 +20 +58.000000000000007 +30 +0 +40 +2.0000000000000151 +100 +AcDbArc +50 +180 +51 +269.9999999999996 +0 +ARC +5 +360 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.699999999999982 +20 +57.999999999999986 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +0 +51 +89.999999999999389 +0 +ARC +5 +361 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.699999999999982 +20 +58.000000000000007 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +270.00000000000063 +51 +360 +0 +ARC +5 +362 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.700000000000017 +20 +57.999999999999979 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +363 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.700000000000017 +20 +58.000000000000014 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +180 +51 +269.9999999999996 +0 +ARC +5 +364 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.699999999999982 +20 +57.999999999999986 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +0 +51 +89.999999999999389 +0 +ARC +5 +365 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.699999999999982 +20 +58.000000000000007 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +270.00000000000063 +51 +360 +0 +ARC +5 +366 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.700000000000017 +20 +57.999999999999979 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +367 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.700000000000017 +20 +58.000000000000014 +30 +0 +40 +2.0000000000000195 +100 +AcDbArc +50 +180 +51 +269.9999999999996 +0 +ARC +5 +368 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.700000000000017 +20 +58.000000000000014 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +0 +51 +90.000000000000398 +0 +ARC +5 +369 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.700000000000017 +20 +57.999999999999979 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +-90.000000000000398 +51 +0 +0 +ARC +5 +370 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.6999999999999953 +20 +47 +30 +0 +40 +2.0000000000000044 +100 +AcDbArc +50 +0 +51 +89.999999999999716 +0 +ARC +5 +371 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +1.7000000000000037 +20 +46.999999999999993 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +-90.000000000000256 +51 +0 +0 +ARC +5 +372 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.700000000000003 +20 +46.999999999999986 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +90.000000000000099 +51 +180 +0 +ARC +5 +373 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +13.699999999999996 +20 +46.999999999999993 +30 +0 +40 +1.9999999999999973 +100 +AcDbArc +50 +180 +51 +270.00000000000023 +0 +ARC +5 +374 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.699999999999989 +20 +46.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999702 +0 +ARC +5 +375 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +21.700000000000003 +20 +46.999999999999993 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +-90.000000000000199 +51 +0 +0 +ARC +5 +376 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.70000000000001 +20 +46.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000199 +51 +180 +0 +ARC +5 +377 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +33.699999999999996 +20 +46.999999999999993 +30 +0 +40 +1.9999999999999973 +100 +AcDbArc +50 +180 +51 +270.00000000000023 +0 +ARC +5 +378 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.699999999999989 +20 +46.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +379 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +41.70000000000001 +20 +46.999999999999993 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +-90.000000000000611 +51 +0 +0 +ARC +5 +380 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.70000000000001 +20 +46.999999999999972 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000199 +51 +180 +0 +ARC +5 +381 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +53.700000000000003 +20 +47 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +180 +51 +270.00000000000023 +0 +ARC +5 +382 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.699999999999989 +20 +46.999999999999986 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +383 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +61.70000000000001 +20 +46.999999999999993 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +-90.000000000000611 +51 +0 +0 +ARC +5 +384 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.700000000000017 +20 +46.999999999999972 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +385 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.700000000000003 +20 +47 +30 +0 +40 +1.9999999999999929 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +386 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +73.700000000000003 +20 +47 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +180 +51 +270.0000000000004 +0 +ARC +5 +387 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +81.700000000000017 +20 +46.999999999999986 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +-90.000000000000398 +51 +0 +0 +ARC +5 +388 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.699999999999989 +20 +47 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +389 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.69999999999996 +20 +46.999999999999986 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +180 +51 +270.0000000000004 +0 +ARC +5 +390 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.69999999999996 +20 +57.999999999999979 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +180 +51 +270.0000000000004 +0 +ARC +5 +391 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +93.69999999999996 +20 +58.000000000000014 +30 +0 +40 +1.9999999999999751 +100 +AcDbArc +50 +89.999999999999588 +51 +180 +0 +ARC +5 +392 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +17.400000000000002 +20 +34.999999999999993 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +180 +51 +269.99999999999989 +0 +ARC +5 +393 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +18 +20 +34.999999999999993 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +-90 +51 +0 +0 +ARC +5 +394 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +17.399999999999999 +20 +15.000000000000002 +30 +0 +40 +1.9999999999999996 +100 +AcDbArc +50 +90 +51 +180 +0 +ARC +5 +395 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +18 +20 +15.000000000000004 +30 +0 +40 +1.9999999999999973 +100 +AcDbArc +50 +0 +51 +90 +0 +ARC +5 +396 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +37.400000000000006 +20 +34.999999999999993 +30 +0 +40 +2.0000000000000062 +100 +AcDbArc +50 +180 +51 +270 +0 +ARC +5 +397 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +37.999999999999993 +20 +34.999999999999993 +30 +0 +40 +2.0000000000000062 +100 +AcDbArc +50 +-89.999999999999801 +51 +0 +0 +ARC +5 +398 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +37.400000000000006 +20 +15 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +90 +51 +180 +0 +ARC +5 +399 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +38 +20 +15 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +0 +51 +90 +0 +ARC +5 +400 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.400000000000006 +20 +35.000000000000007 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +180 +51 +269.9999999999996 +0 +ARC +5 +401 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.999999999999986 +20 +35.000000000000007 +30 +0 +40 +2.0000000000000151 +100 +AcDbArc +50 +270.0000000000004 +51 +360 +0 +ARC +5 +402 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.400000000000006 +20 +14.999999999999993 +30 +0 +40 +2.0000000000000084 +100 +AcDbArc +50 +90.000000000000398 +51 +180 +0 +ARC +5 +403 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +57.999999999999986 +20 +14.999999999999991 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +0 +ARC +5 +404 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.399999999999991 +20 +34.999999999999986 +30 +0 +40 +2.0000000000000018 +100 +AcDbArc +50 +180 +51 +270 +0 +ARC +5 +405 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.999999999999986 +20 +35.000000000000007 +30 +0 +40 +2.0000000000000151 +100 +AcDbArc +50 +270.0000000000004 +51 +360 +0 +ARC +5 +406 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.399999999999991 +20 +15.000000000000011 +30 +0 +40 +1.9999999999999907 +100 +AcDbArc +50 +90 +51 +180 +0 +ARC +5 +407 +100 +AcDbEntity +8 +0 +100 +AcDbCircle +10 +77.999999999999986 +20 +14.999999999999991 +30 +0 +40 +2.0000000000000107 +100 +AcDbArc +50 +0 +51 +89.999999999999588 +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/expects/dxf_complex_fill.gtl b/tests/expects/dxf_complex_fill.gtl new file mode 100644 index 0000000..e667789 --- /dev/null +++ b/tests/expects/dxf_complex_fill.gtl @@ -0,0 +1,729 @@ +%MOMM*% +%FSLAX34Y34*% +%IPPOS*% +%ADD10C,0*% +G75* +%LPD*% +D10* +G36* +G01* +X800000Y150000D02* +G75* +G03* +X780000Y170000I-20000J0D01* +G01* +X774000Y170000D01* +G03* +X754000Y150000I0J-20000D01* +G01* +X754000Y50000D01* +G01* +X600000Y50000D01* +G01* +X600000Y150000D01* +G03* +X580000Y170000I-20000J0D01* +G01* +X574000Y170000D01* +G03* +X554000Y150000I0J-20000D01* +G01* +X554000Y50000D01* +G01* +X400000Y50000D01* +G01* +X400000Y150000D01* +G03* +X380000Y170000I-20000J0D01* +G01* +X374000Y170000D01* +G03* +X354000Y150000I0J-20000D01* +G01* +X354000Y50000D01* +G01* +X200000Y50000D01* +G01* +X200000Y150000D01* +G03* +X180000Y170000I-20000J0D01* +G01* +X174000Y170000D01* +G03* +X154000Y150000I0J-20000D01* +G01* +X154000Y50000D01* +G01* +X0Y50000D01* +G01* +X0Y450000D01* +G01* +X17000Y450000D01* +G03* +X37000Y470000I0J20000D01* +G03* +X17000Y490000I-20000J0D01* +G01* +X0Y490000D01* +G01* +X0Y560000D01* +G01* +X17000Y560000D01* +G03* +X37000Y580000I0J20000D01* +G03* +X17000Y600000I-20000J0D01* +G01* +X0Y600000D01* +G01* +X0Y1000000D01* +G01* +X154000Y1000000D01* +G01* +X154000Y900000D01* +G03* +X174000Y880000I20000J0D01* +G01* +X180000Y880000D01* +G03* +X200000Y900000I0J20000D01* +G01* +X200000Y1000000D01* +G01* +X354000Y1000000D01* +G01* +X354000Y900000D01* +G03* +X374000Y880000I20000J0D01* +G01* +X380000Y880000D01* +G03* +X400000Y900000I0J20000D01* +G01* +X400000Y1000000D01* +G01* +X554000Y1000000D01* +G01* +X554000Y900000D01* +G03* +X574000Y880000I20000J0D01* +G01* +X580000Y880000D01* +G03* +X600000Y900000I0J20000D01* +G01* +X600000Y1000000D01* +G01* +X754000Y1000000D01* +G01* +X754000Y900000D01* +G03* +X774000Y880000I20000J0D01* +G01* +X780000Y880000D01* +G03* +X800000Y900000I0J20000D01* +G01* +X800000Y1000000D01* +G01* +X954000Y1000000D01* +G01* +X954000Y600000D01* +G01* +X937000Y600000D01* +G03* +X917000Y580000I0J-20000D01* +G03* +X937000Y560000I20000J0D01* +G01* +X954000Y560000D01* +G01* +X954000Y490000D01* +G01* +X937000Y490000D01* +G03* +X917000Y470000I0J-20000D01* +G03* +X937000Y450000I20000J0D01* +G01* +X954000Y450000D01* +G01* +X954000Y50000D01* +G01* +X800000Y50000D01* +G01* +X800000Y150000D01* +G37* +%LPC*% +G36* +G01* +X624500Y620350D02* +G75* +G01* +X624500Y633350D01* +G03* +X612500Y633350I-6000J0D01* +G01* +X612500Y620350D01* +G03* +X624500Y620350I6000J0D01* +G01* +X824500Y620350D02* +G75* +G02* +X812500Y620350I-6000J0D01* +G01* +X812500Y633350D01* +G02* +X824500Y633350I6000J0D01* +G01* +X824500Y620350D01* +G01* +X729500Y633350D02* +G75* +G02* +X741500Y633350I6000J0D01* +G01* +X741500Y620350D01* +G02* +X729500Y620350I-6000J0D01* +G01* +X729500Y633350D01* +G01* +X141500Y620350D02* +G75* +G01* +X141500Y633350D01* +G03* +X129500Y633350I-6000J0D01* +G01* +X129500Y620350D01* +G03* +X141500Y620350I6000J0D01* +G01* +X212500Y429650D02* +G75* +G01* +X212500Y416650D01* +G03* +X224500Y416650I6000J0D01* +G01* +X224500Y429650D01* +G03* +X212500Y429650I-6000J0D01* +G01* +X341500Y416650D02* +G75* +G01* +X341500Y429650D01* +G03* +X329500Y429650I-6000J0D01* +G01* +X329500Y416650D01* +G03* +X341500Y416650I6000J0D01* +G01* +X341500Y620350D02* +G75* +G01* +X341500Y633350D01* +G03* +X329500Y633350I-6000J0D01* +G01* +X329500Y620350D01* +G03* +X341500Y620350I6000J0D01* +G01* +X624500Y416650D02* +G75* +G01* +X624500Y429650D01* +G03* +X612500Y429650I-6000J0D01* +G01* +X612500Y416650D01* +G03* +X624500Y416650I6000J0D01* +G01* +X729500Y429650D02* +G75* +G01* +X729500Y416650D01* +G03* +X741500Y416650I6000J0D01* +G01* +X741500Y429650D01* +G03* +X729500Y429650I-6000J0D01* +G01* +X541500Y620350D02* +G75* +G02* +X529500Y620350I-6000J0D01* +G01* +X529500Y633350D01* +G02* +X541500Y633350I6000J0D01* +G01* +X541500Y620350D01* +G01* +X929500Y633350D02* +G75* +G02* +X941500Y633350I6000J0D01* +G01* +X941500Y620350D01* +G02* +X929500Y620350I-6000J0D01* +G01* +X929500Y633350D01* +G01* +X412500Y429650D02* +G75* +G01* +X412500Y416650D01* +G03* +X424500Y416650I6000J0D01* +G01* +X424500Y429650D01* +G03* +X412500Y429650I-6000J0D01* +G01* +X224500Y620350D02* +G75* +G01* +X224500Y633350D01* +G03* +X212500Y633350I-6000J0D01* +G01* +X212500Y620350D01* +G03* +X224500Y620350I6000J0D01* +G01* +X541500Y416650D02* +G75* +G02* +X529500Y416650I-6000J0D01* +G01* +X529500Y429650D01* +G02* +X541500Y429650I6000J0D01* +G01* +X541500Y416650D01* +G01* +X129500Y429650D02* +G75* +G02* +X141500Y429650I6000J0D01* +G01* +X141500Y416650D01* +G02* +X129500Y416650I-6000J0D01* +G01* +X129500Y429650D01* +G01* +X24500Y416650D02* +G75* +G02* +X12500Y416650I-6000J0D01* +G01* +X12500Y429650D01* +G02* +X24500Y429650I6000J0D01* +G01* +X24500Y416650D01* +G01* +X941500Y416650D02* +G75* +G02* +X929500Y416650I-6000J0D01* +G01* +X929500Y429650D01* +G02* +X941500Y429650I6000J0D01* +G01* +X941500Y416650D01* +G01* +X424500Y620350D02* +G75* +G01* +X424500Y633350D01* +G03* +X412500Y633350I-6000J0D01* +G01* +X412500Y620350D01* +G03* +X424500Y620350I6000J0D01* +G01* +X824500Y416650D02* +G75* +G02* +X812500Y416650I-6000J0D01* +G01* +X812500Y429650D01* +G02* +X824500Y429650I6000J0D01* +G01* +X824500Y416650D01* +G01* +X12500Y633350D02* +G75* +G01* +X12500Y620350D01* +G03* +X24500Y620350I6000J0D01* +G01* +X24500Y633350D01* +G03* +X12500Y633350I-6000J0D01* +G01* +X660500Y626850D02* +G75* +G03* +X660500Y626850I-6000J0D01* +G01* +X905500Y626850D02* +G75* +G03* +X905500Y626850I-6000J0D01* +G01* +X505500Y626850D02* +G75* +G03* +X505500Y626850I-6000J0D01* +G01* +X860500Y626850D02* +G75* +G03* +X860500Y626850I-6000J0D01* +G01* +X705500Y626850D02* +G75* +G03* +X705500Y626850I-6000J0D01* +G01* +X705500Y423150D02* +G75* +G03* +X705500Y423150I-6000J0D01* +G01* +X660500Y423150D02* +G75* +G03* +X660500Y423150I-6000J0D01* +G01* +X505500Y423150D02* +G75* +G03* +X505500Y423150I-6000J0D01* +G01* +X260500Y626850D02* +G75* +G03* +X260500Y626850I-6000J0D01* +G01* +X905500Y423150D02* +G75* +G03* +X905500Y423150I-6000J0D01* +G01* +X460500Y423150D02* +G75* +G03* +X460500Y423150I-6000J0D01* +G01* +X460500Y626850D02* +G75* +G03* +X460500Y626850I-6000J0D01* +G01* +X60500Y626850D02* +G75* +G03* +X60500Y626850I-6000J0D01* +G01* +X105500Y626850D02* +G75* +G03* +X105500Y626850I-6000J0D01* +G01* +X60500Y423150D02* +G75* +G03* +X60500Y423150I-6000J0D01* +G01* +X305500Y626850D02* +G75* +G03* +X305500Y626850I-6000J0D01* +G01* +X860500Y423150D02* +G75* +G03* +X860500Y423150I-6000J0D01* +G01* +X541500Y633350D02* +G75* +G01* +X541500Y620350D01* +G02* +X529500Y620350I-6000J0D01* +G01* +X529500Y633350D01* +G02* +X541500Y633350I6000J0D01* +G01* +X941500Y429650D02* +G75* +G01* +X941500Y416650D01* +G02* +X929500Y416650I-6000J0D01* +G01* +X929500Y429650D01* +G02* +X941500Y429650I6000J0D01* +G01* +X260500Y423150D02* +G75* +G03* +X260500Y423150I-6000J0D01* +G01* +X305500Y423150D02* +G75* +G03* +X305500Y423150I-6000J0D01* +G01* +X824500Y633350D02* +G75* +G03* +X812500Y633350I-6000J0D01* +G01* +X812500Y620350D01* +G03* +X824500Y620350I6000J0D01* +G01* +X824500Y633350D01* +G01* +X105500Y423150D02* +G75* +G03* +X105500Y423150I-6000J0D01* +G01* +X217000Y560000D02* +G75* +G03* +X237000Y580000I0J20000D01* +G03* +X217000Y600000I-20000J0D01* +G01* +X200000Y600000D01* +G01* +X200000Y700000D01* +G03* +X180000Y720000I-20000J0D01* +G01* +X174000Y720000D01* +G03* +X154000Y700000I0J-20000D01* +G01* +X154000Y600000D01* +G01* +X137000Y600000D01* +G03* +X117000Y580000I0J-20000D01* +G03* +X137000Y560000I20000J0D01* +G01* +X217000Y560000D01* +G01* +X417000Y560000D02* +G75* +G03* +X437000Y580000I0J20000D01* +G03* +X417000Y600000I-20000J0D01* +G01* +X400000Y600000D01* +G01* +X400000Y700000D01* +G03* +X380000Y720000I-20000J0D01* +G01* +X374000Y720000D01* +G03* +X354000Y700000I0J-20000D01* +G01* +X354000Y600000D01* +G01* +X337000Y600000D01* +G03* +X317000Y580000I0J-20000D01* +G03* +X337000Y560000I20000J0D01* +G01* +X417000Y560000D01* +G01* +X617000Y560000D02* +G75* +G03* +X637000Y580000I0J20000D01* +G03* +X617000Y600000I-20000J0D01* +G01* +X600000Y600000D01* +G01* +X600000Y700000D01* +G03* +X580000Y720000I-20000J0D01* +G01* +X574000Y720000D01* +G03* +X554000Y700000I0J-20000D01* +G01* +X554000Y600000D01* +G01* +X537000Y600000D01* +G03* +X517000Y580000I0J-20000D01* +G03* +X537000Y560000I20000J0D01* +G01* +X617000Y560000D01* +G01* +X817000Y560000D02* +G75* +G03* +X837000Y580000I0J20000D01* +G03* +X817000Y600000I-20000J0D01* +G01* +X800000Y600000D01* +G01* +X800000Y700000D01* +G03* +X780000Y720000I-20000J0D01* +G01* +X774000Y720000D01* +G03* +X754000Y700000I0J-20000D01* +G01* +X754000Y600000D01* +G01* +X737000Y600000D01* +G03* +X717000Y580000I0J-20000D01* +G03* +X737000Y560000I20000J0D01* +G01* +X817000Y560000D01* +G01* +X180000Y330000D02* +G75* +G03* +X200000Y350000I0J20000D01* +G01* +X200000Y450000D01* +G01* +X217000Y450000D01* +G03* +X237000Y470000I0J20000D01* +G03* +X217000Y490000I-20000J0D01* +G01* +X137000Y490000D01* +G03* +X117000Y470000I0J-20000D01* +G03* +X137000Y450000I20000J0D01* +G01* +X154000Y450000D01* +G01* +X154000Y350000D01* +G03* +X174000Y330000I20000J0D01* +G01* +X180000Y330000D01* +G01* +X380000Y330000D02* +G75* +G03* +X400000Y350000I0J20000D01* +G01* +X400000Y450000D01* +G01* +X417000Y450000D01* +G03* +X437000Y470000I0J20000D01* +G03* +X417000Y490000I-20000J0D01* +G01* +X337000Y490000D01* +G03* +X317000Y470000I0J-20000D01* +G03* +X337000Y450000I20000J0D01* +G01* +X354000Y450000D01* +G01* +X354000Y350000D01* +G03* +X374000Y330000I20000J0D01* +G01* +X380000Y330000D01* +G01* +X580000Y330000D02* +G75* +G03* +X600000Y350000I0J20000D01* +G01* +X600000Y450000D01* +G01* +X617000Y450000D01* +G03* +X637000Y470000I0J20000D01* +G03* +X617000Y490000I-20000J0D01* +G01* +X537000Y490000D01* +G03* +X517000Y470000I0J-20000D01* +G03* +X537000Y450000I20000J0D01* +G01* +X554000Y450000D01* +G01* +X554000Y350000D01* +G03* +X574000Y330000I20000J0D01* +G01* +X580000Y330000D01* +G01* +X780000Y330000D02* +G75* +G03* +X800000Y350000I0J20000D01* +G01* +X800000Y450000D01* +G01* +X817000Y450000D01* +G03* +X837000Y470000I0J20000D01* +G03* +X817000Y490000I-20000J0D01* +G01* +X737000Y490000D01* +G03* +X717000Y470000I0J-20000D01* +G03* +X737000Y450000I20000J0D01* +G01* +X754000Y450000D01* +G01* +X754000Y350000D01* +G03* +X774000Y330000I20000J0D01* +G01* +X780000Y330000D01* +G37* +M02* diff --git a/tests/expects/dxf_complex_fill_flip.gtl b/tests/expects/dxf_complex_fill_flip.gtl new file mode 100644 index 0000000..1f91be3 --- /dev/null +++ b/tests/expects/dxf_complex_fill_flip.gtl @@ -0,0 +1,746 @@ +%MOMM*% +%FSLAX34Y34*% +%IPPOS*% +%ADD10C,0*% +%ADD11C,0*% +G75* +%LPD*% +D10* +G36* +G01* +X0Y1000000D02* +G75* +G01* +X0Y0D01* +G01* +X1000000Y0D01* +G01* +X1000000Y1000000D01* +G01* +X0Y1000000D01* +G37* +G75* +%LPC*% +D11* +G36* +G01* +X800000Y150000D02* +G75* +G03* +X780000Y170000I-20000J0D01* +G01* +X774000Y170000D01* +G03* +X754000Y150000I0J-20000D01* +G01* +X754000Y50000D01* +G01* +X600000Y50000D01* +G01* +X600000Y150000D01* +G03* +X580000Y170000I-20000J0D01* +G01* +X574000Y170000D01* +G03* +X554000Y150000I0J-20000D01* +G01* +X554000Y50000D01* +G01* +X400000Y50000D01* +G01* +X400000Y150000D01* +G03* +X380000Y170000I-20000J0D01* +G01* +X374000Y170000D01* +G03* +X354000Y150000I0J-20000D01* +G01* +X354000Y50000D01* +G01* +X200000Y50000D01* +G01* +X200000Y150000D01* +G03* +X180000Y170000I-20000J0D01* +G01* +X174000Y170000D01* +G03* +X154000Y150000I0J-20000D01* +G01* +X154000Y50000D01* +G01* +X0Y50000D01* +G01* +X0Y450000D01* +G01* +X17000Y450000D01* +G03* +X37000Y470000I0J20000D01* +G03* +X17000Y490000I-20000J0D01* +G01* +X0Y490000D01* +G01* +X0Y560000D01* +G01* +X17000Y560000D01* +G03* +X37000Y580000I0J20000D01* +G03* +X17000Y600000I-20000J0D01* +G01* +X0Y600000D01* +G01* +X0Y1000000D01* +G01* +X154000Y1000000D01* +G01* +X154000Y900000D01* +G03* +X174000Y880000I20000J0D01* +G01* +X180000Y880000D01* +G03* +X200000Y900000I0J20000D01* +G01* +X200000Y1000000D01* +G01* +X354000Y1000000D01* +G01* +X354000Y900000D01* +G03* +X374000Y880000I20000J0D01* +G01* +X380000Y880000D01* +G03* +X400000Y900000I0J20000D01* +G01* +X400000Y1000000D01* +G01* +X554000Y1000000D01* +G01* +X554000Y900000D01* +G03* +X574000Y880000I20000J0D01* +G01* +X580000Y880000D01* +G03* +X600000Y900000I0J20000D01* +G01* +X600000Y1000000D01* +G01* +X754000Y1000000D01* +G01* +X754000Y900000D01* +G03* +X774000Y880000I20000J0D01* +G01* +X780000Y880000D01* +G03* +X800000Y900000I0J20000D01* +G01* +X800000Y1000000D01* +G01* +X954000Y1000000D01* +G01* +X954000Y600000D01* +G01* +X937000Y600000D01* +G03* +X917000Y580000I0J-20000D01* +G03* +X937000Y560000I20000J0D01* +G01* +X954000Y560000D01* +G01* +X954000Y490000D01* +G01* +X937000Y490000D01* +G03* +X917000Y470000I0J-20000D01* +G03* +X937000Y450000I20000J0D01* +G01* +X954000Y450000D01* +G01* +X954000Y50000D01* +G01* +X800000Y50000D01* +G01* +X800000Y150000D01* +G37* +%LPD*% +G36* +G01* +X624500Y620350D02* +G75* +G01* +X624500Y633350D01* +G03* +X612500Y633350I-6000J0D01* +G01* +X612500Y620350D01* +G03* +X624500Y620350I6000J0D01* +G01* +X824500Y620350D02* +G75* +G02* +X812500Y620350I-6000J0D01* +G01* +X812500Y633350D01* +G02* +X824500Y633350I6000J0D01* +G01* +X824500Y620350D01* +G01* +X729500Y633350D02* +G75* +G02* +X741500Y633350I6000J0D01* +G01* +X741500Y620350D01* +G02* +X729500Y620350I-6000J0D01* +G01* +X729500Y633350D01* +G01* +X141500Y620350D02* +G75* +G01* +X141500Y633350D01* +G03* +X129500Y633350I-6000J0D01* +G01* +X129500Y620350D01* +G03* +X141500Y620350I6000J0D01* +G01* +X212500Y429650D02* +G75* +G01* +X212500Y416650D01* +G03* +X224500Y416650I6000J0D01* +G01* +X224500Y429650D01* +G03* +X212500Y429650I-6000J0D01* +G01* +X341500Y416650D02* +G75* +G01* +X341500Y429650D01* +G03* +X329500Y429650I-6000J0D01* +G01* +X329500Y416650D01* +G03* +X341500Y416650I6000J0D01* +G01* +X341500Y620350D02* +G75* +G01* +X341500Y633350D01* +G03* +X329500Y633350I-6000J0D01* +G01* +X329500Y620350D01* +G03* +X341500Y620350I6000J0D01* +G01* +X624500Y416650D02* +G75* +G01* +X624500Y429650D01* +G03* +X612500Y429650I-6000J0D01* +G01* +X612500Y416650D01* +G03* +X624500Y416650I6000J0D01* +G01* +X729500Y429650D02* +G75* +G01* +X729500Y416650D01* +G03* +X741500Y416650I6000J0D01* +G01* +X741500Y429650D01* +G03* +X729500Y429650I-6000J0D01* +G01* +X541500Y620350D02* +G75* +G02* +X529500Y620350I-6000J0D01* +G01* +X529500Y633350D01* +G02* +X541500Y633350I6000J0D01* +G01* +X541500Y620350D01* +G01* +X929500Y633350D02* +G75* +G02* +X941500Y633350I6000J0D01* +G01* +X941500Y620350D01* +G02* +X929500Y620350I-6000J0D01* +G01* +X929500Y633350D01* +G01* +X412500Y429650D02* +G75* +G01* +X412500Y416650D01* +G03* +X424500Y416650I6000J0D01* +G01* +X424500Y429650D01* +G03* +X412500Y429650I-6000J0D01* +G01* +X224500Y620350D02* +G75* +G01* +X224500Y633350D01* +G03* +X212500Y633350I-6000J0D01* +G01* +X212500Y620350D01* +G03* +X224500Y620350I6000J0D01* +G01* +X541500Y416650D02* +G75* +G02* +X529500Y416650I-6000J0D01* +G01* +X529500Y429650D01* +G02* +X541500Y429650I6000J0D01* +G01* +X541500Y416650D01* +G01* +X129500Y429650D02* +G75* +G02* +X141500Y429650I6000J0D01* +G01* +X141500Y416650D01* +G02* +X129500Y416650I-6000J0D01* +G01* +X129500Y429650D01* +G01* +X24500Y416650D02* +G75* +G02* +X12500Y416650I-6000J0D01* +G01* +X12500Y429650D01* +G02* +X24500Y429650I6000J0D01* +G01* +X24500Y416650D01* +G01* +X941500Y416650D02* +G75* +G02* +X929500Y416650I-6000J0D01* +G01* +X929500Y429650D01* +G02* +X941500Y429650I6000J0D01* +G01* +X941500Y416650D01* +G01* +X424500Y620350D02* +G75* +G01* +X424500Y633350D01* +G03* +X412500Y633350I-6000J0D01* +G01* +X412500Y620350D01* +G03* +X424500Y620350I6000J0D01* +G01* +X824500Y416650D02* +G75* +G02* +X812500Y416650I-6000J0D01* +G01* +X812500Y429650D01* +G02* +X824500Y429650I6000J0D01* +G01* +X824500Y416650D01* +G01* +X12500Y633350D02* +G75* +G01* +X12500Y620350D01* +G03* +X24500Y620350I6000J0D01* +G01* +X24500Y633350D01* +G03* +X12500Y633350I-6000J0D01* +G01* +X660500Y626850D02* +G75* +G03* +X660500Y626850I-6000J0D01* +G01* +X905500Y626850D02* +G75* +G03* +X905500Y626850I-6000J0D01* +G01* +X505500Y626850D02* +G75* +G03* +X505500Y626850I-6000J0D01* +G01* +X860500Y626850D02* +G75* +G03* +X860500Y626850I-6000J0D01* +G01* +X705500Y626850D02* +G75* +G03* +X705500Y626850I-6000J0D01* +G01* +X705500Y423150D02* +G75* +G03* +X705500Y423150I-6000J0D01* +G01* +X660500Y423150D02* +G75* +G03* +X660500Y423150I-6000J0D01* +G01* +X505500Y423150D02* +G75* +G03* +X505500Y423150I-6000J0D01* +G01* +X260500Y626850D02* +G75* +G03* +X260500Y626850I-6000J0D01* +G01* +X905500Y423150D02* +G75* +G03* +X905500Y423150I-6000J0D01* +G01* +X460500Y423150D02* +G75* +G03* +X460500Y423150I-6000J0D01* +G01* +X460500Y626850D02* +G75* +G03* +X460500Y626850I-6000J0D01* +G01* +X60500Y626850D02* +G75* +G03* +X60500Y626850I-6000J0D01* +G01* +X105500Y626850D02* +G75* +G03* +X105500Y626850I-6000J0D01* +G01* +X60500Y423150D02* +G75* +G03* +X60500Y423150I-6000J0D01* +G01* +X305500Y626850D02* +G75* +G03* +X305500Y626850I-6000J0D01* +G01* +X860500Y423150D02* +G75* +G03* +X860500Y423150I-6000J0D01* +G01* +X541500Y633350D02* +G75* +G01* +X541500Y620350D01* +G02* +X529500Y620350I-6000J0D01* +G01* +X529500Y633350D01* +G02* +X541500Y633350I6000J0D01* +G01* +X941500Y429650D02* +G75* +G01* +X941500Y416650D01* +G02* +X929500Y416650I-6000J0D01* +G01* +X929500Y429650D01* +G02* +X941500Y429650I6000J0D01* +G01* +X260500Y423150D02* +G75* +G03* +X260500Y423150I-6000J0D01* +G01* +X305500Y423150D02* +G75* +G03* +X305500Y423150I-6000J0D01* +G01* +X824500Y633350D02* +G75* +G03* +X812500Y633350I-6000J0D01* +G01* +X812500Y620350D01* +G03* +X824500Y620350I6000J0D01* +G01* +X824500Y633350D01* +G01* +X105500Y423150D02* +G75* +G03* +X105500Y423150I-6000J0D01* +G01* +X217000Y560000D02* +G75* +G03* +X237000Y580000I0J20000D01* +G03* +X217000Y600000I-20000J0D01* +G01* +X200000Y600000D01* +G01* +X200000Y700000D01* +G03* +X180000Y720000I-20000J0D01* +G01* +X174000Y720000D01* +G03* +X154000Y700000I0J-20000D01* +G01* +X154000Y600000D01* +G01* +X137000Y600000D01* +G03* +X117000Y580000I0J-20000D01* +G03* +X137000Y560000I20000J0D01* +G01* +X217000Y560000D01* +G01* +X417000Y560000D02* +G75* +G03* +X437000Y580000I0J20000D01* +G03* +X417000Y600000I-20000J0D01* +G01* +X400000Y600000D01* +G01* +X400000Y700000D01* +G03* +X380000Y720000I-20000J0D01* +G01* +X374000Y720000D01* +G03* +X354000Y700000I0J-20000D01* +G01* +X354000Y600000D01* +G01* +X337000Y600000D01* +G03* +X317000Y580000I0J-20000D01* +G03* +X337000Y560000I20000J0D01* +G01* +X417000Y560000D01* +G01* +X617000Y560000D02* +G75* +G03* +X637000Y580000I0J20000D01* +G03* +X617000Y600000I-20000J0D01* +G01* +X600000Y600000D01* +G01* +X600000Y700000D01* +G03* +X580000Y720000I-20000J0D01* +G01* +X574000Y720000D01* +G03* +X554000Y700000I0J-20000D01* +G01* +X554000Y600000D01* +G01* +X537000Y600000D01* +G03* +X517000Y580000I0J-20000D01* +G03* +X537000Y560000I20000J0D01* +G01* +X617000Y560000D01* +G01* +X817000Y560000D02* +G75* +G03* +X837000Y580000I0J20000D01* +G03* +X817000Y600000I-20000J0D01* +G01* +X800000Y600000D01* +G01* +X800000Y700000D01* +G03* +X780000Y720000I-20000J0D01* +G01* +X774000Y720000D01* +G03* +X754000Y700000I0J-20000D01* +G01* +X754000Y600000D01* +G01* +X737000Y600000D01* +G03* +X717000Y580000I0J-20000D01* +G03* +X737000Y560000I20000J0D01* +G01* +X817000Y560000D01* +G01* +X180000Y330000D02* +G75* +G03* +X200000Y350000I0J20000D01* +G01* +X200000Y450000D01* +G01* +X217000Y450000D01* +G03* +X237000Y470000I0J20000D01* +G03* +X217000Y490000I-20000J0D01* +G01* +X137000Y490000D01* +G03* +X117000Y470000I0J-20000D01* +G03* +X137000Y450000I20000J0D01* +G01* +X154000Y450000D01* +G01* +X154000Y350000D01* +G03* +X174000Y330000I20000J0D01* +G01* +X180000Y330000D01* +G01* +X380000Y330000D02* +G75* +G03* +X400000Y350000I0J20000D01* +G01* +X400000Y450000D01* +G01* +X417000Y450000D01* +G03* +X437000Y470000I0J20000D01* +G03* +X417000Y490000I-20000J0D01* +G01* +X337000Y490000D01* +G03* +X317000Y470000I0J-20000D01* +G03* +X337000Y450000I20000J0D01* +G01* +X354000Y450000D01* +G01* +X354000Y350000D01* +G03* +X374000Y330000I20000J0D01* +G01* +X380000Y330000D01* +G01* +X580000Y330000D02* +G75* +G03* +X600000Y350000I0J20000D01* +G01* +X600000Y450000D01* +G01* +X617000Y450000D01* +G03* +X637000Y470000I0J20000D01* +G03* +X617000Y490000I-20000J0D01* +G01* +X537000Y490000D01* +G03* +X517000Y470000I0J-20000D01* +G03* +X537000Y450000I20000J0D01* +G01* +X554000Y450000D01* +G01* +X554000Y350000D01* +G03* +X574000Y330000I20000J0D01* +G01* +X580000Y330000D01* +G01* +X780000Y330000D02* +G75* +G03* +X800000Y350000I0J20000D01* +G01* +X800000Y450000D01* +G01* +X817000Y450000D01* +G03* +X837000Y470000I0J20000D01* +G03* +X817000Y490000I-20000J0D01* +G01* +X737000Y490000D01* +G03* +X717000Y470000I0J-20000D01* +G03* +X737000Y450000I20000J0D01* +G01* +X754000Y450000D01* +G01* +X754000Y350000D01* +G03* +X774000Y330000I20000J0D01* +G01* +X780000Y330000D01* +G37* +M02* diff --git a/tests/test_dxf.py b/tests/test_dxf.py index 3d4d28e..782c8c7 100644 --- a/tests/test_dxf.py +++ b/tests/test_dxf.py @@ -19,6 +19,7 @@ class TestExcellon(unittest.TestCase): cls.OUTPREFIX = 'dxf_' cls.METRIC_FILE = os.path.join(cls.INDIR, 'ref_dxf_metric.dxf') cls.INCH_FILE = os.path.join(cls.INDIR, 'ref_dxf_inch.dxf') + cls.COMPLEX_FILE = os.path.join(cls.INDIR, 'ref_dxf_complex.dxf') try: os.mkdir(cls.OUTDIR) except FileExistsError: @@ -127,5 +128,26 @@ class TestExcellon(unittest.TestCase): dxf.write(outfile) self._checkResult(outfile) + def test_complex_fill(self): + outfile = os.path.join(self.OUTDIR, self.OUTPREFIX + 'complex_fill.gtl') + dxf = gerberex.read(self.COMPLEX_FILE) + dxf.draw_mode = dxf.DM_FILL + dxf.write(outfile) + self._checkResult(outfile) + + def test_complex_fill_flip(self): + outfile = os.path.join( + self.OUTDIR, self.OUTPREFIX + 'complex_fill_flip.gtl') + ctx = gerberex.GerberComposition() + base = gerberex.rectangle(width=100, height=100, left=0, bottom=0, units='metric') + base.draw_mode = base.DM_FILL + ctx.merge(base) + dxf = gerberex.read(self.COMPLEX_FILE) + dxf.negate_polarity() + dxf.draw_mode = dxf.DM_FILL + ctx.merge(dxf) + ctx.dump(outfile) + self._checkResult(outfile) + if __name__ == '__main__': unittest.main() -- cgit