From ffb434254213b7a1c2fa92d3599f990b045bc147 Mon Sep 17 00:00:00 2001 From: Joacim Breiler Date: Wed, 24 Nov 2021 18:28:05 +0100 Subject: [PATCH] Feature/designer text (#1727) * Added a text tool to the designer * Added possibility to change font and and save/load designs with texts * Prevent sending files when in alarm mode * Made some functions generic and fixed saving and loading geometries so that it will preserve rotation and scale. * Added measurements to the grid * Updated test file to reflect new format * Fixed broken tests --- test_files/designer.ugsd | 3650 ++++++----------- .../model/GUIBackend.java | 4 +- .../designer/actions/ToolDrawTextAction.java | 49 + .../nbp/designer/entities/AbstractEntity.java | 33 +- .../designer/entities/EntityException.java | 28 + .../ugs/nbp/designer/entities/EventType.java | 3 +- .../entities/controls/AbstractControl.java | 5 - .../controls/CreateEllipseControl.java | 2 +- .../entities/controls/CreateTextControl.java | 105 + .../entities/controls/EditTextControl.java | 66 + .../entities/controls/GridControl.java | 26 +- .../entities/controls/RotationControl.java | 11 +- .../designer/entities/cuttable/Ellipse.java | 11 +- .../nbp/designer/entities/cuttable/Path.java | 49 +- .../designer/entities/cuttable/Rectangle.java | 29 +- .../nbp/designer/entities/cuttable/Text.java | 66 + .../ugs/nbp/designer/gui/Colors.java | 5 +- .../ugs/nbp/designer/gui/Drawing.java | 2 + .../designer/gui/FontDropDownRenderer.java | 46 + .../ugs/nbp/designer/gui/KeyEntityEvent.java | 46 + .../designer/gui/SelectionSettingsPanel.java | 82 +- .../ugs/nbp/designer/gui/ToolBox.java | 8 + .../nbp/designer/io/ugsd/UgsDesignReader.java | 1 + .../nbp/designer/io/ugsd/UgsDesignWriter.java | 50 +- .../designer/io/ugsd/v1/CuttableEntityV1.java | 12 + .../designer/io/ugsd/v1/EntityEllipseV1.java | 53 +- .../nbp/designer/io/ugsd/v1/EntityPathV1.java | 28 - .../io/ugsd/v1/EntityRectangleV1.java | 52 - .../nbp/designer/io/ugsd/v1/EntityTextV1.java | 51 + .../nbp/designer/io/ugsd/v1/EntityTypeV1.java | 2 +- .../ugs/nbp/designer/logic/Tool.java | 2 +- .../src/main/resources/img/text.svg | 61 + .../src/main/resources/img/text24.svg | 59 + .../src/main/resources/img/text32.svg | 61 + .../designer/entities/MoveControlTest.java | 1 - .../nbp/designer/entities/RectangleTest.java | 25 +- .../selection/SelectionManagerTest.java | 5 +- .../designer/io/ugsd/UgsDesignReaderTest.java | 20 +- 38 files changed, 2247 insertions(+), 2562 deletions(-) create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/actions/ToolDrawTextAction.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EntityException.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateTextControl.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/EditTextControl.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Text.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/FontDropDownRenderer.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/KeyEntityEvent.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTextV1.java create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text.svg create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text24.svg create mode 100644 ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text32.svg diff --git a/test_files/designer.ugsd b/test_files/designer.ugsd index 04796b333e..0db0427b74 100644 --- a/test_files/designer.ugsd +++ b/test_files/designer.ugsd @@ -3,13 +3,9 @@ "feedSpeed": 1000, "plungeSpeed": 400, "toolDiameter": 3.0, - "stockThickness": 1.0, - "safeHeight": 10.0, + "stockThickness": 10.0, + "safeHeight": 5.0, "preferredUnits": "MM", - "stockSize": { - "width": 300.0, - "height": 200.0 - }, "toolStepOver": 0.3, "depthPerPass": 1.0 }, @@ -17,16 +13,13 @@ { "children": [ { - "x": 68.54635594516003, - "y": 116.52663703203143, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 95.53071054970496, - 120.38794219603005 + 90.17634582519531, + 134.54177856445312 ] ] }, @@ -34,44 +27,8 @@ "type": "LINE_TO", "coordinates": [ [ - 95.53071054970496, - 120.38794219603005 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 95.53071054970496, - 120.38794219603005 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 95.53071054970496, - 120.38794219603005 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 95.53071054970496, - 120.38794219603005 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 95.53071054970496, - 120.38794219603005 + 90.17634582519531, + 134.54177856445312 ] ] }, @@ -79,12 +36,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 95.53071054970496, - 118.91450542399252 + 90.17634582519531, + 134.93162536621094 ], [ - 94.31108391637099, - 117.69516714573547 + 89.85365295410156, + 135.25424194335938 ] ] }, @@ -92,12 +49,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 93.09145728303702, - 116.52663703203143 + 89.53096008300781, + 135.56341552734375 ], [ - 91.61773215592257, - 116.52663703203143 + 89.14103698730469, + 135.56341552734375 ] ] }, @@ -105,8 +62,8 @@ "type": "LINE_TO", "coordinates": [ [ - 72.40852617438941, - 116.52663703203143 + 84.05860137939453, + 135.56341552734375 ] ] }, @@ -114,12 +71,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 70.93480104727496, - 116.52663703203143 + 83.6686782836914, + 135.56341552734375 ], [ - 69.71517441394099, - 117.69516714573547 + 83.34598541259766, + 135.25424194335938 ] ] }, @@ -127,12 +84,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 68.54635594516003, - 118.9145630950079 + 83.03673553466797, + 134.93161010742188 ], [ - 68.54635594516003, - 120.38794219603005 + 83.03673553466797, + 134.54177856445312 ] ] }, @@ -140,8 +97,8 @@ "type": "LINE_TO", "coordinates": [ [ - 68.54635594516003, - 159.55988364609948 + 83.03673553466797, + 124.17753601074219 ] ] }, @@ -149,8 +106,8 @@ "type": "LINE_TO", "coordinates": [ [ - 79.9295763036207, - 159.55988364609948 + 86.04854583740234, + 124.17753601074219 ] ] }, @@ -158,8 +115,8 @@ "type": "LINE_TO", "coordinates": [ [ - 79.9295763036207, - 124.29999785356631 + 86.04854583740234, + 133.5067138671875 ] ] }, @@ -167,8 +124,8 @@ "type": "LINE_TO", "coordinates": [ [ - 84.04584502663056, - 124.29999785356631 + 87.13764190673828, + 133.5067138671875 ] ] }, @@ -176,8 +133,8 @@ "type": "LINE_TO", "coordinates": [ [ - 84.04584502663056, - 159.5598548105918 + 87.13764190673828, + 124.17754364013672 ] ] }, @@ -185,8 +142,8 @@ "type": "LINE_TO", "coordinates": [ [ - 95.53071054970496, - 159.5598548105918 + 90.17634582519531, + 124.17754364013672 ] ] }, @@ -194,64 +151,33 @@ "type": "LINE_TO", "coordinates": [ [ - 95.53071054970496, - 120.38794219603005 + 90.17634582519531, + 134.54177856445312 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path854)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "U", "type": "PATH" }, { - "x": 97.33001739416795, - "y": 116.52663703203143, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 124.3651801632659, - 116.52663703203143 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 124.3651801632659, - 116.52663703203143 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 124.3651801632659, - 116.52663703203143 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 124.3651801632659, - 116.52663703203143 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 124.3651801632659, - 116.52663703203143 + 97.80546569824219, + 135.56341552734375 ] ] }, @@ -259,8 +185,8 @@ "type": "LINE_TO", "coordinates": [ [ - 124.3651801632659, - 116.52663703203143 + 97.80546569824219, + 135.56341552734375 ] ] }, @@ -268,8 +194,8 @@ "type": "LINE_TO", "coordinates": [ [ - 112.8803146401915, - 116.52663703203143 + 94.76676177978516, + 135.56341552734375 ] ] }, @@ -277,8 +203,8 @@ "type": "LINE_TO", "coordinates": [ [ - 112.8803146401915, - 151.4815873307234 + 94.76676177978516, + 126.3149185180664 ] ] }, @@ -286,8 +212,8 @@ "type": "LINE_TO", "coordinates": [ [ - 108.76407475268934, - 151.4815873307234 + 93.67767333984375, + 126.3149185180664 ] ] }, @@ -295,8 +221,8 @@ "type": "LINE_TO", "coordinates": [ [ - 108.76407475268934, - 116.52663703203143 + 93.67767333984375, + 135.56341552734375 ] ] }, @@ -304,8 +230,8 @@ "type": "LINE_TO", "coordinates": [ [ - 97.33001739416795, - 116.52663703203143 + 90.65241241455078, + 135.56341552734375 ] ] }, @@ -313,8 +239,8 @@ "type": "LINE_TO", "coordinates": [ [ - 97.33001739416795, - 159.55988364609948 + 90.65241241455078, + 124.17753601074219 ] ] }, @@ -322,8 +248,8 @@ "type": "LINE_TO", "coordinates": [ [ - 108.76407475268934, - 159.55988364609948 + 93.67767333984375, + 124.17753601074219 ] ] }, @@ -331,8 +257,8 @@ "type": "LINE_TO", "coordinates": [ [ - 108.76407475268934, - 156.71468410214584 + 93.67767333984375, + 124.93032836914062 ] ] }, @@ -340,12 +266,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 109.17059774012887, - 157.88324305135757 + 93.78523254394531, + 124.62114715576172 ], [ - 110.23779987980379, - 158.69614484869817 + 94.06759643554688, + 124.40606689453125 ] ] }, @@ -353,12 +279,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 111.30497318397101, - 159.55988364609948 + 94.3499526977539, + 124.17753601074219 ], [ - 112.52459981730499, - 159.55988364609948 + 94.67264556884766, + 124.17753601074219 ] ] }, @@ -366,8 +292,8 @@ "type": "LINE_TO", "coordinates": [ [ - 120.45220176948351, - 159.55988364609948 + 96.77015686035156, + 124.17753601074219 ] ] }, @@ -375,12 +301,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 121.92592689659796, - 159.55988364609948 + 97.16007995605469, + 124.17753601074219 ], [ - 123.14555352993193, - 158.34054536784242 + 97.48277282714844, + 124.50015258789062 ] ] }, @@ -388,12 +314,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 124.3651801632659, - 157.1719864186307 + 97.80546569824219, + 124.80933380126953 ], [ - 124.3651801632659, - 155.69857848210086 + 97.80546569824219, + 125.19917297363281 ] ] }, @@ -401,28 +327,33 @@ "type": "LINE_TO", "coordinates": [ [ - 124.3651801632659, - 116.52663703203143 + 97.80546569824219, + 135.56341552734375 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path856)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "N", "type": "PATH" }, { - "x": 126.2128729896358, - "y": 116.52663703203143, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 101.33303833007812, + 135.56341552734375 ] ] }, @@ -430,8 +361,8 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 101.33303833007812, + 135.56341552734375 ] ] }, @@ -439,8 +370,8 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 98.2943344116211, + 135.56341552734375 ] ] }, @@ -448,8 +379,8 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 98.2943344116211, + 124.17753601074219 ] ] }, @@ -457,8 +388,8 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 101.33303833007812, + 124.17753601074219 ] ] }, @@ -466,17 +397,33 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 101.33303833007812, + 135.56341552734375 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "I", + "type": "PATH" + }, + { + "segments": [ { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 126.2128729896358, - 116.52663703203143 + 110.29747009277344, + 124.17754364013672 ] ] }, @@ -484,8 +431,8 @@ "type": "LINE_TO", "coordinates": [ [ - 126.2128729896358, - 159.55988364609948 + 110.29747009277344, + 124.17754364013672 ] ] }, @@ -493,8 +440,8 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 159.55988364609948 + 107.60835266113281, + 135.5634307861328 ] ] }, @@ -502,28 +449,17 @@ "type": "LINE_TO", "coordinates": [ [ - 137.6977385127102, - 116.52663703203143 + 104.50242614746094, + 135.5634307861328 ] ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path858)", - "type": "PATH" - }, - { - "x": 139.5129337219114, - "y": 116.52657936101605, - "rotation": 0.0, - "segments": [ + }, { - "type": "MOVE_TO", + "type": "LINE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 101.81330871582031, + 124.17755126953125 ] ] }, @@ -531,8 +467,8 @@ "type": "LINE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 104.89234924316406, + 124.17755126953125 ] ] }, @@ -540,8 +476,8 @@ "type": "LINE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 106.0621109008789, + 129.11099243164062 ] ] }, @@ -549,8 +485,8 @@ "type": "LINE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 107.21843719482422, + 124.17755126953125 ] ] }, @@ -558,17 +494,33 @@ "type": "LINE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 110.29747009277344, + 124.17754364013672 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "V", + "type": "PATH" + }, + { + "segments": [ { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 115.70217895507812, + 133.5067138671875 ] ] }, @@ -576,8 +528,8 @@ "type": "LINE_TO", "coordinates": [ [ - 161.41546262838528, - 116.52657936101605 + 115.70217895507812, + 133.5067138671875 ] ] }, @@ -585,8 +537,8 @@ "type": "LINE_TO", "coordinates": [ [ - 149.6765274470381, - 116.52657936101605 + 115.2046890258789, + 135.5634307861328 ] ] }, @@ -594,8 +546,8 @@ "type": "LINE_TO", "coordinates": [ [ - 139.5129337219114, - 159.5598259750841 + 110.79452514648438, + 135.5634307861328 ] ] }, @@ -603,8 +555,8 @@ "type": "LINE_TO", "coordinates": [ [ - 151.15025257415255, - 159.5598259750841 + 110.79452514648438, + 124.17755126953125 ] ] }, @@ -612,8 +564,8 @@ "type": "LINE_TO", "coordinates": [ [ - 155.5713991199882, - 140.91374862326484 + 115.20468139648438, + 124.17755126953125 ] ] }, @@ -621,8 +573,8 @@ "type": "LINE_TO", "coordinates": [ [ - 159.94176633677853, - 159.5598259750841 + 115.7021713256836, + 126.23426818847656 ] ] }, @@ -630,28 +582,17 @@ "type": "LINE_TO", "coordinates": [ [ - 171.579056353512, - 159.5598548105918 + 113.8332290649414, + 126.23426818847656 ] ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path860)", - "type": "PATH" - }, - { - "x": 173.45768967963522, - "y": 116.52657936101605, - "rotation": 0.0, - "segments": [ + }, { - "type": "MOVE_TO", + "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 113.8332290649414, + 128.51950073242188 ] ] }, @@ -659,8 +600,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 115.63494110107422, + 128.51950073242188 ] ] }, @@ -668,8 +609,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 115.63494110107422, + 130.5762176513672 ] ] }, @@ -677,8 +618,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 113.8332290649414, + 130.5762176513672 ] ] }, @@ -686,8 +627,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 113.8332290649414, + 133.5067138671875 ] ] }, @@ -695,17 +636,33 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 115.70217895507812, + 133.5067138671875 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "E", + "type": "PATH" + }, + { + "segments": [ { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 190.1260260653944, - 116.52657936101605 + 123.8823471069336, + 135.56341552734375 ] ] }, @@ -713,8 +670,8 @@ "type": "LINE_TO", "coordinates": [ [ - 173.45768967963522, - 116.52657936101605 + 123.8823471069336, + 135.56341552734375 ] ] }, @@ -722,8 +679,8 @@ "type": "LINE_TO", "coordinates": [ [ - 173.45768967963522, - 159.5598259750841 + 120.74951934814453, + 135.56341552734375 ] ] }, @@ -731,8 +688,8 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1259972298867, - 159.5598259750841 + 119.25707244873047, + 131.1542510986328 ] ] }, @@ -740,8 +697,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00627417994838, - 151.78640748253383 + 119.18987274169922, + 131.1542510986328 ] ] }, @@ -749,8 +706,8 @@ "type": "LINE_TO", "coordinates": [ [ - 184.94255520270963, - 151.78640748253383 + 119.18987274169922, + 135.56341552734375 ] ] }, @@ -758,8 +715,8 @@ "type": "LINE_TO", "coordinates": [ [ - 184.94255520270963, - 143.14930786359764 + 116.17805480957031, + 135.56341552734375 ] ] }, @@ -767,8 +724,8 @@ "type": "LINE_TO", "coordinates": [ [ - 191.7521756861679, - 143.14930786359764 + 116.17805480957031, + 124.17753601074219 ] ] }, @@ -776,26 +733,34 @@ "type": "LINE_TO", "coordinates": [ [ - 191.7521756861679, - 135.37588937104738 + 122.0806655883789, + 124.17753601074219 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 184.94255520270963, - 135.37588937104738 + 122.47058868408203, + 124.17753601074219 + ], + [ + 122.77984619140625, + 124.50015258789062 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 184.94255520270963, - 124.29999785356631 + 123.1025390625, + 124.80933380126953 + ], + [ + 123.1025390625, + 125.19917297363281 ] ] }, @@ -803,37 +768,34 @@ "type": "LINE_TO", "coordinates": [ [ - 192.00630301545607, - 124.29999785356631 + 123.1025390625, + 130.1326141357422 ] ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path862)", - "type": "PATH" - }, - { - "x": 193.80488897222676, - "y": 116.52663703203143, - "rotation": 0.0, - "segments": [ + }, { - "type": "MOVE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 123.1025390625, + 130.44178771972656 + ], + [ + 122.88740539550781, + 130.72409057617188 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 122.67227172851562, + 130.99293518066406 + ], + [ + 122.3764877319336, + 131.10047912597656 ] ] }, @@ -841,17 +803,17 @@ "type": "LINE_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 123.8823471069336, + 135.56341552734375 ] ] }, { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 120.34616088867188, + 129.08409118652344 ] ] }, @@ -859,8 +821,8 @@ "type": "LINE_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 120.34616088867188, + 129.08409118652344 ] ] }, @@ -868,8 +830,8 @@ "type": "LINE_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 120.34616088867188, + 126.23426055908203 ] ] }, @@ -877,8 +839,8 @@ "type": "LINE_TO", "coordinates": [ [ - 211.08286566160677, - 116.52663703203143 + 119.1898422241211, + 126.23426055908203 ] ] }, @@ -886,8 +848,8 @@ "type": "LINE_TO", "coordinates": [ [ - 205.44212131794484, - 133.19119596628298 + 119.1898422241211, + 129.08409118652344 ] ] }, @@ -895,8 +857,33 @@ "type": "LINE_TO", "coordinates": [ [ - 205.18813816619513, - 133.19119596628298 + 120.34616088867188, + 129.08409118652344 + ] + ] + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "R", + "type": "PATH" + }, + { + "segments": [ + { + "type": "MOVE_TO", + "coordinates": [ + [ + 130.25828552246094, + 126.23426055908203 ] ] }, @@ -904,8 +891,8 @@ "type": "LINE_TO", "coordinates": [ [ - 205.18813816619513, - 116.52663703203143 + 130.25828552246094, + 126.23426055908203 ] ] }, @@ -913,8 +900,8 @@ "type": "LINE_TO", "coordinates": [ [ - 193.80488897222676, - 116.52663703203143 + 127.27336883544922, + 126.23426055908203 ] ] }, @@ -922,8 +909,8 @@ "type": "LINE_TO", "coordinates": [ [ - 193.80488897222676, - 159.55988364609948 + 127.27336883544922, + 128.51950073242188 ] ] }, @@ -931,8 +918,8 @@ "type": "LINE_TO", "coordinates": [ [ - 216.11396970164787, - 159.55988364609948 + 128.85995483398438, + 128.51950073242188 ] ] }, @@ -940,12 +927,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 217.58769482876232, - 159.55988364609948 + 129.24989318847656, + 128.51950073242188 ], [ - 218.75654213305097, - 158.34054536784242 + 129.5725860595703, + 128.8421173095703 ] ] }, @@ -953,12 +940,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 219.97616876638494, - 157.1719864186307 + 129.89527893066406, + 129.15130615234375 ], [ - 219.97616876638494, - 155.69857848210086 + 129.89527893066406, + 129.5411376953125 ] ] }, @@ -966,8 +953,8 @@ "type": "LINE_TO", "coordinates": [ [ - 219.97616876638494, - 137.0525011302816 + 129.89527893066406, + 134.54177856445312 ] ] }, @@ -975,12 +962,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 219.97616876638494, - 135.88397101657756 + 129.89527893066406, + 134.93162536621094 ], [ - 219.1630651204905, - 134.81699956096418 + 129.5725860595703, + 135.25424194335938 ] ] }, @@ -988,12 +975,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 218.34996147459606, - 133.8008939409192 + 129.24989318847656, + 135.56341552734375 ], [ - 217.2320376768912, - 133.39442862449505 + 128.85995483398438, + 135.56341552734375 ] ] }, @@ -1001,17 +988,17 @@ "type": "LINE_TO", "coordinates": [ [ - 222.92347484307538, - 116.52663703203143 + 124.49014282226562, + 135.56341552734375 ] ] }, { - "type": "MOVE_TO", + "type": "LINE_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 124.00609588623047, + 133.50669860839844 ] ] }, @@ -1019,8 +1006,8 @@ "type": "LINE_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 126.87000274658203, + 133.50669860839844 ] ] }, @@ -1028,8 +1015,8 @@ "type": "LINE_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 126.87000274658203, + 130.57620239257812 ] ] }, @@ -1037,26 +1024,34 @@ "type": "LINE_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 125.2834243774414, + 130.57620239257812 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 124.89349365234375, + 130.57620239257812 + ], + [ + 124.57080078125, + 130.2535858154297 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 124.26155090332031, + 129.93096923828125 + ], + [ + 124.26155090332031, + 129.5411376953125 ] ] }, @@ -1064,17 +1059,34 @@ "type": "LINE_TO", "coordinates": [ [ - 209.558361205447, - 151.78643631804152 + 124.26155090332031, + 125.19918060302734 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", + "coordinates": [ + [ + 124.26155090332031, + 124.80934143066406 + ], + [ + 124.57080078125, + 124.50016021728516 + ] + ] + }, + { + "type": "QUAD_TO", "coordinates": [ [ - 205.18802282416436, - 151.78643631804152 + 124.89349365234375, + 124.17754364013672 + ], + [ + 125.2834243774414, + 124.17754364013672 ] ] }, @@ -1082,8 +1094,8 @@ "type": "LINE_TO", "coordinates": [ [ - 205.18802282416436, - 141.01542262338626 + 129.78768920898438, + 124.17754364013672 ] ] }, @@ -1091,28 +1103,33 @@ "type": "LINE_TO", "coordinates": [ [ - 209.558361205447, - 141.01542262338626 + 130.25828552246094, + 126.23426055908203 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path864)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "S", "type": "PATH" }, { - "x": 223.391186777837, - "y": 116.52663703203143, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 138.75192260742188, + 135.56341552734375 ] ] }, @@ -1120,8 +1137,8 @@ "type": "LINE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 138.75192260742188, + 135.56341552734375 ] ] }, @@ -1129,8 +1146,8 @@ "type": "LINE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 135.67286682128906, + 135.56341552734375 ] ] }, @@ -1138,8 +1155,8 @@ "type": "LINE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 135.49807739257812, + 134.7703094482422 ] ] }, @@ -1147,8 +1164,8 @@ "type": "LINE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 135.47128295898438, + 134.74331665039062 ] ] }, @@ -1156,26 +1173,21 @@ "type": "LINE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 133.5351104736328, + 134.74331665039062 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 235.73993527585117, - 151.78643631804152 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 133.5351104736328, + 134.7569122314453 + ], [ - 235.73993527585117, - 143.14930786359764 + 133.3468780517578, + 135.5633087158203 ] ] }, @@ -1183,34 +1195,26 @@ "type": "LINE_TO", "coordinates": [ [ - 241.7364809489227, - 143.14930786359764 + 130.26783752441406, + 135.5633087158203 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 243.21026374705252, - 143.14930786359764 - ], - [ - 244.4298903803865, - 141.9299695853406 + 132.45947265625, + 126.23416137695312 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 245.64951701372047, - 140.76138180062117 - ], - [ - 245.64951701372047, - 139.28800269959902 + 131.43760681152344, + 126.23416137695312 ] ] }, @@ -1218,43 +1222,35 @@ "type": "LINE_TO", "coordinates": [ [ - 245.64951701372047, - 120.38794219603005 + 131.908203125, + 124.17742919921875 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 245.64951701372047, - 118.91450542399252 - ], - [ - 244.4298903803865, - 117.69516714573547 + 136.06289672851562, + 124.17742919921875 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 243.21026374705252, - 116.52663703203143 - ], - [ - 241.7364809489227, - 116.52663703203143 + 138.75192260742188, + 135.56341552734375 ] ] }, { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 225.22065556334564, - 116.52663703203143 + 135.0006103515625, + 132.6866912841797 ] ] }, @@ -1262,8 +1258,8 @@ "type": "LINE_TO", "coordinates": [ [ - 223.391186777837, - 124.3000555245817 + 135.0006103515625, + 132.6866912841797 ] ] }, @@ -1271,8 +1267,8 @@ "type": "LINE_TO", "coordinates": [ [ - 234.2154019841837, - 124.3000555245817 + 134.50311279296875, + 130.62997436523438 ] ] }, @@ -1280,8 +1276,8 @@ "type": "LINE_TO", "coordinates": [ [ - 234.2154019841837, - 135.37594704206276 + 134.01907348632812, + 132.6866912841797 ] ] }, @@ -1289,34 +1285,42 @@ "type": "LINE_TO", "coordinates": [ [ - 228.21888514661987, - 135.37594704206276 + 135.0006103515625, + 132.6866912841797 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "A", + "type": "PATH" + }, + { + "segments": [ { - "type": "QUAD_TO", + "type": "MOVE_TO", "coordinates": [ [ - 226.74513118399773, - 135.37594704206276 - ], - [ - 225.52550455066375, - 136.59528532031982 + 144.12867736816406, + 133.5067138671875 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 224.3566860818828, - 137.81462359857687 - ], - [ - 224.3566860818828, - 139.28800269959902 + 143.64462280273438, + 135.5634307861328 ] ] }, @@ -1324,34 +1328,26 @@ "type": "LINE_TO", "coordinates": [ [ - 224.3566860818828, - 155.69854964659316 + 139.26136779785156, + 135.5634307861328 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 224.3566860818828, - 157.171957583123 - ], - [ - 225.52550455066375, - 158.34051653233473 + 139.26136779785156, + 124.17755126953125 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 226.74513118399773, - 159.5598548105918 - ], - [ - 228.21888514661987, - 159.5598548105918 + 142.28662109375, + 124.17755126953125 ] ] }, @@ -1359,8 +1355,8 @@ "type": "LINE_TO", "coordinates": [ [ - 245.24287868425017, - 159.5598548105918 + 142.28662109375, + 133.5067138671875 ] ] }, @@ -1368,46 +1364,59 @@ "type": "LINE_TO", "coordinates": [ [ - 247.02151046969811, - 151.78643631804152 + 144.12867736816406, + 133.5067138671875 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path866)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "L", "type": "PATH" }, { - "x": 247.0576125253283, - "y": 116.52663703203143, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 89.71920013427734, + 147.984375 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 89.71920013427734, + 148.3742218017578 + ], + [ + 89.383056640625, + 148.69683837890625 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 89.06036376953125, + 149.00601196289062 + ], + [ + 88.67044067382812, + 149.00601196289062 ] ] }, @@ -1415,26 +1424,34 @@ "type": "LINE_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 84.05860137939453, + 149.00601196289062 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 83.6686782836914, + 149.00601196289062 + ], + [ + 83.34598541259766, + 148.69683837890625 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 83.03673553466797, + 148.37420654296875 + ], + [ + 83.03673553466797, + 147.984375 ] ] }, @@ -1442,26 +1459,34 @@ "type": "LINE_TO", "coordinates": [ [ - 267.48607027859543, - 116.52663703203143 + 83.03673553466797, + 138.6417694091797 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 266.82544879737543, - 119.52420339862874 + 83.03673553466797, + 138.25192260742188 + ], + [ + 83.34598541259766, + 137.9427490234375 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 266.7241784943617, - 119.62622342484246 + 83.6686782836914, + 137.62013244628906 + ], + [ + 84.05860137939453, + 137.62013244628906 ] ] }, @@ -1469,21 +1494,17 @@ "type": "LINE_TO", "coordinates": [ [ - 259.40636102334247, - 119.62622342484246 + 88.92591094970703, + 137.62013244628906 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 259.40636102334247, - 119.57483855013561 - ], - [ - 258.69493137756945, - 116.52704072913912 + 89.3965072631836, + 139.67686462402344 ] ] }, @@ -1491,8 +1512,8 @@ "type": "LINE_TO", "coordinates": [ [ - 247.0576125253283, - 116.52704072913912 + 86.04855346679688, + 139.67686462402344 ] ] }, @@ -1500,8 +1521,8 @@ "type": "LINE_TO", "coordinates": [ [ - 255.34095813590102, - 151.78681117964152 + 86.04855346679688, + 146.94931030273438 ] ] }, @@ -1509,8 +1530,8 @@ "type": "LINE_TO", "coordinates": [ [ - 251.47878790667164, - 151.78681117964152 + 86.68049621582031, + 146.94931030273438 ] ] }, @@ -1518,8 +1539,8 @@ "type": "LINE_TO", "coordinates": [ [ - 253.25741969211958, - 159.56028734320716 + 86.68049621582031, + 142.13685607910156 ] ] }, @@ -1527,8 +1548,8 @@ "type": "LINE_TO", "coordinates": [ [ - 268.96019910281757, - 159.56028734320716 + 89.71920013427734, + 142.13685607910156 ] ] }, @@ -1536,17 +1557,33 @@ "type": "LINE_TO", "coordinates": [ [ - 279.12344680185197, - 116.52663703203143 + 89.71920013427734, + 147.984375 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "G", + "type": "PATH" + }, + { + "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 + 94.06485748291016, + 144.879150390625 ] ] }, @@ -1554,8 +1591,8 @@ "type": "LINE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 + 94.06485748291016, + 144.879150390625 ] ] }, @@ -1563,8 +1600,8 @@ "type": "LINE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 + 90.20597076416016, + 144.879150390625 ] ] }, @@ -1572,8 +1609,8 @@ "type": "LINE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 + 90.20597076416016, + 141.77389526367188 ] ] }, @@ -1581,8 +1618,8 @@ "type": "LINE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 + 94.06485748291016, + 141.77389526367188 ] ] }, @@ -1590,17 +1627,33 @@ "type": "LINE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 + 94.06485748291016, + 144.879150390625 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "-", + "type": "PATH" + }, + { + "segments": [ { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 263.0649525682675, - 135.1727143838507 + 99.95759582519531, + 149.0060272216797 ] ] }, @@ -1608,8 +1661,8 @@ "type": "LINE_TO", "coordinates": [ [ - 261.2355126182665, - 127.39929589130043 + 99.95759582519531, + 149.0060272216797 ] ] }, @@ -1617,46 +1670,34 @@ "type": "LINE_TO", "coordinates": [ [ - 264.94525835383683, - 127.39929589130043 - ] - ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path868)", - "type": "PATH" - }, - { - "x": 281.04890899246675, - "y": 116.52657936101605, - "rotation": 0.0, - "segments": [ - { - "type": "MOVE_TO", - "coordinates": [ - [ - 299.44504016361316, - 124.29999785356631 + 95.56088256835938, + 149.0060272216797 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 299.44504016361316, - 124.29999785356631 + 95.17095947265625, + 149.0060272216797 + ], + [ + 94.8482666015625, + 148.6968536376953 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 299.44504016361316, - 124.29999785356631 + 94.53901672363281, + 148.3742218017578 + ], + [ + 94.53901672363281, + 147.98439025878906 ] ] }, @@ -1664,26 +1705,34 @@ "type": "LINE_TO", "coordinates": [ [ - 299.44504016361316, - 124.29999785356631 + 94.53901672363281, + 138.64178466796875 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 299.44504016361316, - 124.29999785356631 + 94.53901672363281, + 138.25193786621094 + ], + [ + 94.8482666015625, + 137.94276428222656 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 299.44504016361316, - 124.29999785356631 + 95.17095947265625, + 137.62014770507812 + ], + [ + 95.56088256835938, + 137.62014770507812 ] ] }, @@ -1691,8 +1740,8 @@ "type": "LINE_TO", "coordinates": [ [ - 297.6155425425968, - 116.52657936101605 + 99.95759582519531, + 137.62014770507812 ] ] }, @@ -1700,8 +1749,8 @@ "type": "LINE_TO", "coordinates": [ [ - 281.04890899246675, - 116.52657936101605 + 99.95759582519531, + 139.6768798828125 ] ] }, @@ -1709,8 +1758,8 @@ "type": "LINE_TO", "coordinates": [ [ - 281.04890899246675, - 159.5598259750841 + 97.56427764892578, + 139.6768798828125 ] ] }, @@ -1718,8 +1767,8 @@ "type": "LINE_TO", "coordinates": [ [ - 292.48293751548044, - 159.5598259750841 + 97.56427764892578, + 146.94932556152344 ] ] }, @@ -1727,8 +1776,8 @@ "type": "LINE_TO", "coordinates": [ [ - 292.48293751548044, - 124.29999785356631 + 99.95759582519531, + 146.94932556152344 ] ] }, @@ -1736,28 +1785,33 @@ "type": "LINE_TO", "coordinates": [ [ - 299.44504016361316, - 124.29999785356631 + 99.95759582519531, + 149.0060272216797 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path870)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "C", "type": "PATH" }, { - "x": 68.54635594516003, - "y": 65.71997192541312, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 93.80291576431773, - 69.58127708941174 + 107.58734130859375, + 147.984375 ] ] }, @@ -1765,35 +1819,34 @@ "type": "LINE_TO", "coordinates": [ [ - 93.80291576431773, - 69.58127708941174 + 107.58734130859375, + 147.984375 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 93.80291576431773, - 69.58127708941174 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 107.58734130859375, + 148.3742218017578 + ], [ - 93.80291576431773, - 69.58127708941174 + 107.2646484375, + 148.69683837890625 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 93.80291576431773, - 69.58127708941174 + 106.94194793701172, + 149.00601196289062 + ], + [ + 106.5520248413086, + 149.00601196289062 ] ] }, @@ -1801,8 +1854,8 @@ "type": "LINE_TO", "coordinates": [ [ - 93.80291576431773, - 69.58127708941174 + 101.46959686279297, + 149.00601196289062 ] ] }, @@ -1810,12 +1863,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 93.80291576431773, - 68.10784031737421 + 101.07966613769531, + 149.00601196289062 ], [ - 92.53245213092305, - 66.88850203911716 + 100.75697326660156, + 148.69683837890625 ] ] }, @@ -1823,12 +1876,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 91.31282549758907, - 65.71997192541312 + 100.44772338867188, + 148.37420654296875 ], [ - 89.83910037047463, - 65.71997192541312 + 100.44772338867188, + 147.984375 ] ] }, @@ -1836,8 +1889,8 @@ "type": "LINE_TO", "coordinates": [ [ - 72.40852617438941, - 65.71997192541312 + 100.44772338867188, + 138.6417694091797 ] ] }, @@ -1845,12 +1898,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 70.93480104727496, - 65.71997192541312 + 100.44772338867188, + 138.25192260742188 ], [ - 69.71517441394099, - 66.88850203911716 + 100.75697326660156, + 137.9427490234375 ] ] }, @@ -1858,12 +1911,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 68.54635594516003, - 68.1078979883896 + 101.07966613769531, + 137.62013244628906 ], [ - 68.54635594516003, - 69.58127708941174 + 101.46959686279297, + 137.62013244628906 ] ] }, @@ -1871,8 +1924,8 @@ "type": "LINE_TO", "coordinates": [ [ - 68.54635594516003, - 104.89191337548255 + 106.5520248413086, + 137.62013244628906 ] ] }, @@ -1880,12 +1933,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 68.54635594516003, - 106.36535014752008 + 106.94194793701172, + 137.62013244628906 ], [ - 69.71517441394099, - 107.53388026122411 + 107.2646484375, + 137.9427490234375 ] ] }, @@ -1893,21 +1946,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 70.93480104727496, - 108.75321853948117 + 107.58734130859375, + 138.25192260742188 ], [ - 72.40852617438941, - 108.75321853948117 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 90.80465734553582, - 108.75321853948117 + 107.58734130859375, + 138.6417694091797 ] ] }, @@ -1915,17 +1959,17 @@ "type": "LINE_TO", "coordinates": [ [ - 92.58328913098376, - 100.97974237591552 + 107.58734130859375, + 147.984375 ] ] }, { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 79.9296051391284, - 100.97974237591552 + 104.54864501953125, + 146.94931030273438 ] ] }, @@ -1933,8 +1977,8 @@ "type": "LINE_TO", "coordinates": [ [ - 79.9296051391284, - 73.493332746948 + 104.54864501953125, + 146.94931030273438 ] ] }, @@ -1942,8 +1986,8 @@ "type": "LINE_TO", "coordinates": [ [ - 82.31805024124333, - 73.493332746948 + 104.54864501953125, + 139.67686462402344 ] ] }, @@ -1951,8 +1995,8 @@ "type": "LINE_TO", "coordinates": [ [ - 82.31805024124333, - 91.68213661779009 + 103.45954132080078, + 139.67686462402344 ] ] }, @@ -1960,8 +2004,8 @@ "type": "LINE_TO", "coordinates": [ [ - 93.80291576431773, - 91.68213661779009 + 103.45954132080078, + 146.94931030273438 ] ] }, @@ -1969,28 +2013,33 @@ "type": "LINE_TO", "coordinates": [ [ - 93.80291576431773, - 69.58127708941174 + 104.54864501953125, + 146.94931030273438 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path872)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "O", "type": "PATH" }, { - "x": 95.64267882607237, - "y": 81.31755940405128, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 115.20301055908203, + 147.984375 ] ] }, @@ -1998,26 +2047,34 @@ "type": "LINE_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 115.20301055908203, + 147.984375 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 115.20301055908203, + 148.3742218017578 + ], + [ + 114.88031005859375, + 148.69683837890625 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 114.5576171875, + 149.00601196289062 + ], + [ + 114.1677017211914, + 149.00601196289062 ] ] }, @@ -2025,8 +2082,8 @@ "type": "LINE_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 108.06340026855469, + 149.00601196289062 ] ] }, @@ -2034,8 +2091,8 @@ "type": "LINE_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 108.06340026855469, + 137.62013244628906 ] ] }, @@ -2043,26 +2100,34 @@ "type": "LINE_TO", "coordinates": [ [ - 95.64267882607237, - 81.31755940405128 + 114.1677017211914, + 137.62013244628906 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 95.64267882607237, - 93.05395706072159 + 114.55762481689453, + 137.62013244628906 + ], + [ + 114.88031005859375, + 137.9427490234375 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 110.22744793254242, - 93.05395706072159 + 115.20301055908203, + 138.25192260742188 + ], + [ + 115.20301055908203, + 138.6417694091797 ] ] }, @@ -2070,28 +2135,17 @@ "type": "LINE_TO", "coordinates": [ [ - 110.22744793254242, - 81.31755940405128 + 115.20301055908203, + 147.984375 ] ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path874)", - "type": "PATH" - }, - { - "x": 112.01954590008245, - "y": 65.71991425439774, - "rotation": 0.0, - "segments": [ + }, { "type": "MOVE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 112.164306640625, + 146.94931030273438 ] ] }, @@ -2099,8 +2153,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 112.164306640625, + 146.94931030273438 ] ] }, @@ -2108,8 +2162,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 112.164306640625, + 139.67686462402344 ] ] }, @@ -2117,8 +2171,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 111.07520294189453, + 139.67686462402344 ] ] }, @@ -2126,8 +2180,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 111.07520294189453, + 146.94931030273438 ] ] }, @@ -2135,8 +2189,33 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 112.164306640625, + 146.94931030273438 + ] + ] + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "D", + "type": "PATH" + }, + { + "segments": [ + { + "type": "MOVE_TO", + "coordinates": [ + [ + 120.58670043945312, + 146.94931030273438 ] ] }, @@ -2144,34 +2223,26 @@ "type": "LINE_TO", "coordinates": [ [ - 115.88171612931183, - 65.71991425439774 + 120.58670043945312, + 146.94931030273438 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 114.40799100219738, - 65.71991425439774 - ], - [ - 113.1883643688634, - 66.88844436810177 + 120.08921813964844, + 149.0060272216797 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 112.01954590008245, - 68.10784031737421 - ], - [ - 112.01954590008245, - 69.58121941839636 + 115.67906188964844, + 149.0060272216797 ] ] }, @@ -2179,34 +2250,35 @@ "type": "LINE_TO", "coordinates": [ [ - 112.01954590008245, - 104.89185570446716 + 115.67906188964844, + 137.62014770507812 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 112.01954590008245, - 106.36529247650469 - ], - [ - 113.1883643688634, - 107.53382259020873 + 120.08921813964844, + 137.62014770507812 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 114.40799100219738, - 108.75316086846578 - ], + 120.58670043945312, + 139.6768798828125 + ] + ] + }, + { + "type": "LINE_TO", + "coordinates": [ [ - 115.88171612931183, - 108.75316086846578 + 118.7177734375, + 139.6768798828125 ] ] }, @@ -2214,8 +2286,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 108.75316086846578 + 118.7177734375, + 141.9621124267578 ] ] }, @@ -2223,8 +2295,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 100.97968470490014 + 120.51948547363281, + 141.9621124267578 ] ] }, @@ -2232,8 +2304,8 @@ "type": "LINE_TO", "coordinates": [ [ - 123.45360325860383, - 100.97968470490014 + 120.51948547363281, + 144.01882934570312 ] ] }, @@ -2241,8 +2313,8 @@ "type": "LINE_TO", "coordinates": [ [ - 123.45360325860383, - 73.49327507593262 + 118.7177734375, + 144.01882934570312 ] ] }, @@ -2250,8 +2322,8 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 73.49327507593262 + 118.7177734375, + 146.94932556152344 ] ] }, @@ -2259,28 +2331,33 @@ "type": "LINE_TO", "coordinates": [ [ - 132.4992155150103, - 65.71991425439774 + 120.58670043945312, + 146.94931030273438 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path876)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "E", "type": "PATH" }, { - "x": 134.35166620014934, - "y": 65.71997192541312, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 161.33604964020196, - 69.58127708941174 + 89.2889404296875, + 153.11947631835938 ] ] }, @@ -2288,8 +2365,8 @@ "type": "LINE_TO", "coordinates": [ [ - 161.33604964020196, - 69.58127708941174 + 89.2889404296875, + 153.11947631835938 ] ] }, @@ -2297,8 +2374,8 @@ "type": "LINE_TO", "coordinates": [ [ - 161.33604964020196, - 69.58127708941174 + 86.30401611328125, + 153.11947631835938 ] ] }, @@ -2306,8 +2383,8 @@ "type": "LINE_TO", "coordinates": [ [ - 161.33604964020196, - 69.58127708941174 + 86.30401611328125, + 155.4047088623047 ] ] }, @@ -2315,17 +2392,8 @@ "type": "LINE_TO", "coordinates": [ [ - 161.33604964020196, - 69.58127708941174 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 161.33604964020196, - 69.58127708941174 + 87.89059448242188, + 155.4047088623047 ] ] }, @@ -2333,12 +2401,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 161.33604964020196, - 68.10784031737421 + 88.280517578125, + 155.4047088623047 ], [ - 160.116423006868, - 66.88850203911716 + 88.60321044921875, + 155.72732543945312 ] ] }, @@ -2346,12 +2414,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 158.89676753802632, - 65.71997192541312 + 88.9259033203125, + 156.0364990234375 ], [ - 157.42304241091188, - 65.71997192541312 + 88.9259033203125, + 156.42633056640625 ] ] }, @@ -2359,8 +2427,8 @@ "type": "LINE_TO", "coordinates": [ [ - 138.2138652648864, - 65.71997192541312 + 88.9259033203125, + 161.42697143554688 ] ] }, @@ -2368,12 +2436,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 136.74011130226427, - 65.71997192541312 + 88.9259033203125, + 161.8168182373047 ], [ - 135.5204846689303, - 66.88850203911716 + 88.60321044921875, + 162.13943481445312 ] ] }, @@ -2381,12 +2449,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 134.35166620014934, - 68.1078979883896 + 88.280517578125, + 162.4486083984375 ], [ - 134.35166620014934, - 69.58127708941174 + 87.89059448242188, + 162.4486083984375 ] ] }, @@ -2394,34 +2462,35 @@ "type": "LINE_TO", "coordinates": [ [ - 134.35166620014934, - 104.89191337548255 + 83.52078247070312, + 162.4486083984375 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 134.35166620014934, - 106.36535014752008 - ], - [ - 135.5204846689303, - 107.53388026122411 + 83.0367431640625, + 160.3918914794922 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 136.74011130226427, - 108.75321853948117 - ], + 85.9006576538086, + 160.3918914794922 + ] + ] + }, + { + "type": "LINE_TO", + "coordinates": [ [ - 138.2138652648864, - 108.75321853948117 + 85.9006576538086, + 157.46139526367188 ] ] }, @@ -2429,8 +2498,8 @@ "type": "LINE_TO", "coordinates": [ [ - 157.42304241091188, - 108.75321853948117 + 84.31407928466797, + 157.46139526367188 ] ] }, @@ -2438,12 +2507,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 158.89676753802632, - 108.75321853948117 + 83.92415618896484, + 157.46139526367188 ], [ - 160.116423006868, - 107.53388026122411 + 83.6014633178711, + 157.13877868652344 ] ] }, @@ -2451,12 +2520,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 161.33604964020196, - 106.36535014752008 + 83.2922134399414, + 156.816162109375 ], [ - 161.33604964020196, - 104.89191337548255 + 83.2922134399414, + 156.4263153076172 ] ] }, @@ -2464,26 +2533,34 @@ "type": "LINE_TO", "coordinates": [ [ - 161.33604964020196, - 69.58127708941174 + 83.2922134399414, + 152.0843505859375 ] ] }, { - "type": "MOVE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 83.2922134399414, + 151.69451904296875 + ], + [ + 83.6014633178711, + 151.3853302001953 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 83.92415618896484, + 151.06271362304688 + ], + [ + 84.31407928466797, + 151.06271362304688 ] ] }, @@ -2491,8 +2568,8 @@ "type": "LINE_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 88.81835174560547, + 151.06271362304688 ] ] }, @@ -2500,17 +2577,33 @@ "type": "LINE_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 89.2889404296875, + 153.11947631835938 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "S", + "type": "PATH" + }, + { + "segments": [ { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 94.69343566894531, + 160.39190673828125 ] ] }, @@ -2518,8 +2611,8 @@ "type": "LINE_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 94.69343566894531, + 160.39190673828125 ] ] }, @@ -2527,8 +2620,8 @@ "type": "LINE_TO", "coordinates": [ [ - 149.85121295263525, - 100.97974237591552 + 94.1959457397461, + 162.44862365722656 ] ] }, @@ -2536,8 +2629,8 @@ "type": "LINE_TO", "coordinates": [ [ - 145.7349153941177, - 100.97974237591552 + 89.7857894897461, + 162.44862365722656 ] ] }, @@ -2545,8 +2638,8 @@ "type": "LINE_TO", "coordinates": [ [ - 145.7349153941177, - 73.493332746948 + 89.7857894897461, + 151.062744140625 ] ] }, @@ -2554,28 +2647,17 @@ "type": "LINE_TO", "coordinates": [ [ - 149.85121295263525, - 73.493332746948 + 94.1959457397461, + 151.062744140625 ] ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path878)", - "type": "PATH" - }, - { - "x": 163.13532764915726, - "y": 65.71997192541312, - "rotation": 0.0, - "segments": [ + }, { - "type": "MOVE_TO", + "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 94.69343566894531, + 153.11947631835938 ] ] }, @@ -2583,8 +2665,8 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 92.82450103759766, + 153.11947631835938 ] ] }, @@ -2592,8 +2674,8 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 92.82450103759766, + 155.4047088623047 ] ] }, @@ -2601,8 +2683,8 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 94.62621307373047, + 155.4047088623047 ] ] }, @@ -2610,8 +2692,8 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 94.62621307373047, + 157.46142578125 ] ] }, @@ -2619,43 +2701,51 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 92.82450103759766, + 157.46142578125 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 68.10784031737421 - ], - [ - 188.90002678486053, - 66.88850203911716 + 92.82450103759766, + 160.3919219970703 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 187.68040015152656, - 65.71997192541312 - ], - [ - 186.2067038599198, - 65.71997192541312 + 94.69343566894531, + 160.39190673828125 ] ] - }, + } + ], + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "E", + "type": "PATH" + }, + { + "segments": [ { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 163.13532764915726, - 65.71997192541312 + 102.32234191894531, + 162.44862365722656 ] ] }, @@ -2663,8 +2753,8 @@ "type": "LINE_TO", "coordinates": [ [ - 163.13532764915726, - 108.75321853948117 + 102.32234191894531, + 162.44862365722656 ] ] }, @@ -2672,34 +2762,26 @@ "type": "LINE_TO", "coordinates": [ [ - 186.2067038599198, - 108.75321853948117 + 99.28363800048828, + 162.44862365722656 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 187.68042898703425, - 108.75321853948117 - ], - [ - 188.90002678486053, - 107.53388026122411 + 99.28363800048828, + 153.2001190185547 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 106.36535014752008 - ], - [ - 190.1196822537022, - 104.89191337548255 + 98.19454193115234, + 153.2001190185547 ] ] }, @@ -2707,17 +2789,17 @@ "type": "LINE_TO", "coordinates": [ [ - 190.1196822537022, - 69.58127708941174 + 98.19454193115234, + 162.44862365722656 ] ] }, { - "type": "MOVE_TO", + "type": "LINE_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 95.16928100585938, + 162.44862365722656 ] ] }, @@ -2725,8 +2807,8 @@ "type": "LINE_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 95.16928100585938, + 151.062744140625 ] ] }, @@ -2734,8 +2816,8 @@ "type": "LINE_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 98.19453430175781, + 151.062744140625 ] ] }, @@ -2743,26 +2825,34 @@ "type": "LINE_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 98.19453430175781, + 151.8155517578125 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 98.3021011352539, + 151.50636291503906 + ], + [ + 98.58445739746094, + 151.29127502441406 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 98.86681365966797, + 151.062744140625 + ], + [ + 99.18950653076172, + 151.062744140625 ] ] }, @@ -2770,26 +2860,34 @@ "type": "LINE_TO", "coordinates": [ [ - 178.6348167306278, - 100.97974237591552 + 101.28701782226562, + 151.062744140625 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 174.51851917211025, - 100.97974237591552 + 101.67694091796875, + 151.062744140625 + ], + [ + 101.99964141845703, + 151.38536071777344 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 174.51851917211025, - 73.493332746948 + 102.32233428955078, + 151.69454956054688 + ], + [ + 102.32233428955078, + 152.08438110351562 ] ] }, @@ -2797,28 +2895,33 @@ "type": "LINE_TO", "coordinates": [ [ - 178.6348167306278, - 73.493332746948 + 102.32234191894531, + 162.44862365722656 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path880)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "N", "type": "PATH" }, { - "x": 191.9189314271498, - "y": 65.71991425439774, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 210.46748709195526, - 73.493332746948 + 109.95082092285156, + 161.42698669433594 ] ] }, @@ -2826,44 +2929,34 @@ "type": "LINE_TO", "coordinates": [ [ - 210.46748709195526, - 73.493332746948 + 109.95082092285156, + 161.42698669433594 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 210.46748709195526, - 73.493332746948 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 109.95082092285156, + 161.81683349609375 + ], [ - 210.46748709195526, - 73.493332746948 + 109.62812805175781, + 162.1394500732422 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 210.46748709195526, - 73.493332746948 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 109.30543518066406, + 162.44862365722656 + ], [ - 210.46748709195526, - 73.493332746948 + 108.9155044555664, + 162.44862365722656 ] ] }, @@ -2871,8 +2964,8 @@ "type": "LINE_TO", "coordinates": [ [ - 208.58723897740128, - 65.71991425439774 + 102.81120300292969, + 162.44862365722656 ] ] }, @@ -2880,8 +2973,8 @@ "type": "LINE_TO", "coordinates": [ [ - 191.9189314271498, - 65.71991425439774 + 102.81120300292969, + 151.062744140625 ] ] }, @@ -2889,26 +2982,34 @@ "type": "LINE_TO", "coordinates": [ [ - 191.9189314271498, - 108.75316086846578 + 108.9155044555664, + 151.062744140625 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 208.58723897740128, - 108.75316086846578 + 109.30543518066406, + 151.062744140625 + ], + [ + 109.62812805175781, + 151.38536071777344 ] ] }, { - "type": "LINE_TO", + "type": "QUAD_TO", "coordinates": [ [ - 210.46748709195526, - 100.97968470490014 + 109.95082092285156, + 151.69454956054688 + ], + [ + 109.95082092285156, + 152.08438110351562 ] ] }, @@ -2916,17 +3017,17 @@ "type": "LINE_TO", "coordinates": [ [ - 203.4038257857319, - 100.97968470490014 + 109.95082092285156, + 161.42698669433594 ] ] }, { - "type": "LINE_TO", + "type": "MOVE_TO", "coordinates": [ [ - 203.4038257857319, - 92.34258508596395 + 106.91212463378906, + 160.3919219970703 ] ] }, @@ -2934,8 +3035,8 @@ "type": "LINE_TO", "coordinates": [ [ - 210.21344626919017, - 92.34258508596395 + 106.91212463378906, + 160.3919219970703 ] ] }, @@ -2943,8 +3044,8 @@ "type": "LINE_TO", "coordinates": [ [ - 210.21344626919017, - 84.56916659341368 + 106.91212463378906, + 153.11947631835938 ] ] }, @@ -2952,8 +3053,8 @@ "type": "LINE_TO", "coordinates": [ [ - 203.4038257857319, - 84.56916659341368 + 105.82303619384766, + 153.11947631835938 ] ] }, @@ -2961,8 +3062,8 @@ "type": "LINE_TO", "coordinates": [ [ - 203.4038257857319, - 73.49327507593262 + 105.82303619384766, + 160.3919219970703 ] ] }, @@ -2970,28 +3071,33 @@ "type": "LINE_TO", "coordinates": [ [ - 210.46748709195526, - 73.493332746948 + 106.91212463378906, + 160.3919219970703 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path882)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "D", "type": "PATH" }, { - "x": 68.54638478066772, - "y": 14.913306818794808, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 92.17673730803654, - 50.173019598281826 + 115.33451843261719, + 160.39190673828125 ] ] }, @@ -2999,8 +3105,8 @@ "type": "LINE_TO", "coordinates": [ [ - 92.17673730803654, - 50.173019598281826 + 115.33451843261719, + 160.39190673828125 ] ] }, @@ -3008,8 +3114,8 @@ "type": "LINE_TO", "coordinates": [ [ - 92.17673730803654, - 50.173019598281826 + 114.8370361328125, + 162.44862365722656 ] ] }, @@ -3017,8 +3123,8 @@ "type": "LINE_TO", "coordinates": [ [ - 92.17673730803654, - 50.173019598281826 + 110.4268798828125, + 162.44862365722656 ] ] }, @@ -3026,8 +3132,8 @@ "type": "LINE_TO", "coordinates": [ [ - 92.17673730803654, - 50.173019598281826 + 110.4268798828125, + 151.062744140625 ] ] }, @@ -3035,8 +3141,8 @@ "type": "LINE_TO", "coordinates": [ [ - 92.17673730803654, - 50.173019598281826 + 114.8370361328125, + 151.062744140625 ] ] }, @@ -3044,8 +3150,8 @@ "type": "LINE_TO", "coordinates": [ [ - 80.8951332786819, - 50.173019598281826 + 115.33451843261719, + 153.11947631835938 ] ] }, @@ -3053,8 +3159,8 @@ "type": "LINE_TO", "coordinates": [ [ - 80.8951332786819, - 41.535919979345636 + 113.46559143066406, + 153.11947631835938 ] ] }, @@ -3062,34 +3168,26 @@ "type": "LINE_TO", "coordinates": [ [ - 86.89165011624573, - 41.535919979345636 + 113.46559143066406, + 155.4047088623047 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 88.36537524336018, - 41.535919979345636 - ], - [ - 89.58500187669415, - 40.31658170108858 + 115.26730346679688, + 155.4047088623047 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 90.80462851002812, - 39.14805158738454 - ], - [ - 90.80462851002812, - 37.6746724863624 + 115.26730346679688, + 157.46142578125 ] ] }, @@ -3097,1010 +3195,51 @@ "type": "LINE_TO", "coordinates": [ [ - 90.80462851002812, - 18.77461198279343 + 113.46559143066406, + 157.46142578125 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 90.80462851002812, - 17.3011752107559 - ], - [ - 89.58500187669415, - 16.081836932498845 + 113.46559143066406, + 160.3919219970703 ] ] }, { - "type": "QUAD_TO", + "type": "LINE_TO", "coordinates": [ [ - 88.36537524336018, - 14.913306818794808 - ], - [ - 86.89165011624573, - 14.913306818794808 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 70.37582473066868, - 14.913306818794808 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 68.54638478066772, - 22.68672531134507 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 79.37062882252212, - 22.68672531134507 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 79.37062882252212, - 33.76261682882614 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 73.37411198495829, - 33.76261682882614 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 71.90038685784384, - 33.76261682882614 - ], - [ - 70.68076022450987, - 34.981955107083195 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 69.51194175572891, - 36.20129338534025 - ], - [ - 69.51194175572891, - 37.67473015737778 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 69.51194175572891, - 54.08530593987962 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 69.51194175572891, - 55.558685040901764 - ], - [ - 70.68076022450987, - 56.727272825621185 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 71.90038685784384, - 57.94661110387824 - ], - [ - 73.37411198495829, - 57.94661110387824 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 90.39813435809629, - 57.94661110387824 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 92.17673730803654, - 50.173019598281826 - ] - ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path884)", - "type": "PATH" - }, - { - "x": 94.05459207545209, - "y": 14.913249147779425, - "rotation": 0.0, - "segments": [ - { - "type": "MOVE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 110.72289962570358, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 94.05459207545209, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 94.05459207545209, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 110.72289962570358, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 50.173019598281826 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 105.53948643403419, - 50.173019598281826 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 105.53948643403419, - 41.535919979345636 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.34910691749246, - 41.535919979345636 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.34910691749246, - 33.76250148679537 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 105.53948643403419, - 33.76250148679537 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 105.53948643403419, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 112.60317657576525, - 22.686667640329688 - ] - ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path886)", - "type": "PATH" - }, - { - "x": 114.40164719050517, - "y": 14.913249147779425, - "rotation": 0.0, - "segments": [ - { - "type": "MOVE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 129.9519732720364, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 129.9519732720364, - 49.8682282819791 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 125.83570454902656, - 49.8682282819791 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 125.83570454902656, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 114.40164719050517, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 114.40164719050517, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 125.83567571351887, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 125.83567571351887, - 55.10123854687845 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 126.24222753646609, - 56.26982633159787 - ], - [ - 127.30940084063332, - 57.08275696444616 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 128.37657414480054, - 57.94649576184747 - ], - [ - 129.59620077813452, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 137.52380273031304, - 57.94649576184747 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 138.99752785742749, - 57.94649576184747 - ], - [ - 140.21718332626915, - 56.72715748359042 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 141.43680995960312, - 55.558569698871 - ], - [ - 141.43680995960312, - 54.08519059784885 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 141.43683879511082, - 14.913249147779425 - ] - ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path888)", - "type": "PATH" - }, - { - "x": 143.28450278597302, - "y": 14.913249147779425, - "rotation": 0.0, - "segments": [ - { - "type": "MOVE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 170.26888622602564, - 17.301117539740517 - ], - [ - 169.04925959269167, - 16.08177926148346 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 167.8296329593577, - 14.913249147779425 - ], - [ - 166.35587899673556, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 143.28450278597302, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 143.28450278597302, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 166.35587899673556, - 57.94649576184747 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 167.8296329593577, - 57.94649576184747 - ], - [ - 169.04925959269167, - 56.72715748359042 - ] - ] - }, - { - "type": "QUAD_TO", - "coordinates": [ - [ - 170.26888622602564, - 55.558569698871 - ], - [ - 170.26888622602564, - 54.08519059784885 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 170.26888622602564, - 18.774554311778047 - ] - ] - }, - { - "type": "MOVE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 50.173019598281826 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 154.66780965095677, - 50.173019598281826 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 154.66780965095677, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 158.78404953845893, - 22.686609969314304 - ] - ] - } - ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path890)", - "type": "PATH" - }, - { - "x": 172.06816423498094, - "y": 14.913249147779425, - "rotation": 0.0, - "segments": [ - { - "type": "MOVE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 188.73647178523242, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 172.06816423498094, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 172.06816423498094, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 188.73647178523242, - 57.94649576184747 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 50.173019598281826 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 183.55305859356304, - 50.173019598281826 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 183.55305859356304, - 41.535919979345636 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.3626790770213, - 41.535919979345636 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.3626790770213, - 33.76250148679537 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 183.55305859356304, - 33.76250148679537 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 183.55305859356304, - 22.686609969314304 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 190.6167198997864, - 22.686667640329688 + 115.33451843261719, + 160.39190673828125 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path892)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "E", "type": "PATH" }, { - "x": 192.4152770210494, - "y": 14.913249147779425, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 221.53389172740572, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 221.53389172740572, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 221.53389172740572, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 221.53389172740572, - 14.913249147779425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 221.53389172740572, - 14.913249147779425 + 123.51468658447266, + 162.44862365722656 ] ] }, @@ -4108,8 +3247,8 @@ "type": "LINE_TO", "coordinates": [ [ - 221.53389172740572, - 14.913249147779425 + 123.51468658447266, + 162.44862365722656 ] ] }, @@ -4117,8 +3256,8 @@ "type": "LINE_TO", "coordinates": [ [ - 209.6933113814448, - 14.913249147779425 + 120.38186645507812, + 162.44862365722656 ] ] }, @@ -4126,8 +3265,8 @@ "type": "LINE_TO", "coordinates": [ [ - 204.05250936676748, - 31.57780808203097 + 118.889404296875, + 158.03945922851562 ] ] }, @@ -4135,8 +3274,8 @@ "type": "LINE_TO", "coordinates": [ [ - 203.79852621501777, - 31.57780808203097 + 118.82220458984375, + 158.03945922851562 ] ] }, @@ -4144,8 +3283,8 @@ "type": "LINE_TO", "coordinates": [ [ - 203.79852621501777, - 14.913249147779425 + 118.82220458984375, + 162.44862365722656 ] ] }, @@ -4153,8 +3292,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.4152770210494, - 14.913249147779425 + 115.81038665771484, + 162.44862365722656 ] ] }, @@ -4162,8 +3301,8 @@ "type": "LINE_TO", "coordinates": [ [ - 192.4152770210494, - 57.94649576184747 + 115.81038665771484, + 151.062744140625 ] ] }, @@ -4171,8 +3310,8 @@ "type": "LINE_TO", "coordinates": [ [ - 214.72435775047052, - 57.94649576184747 + 121.71299743652344, + 151.062744140625 ] ] }, @@ -4180,12 +3319,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 216.19808287758497, - 57.94649576184747 + 122.10292053222656, + 151.062744140625 ], [ - 217.36690134636592, - 56.72715748359042 + 122.41217041015625, + 151.38536071777344 ] ] }, @@ -4193,12 +3332,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 218.5865568152076, - 55.558569698871 + 122.73487091064453, + 151.69454956054688 ], [ - 218.5865568152076, - 54.08519059784885 + 122.73487091064453, + 152.08438110351562 ] ] }, @@ -4206,8 +3345,8 @@ "type": "LINE_TO", "coordinates": [ [ - 218.5865568152076, - 35.43911324602959 + 122.73487091064453, + 157.017822265625 ] ] }, @@ -4215,12 +3354,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 218.5865568152076, - 34.270583132325555 + 122.73487091064453, + 157.32699584960938 ], [ - 217.77345316931314, - 33.20361167671217 + 122.51973724365234, + 157.6092987060547 ] ] }, @@ -4228,12 +3367,12 @@ "type": "QUAD_TO", "coordinates": [ [ - 216.9603495234187, - 32.18750605666719 + 122.30460357666016, + 157.87814331054688 ], [ - 215.84236805469845, - 31.781098411258426 + 122.00880432128906, + 157.9856719970703 ] ] }, @@ -4241,8 +3380,8 @@ "type": "LINE_TO", "coordinates": [ [ - 221.53389172740572, - 14.913249147779425 + 123.51468658447266, + 162.44862365722656 ] ] }, @@ -4250,44 +3389,8 @@ "type": "MOVE_TO", "coordinates": [ [ - 208.16880692528503, - 39.40203473913425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 208.16880692528503, - 39.40203473913425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 208.16880692528503, - 39.40203473913425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 208.16880692528503, - 39.40203473913425 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 208.16880692528503, - 39.40203473913425 + 119.97850799560547, + 155.96929931640625 ] ] }, @@ -4295,8 +3398,8 @@ "type": "LINE_TO", "coordinates": [ [ - 208.16880692528503, - 39.40203473913425 + 119.97850799560547, + 155.96929931640625 ] ] }, @@ -4304,8 +3407,8 @@ "type": "LINE_TO", "coordinates": [ [ - 208.16880692528503, - 50.173019598281826 + 119.97850799560547, + 153.11947631835938 ] ] }, @@ -4313,8 +3416,8 @@ "type": "LINE_TO", "coordinates": [ [ - 203.7984685440024, - 50.173019598281826 + 118.82218933105469, + 153.11947631835938 ] ] }, @@ -4322,8 +3425,8 @@ "type": "LINE_TO", "coordinates": [ [ - 203.7984685440024, - 39.40203473913425 + 118.82218933105469, + 155.96929931640625 ] ] }, @@ -4331,55 +3434,33 @@ "type": "LINE_TO", "coordinates": [ [ - 208.16880692528503, - 39.40203473913425 + 119.97850799560547, + 155.96929931640625 ] ] } ], - "cutDepth": 1.0, - "cutType": "POCKET", - "name": "Path (path894)", + "cutDepth": 5.0, + "cutType": "ON_PATH", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "R", "type": "PATH" }, { - "x": 0.5056594628840685, - "y": 12.906643838519813, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 29.172219915155438, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.172219915155438, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.172219915155438, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.172219915155438, - 158.80153862931184 + 72.6189956665039, + 124.37818145751953 ] ] }, @@ -4387,8 +3468,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.172219915155438, - 158.80153862931184 + 72.6189956665039, + 124.37818145751953 ] ] }, @@ -4396,8 +3477,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.172219915155438, - 158.80153862931184 + 65.0343017578125, + 127.71024322509766 ] ] }, @@ -4405,8 +3486,8 @@ "type": "LINE_TO", "coordinates": [ [ - 0.5056594628840685, - 146.20791899997857 + 72.6189956665039, + 162.9795379638672 ] ] }, @@ -4414,8 +3495,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.172219915155438, - 12.906643838519813 + 80.158447265625, + 127.71023559570312 ] ] }, @@ -4423,37 +3504,33 @@ "type": "LINE_TO", "coordinates": [ [ - 57.66778580681421, - 146.20794783548627 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.172219915155438, - 158.80153862931184 + 72.6189956665039, + 124.37818145751953 ] ] } ], - "cutDepth": 1.0, + "cutDepth": 5.0, "cutType": "ON_PATH", - "name": "Path (path5985)", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "Tool outline", "type": "PATH" }, { - "x": 0.5071589092840441, - "y": 143.19065798162774, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 29.17086464629392, - 158.79969315681956 + 72.61863708496094, + 124.37866973876953 ] ] }, @@ -4461,8 +3538,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17086464629392, - 158.79969315681956 + 72.61863708496094, + 124.37866973876953 ] ] }, @@ -4470,8 +3547,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17086464629392, - 158.79969315681956 + 65.03469848632812, + 127.71041870117188 ] ] }, @@ -4479,35 +3556,25 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17086464629392, - 158.79969315681956 + 65.0436019897461, + 127.74971771240234 ] ] }, { - "type": "LINE_TO", + "type": "CUBIC_TO", "coordinates": [ [ - 29.17086464629392, - 158.79969315681956 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 67.23835132178681, + 128.245079854905 + ], [ - 29.17086464629392, - 158.79969315681956 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 69.91787304875646, + 128.5116928376901 + ], [ - 0.5071589092840441, - 146.20725578330166 + 72.6701431274414, + 128.50856018066406 ] ] }, @@ -4515,26 +3582,25 @@ "type": "LINE_TO", "coordinates": [ [ - 0.5408099467604188, - 146.058724083181 + 72.67014312744139, + 128.50856018066406 ] ] }, { - "type": "LINE_TO", + "type": "CUBIC_TO", "coordinates": [ [ - 29.36553315872152, - 143.19065798162774 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ + 75.37169408618315, + 128.50250477384515 + ], + [ + 77.99469179699764, + 128.23678088164405 + ], [ - 57.63505750558397, - 146.054514099058 + 80.14978790283202, + 127.7508316040039 ] ] }, @@ -4542,8 +3608,8 @@ "type": "LINE_TO", "coordinates": [ [ - 57.66870854306035, - 146.20719811228628 + 80.15869140625, + 127.71043395996094 ] ] }, @@ -4551,8 +3617,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.170316771647776, - 158.79963548580417 + 72.61849212646484, + 124.3786849975586 ] ] }, @@ -4560,64 +3626,33 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17086464629392, - 158.79969315681956 + 72.61863708496094, + 124.37866973876953 ] ] } ], - "cutDepth": 1.0, + "cutDepth": 5.0, "cutType": "ON_PATH", - "name": "Path (path5987)", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "Tool top", "type": "PATH" }, { - "x": 23.117513023069478, - "y": 12.906643838519813, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 29.17224875066313, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 158.80153862931184 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 158.80153862931184 + 72.61900329589844, + 124.37818145751953 ] ] }, @@ -4625,8 +3660,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17224875066313, - 158.80153862931184 + 72.61900329589844, + 124.37818145751953 ] ] }, @@ -4634,8 +3669,8 @@ "type": "LINE_TO", "coordinates": [ [ - 23.117513023069478, - 143.17191490162804 + 71.01702117919922, + 128.51351928710938 ] ] }, @@ -4643,64 +3678,33 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17224875066313, - 12.906643838519813 + 72.61900329589844, + 162.9795379638672 ] ] } ], - "cutDepth": 1.0, + "cutDepth": 5.0, "cutType": "ON_PATH", - "name": "Path (path5989)", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "Tool highlight", "type": "PATH" }, { - "x": 29.17224875066313, - "y": 12.906643838519813, - "rotation": 0.0, "segments": [ { "type": "MOVE_TO", "coordinates": [ [ - 29.17224875066313, - 12.906643838519813 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 12.906643838519813 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 12.906643838519813 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 12.906643838519813 - ] - ] - }, - { - "type": "LINE_TO", - "coordinates": [ - [ - 29.17224875066313, - 12.906643838519813 + 72.61900329589844, + 162.9795379638672 ] ] }, @@ -4708,8 +3712,8 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17224875066313, - 12.906643838519813 + 72.61900329589844, + 162.9795379638672 ] ] }, @@ -4717,8 +3721,8 @@ "type": "LINE_TO", "coordinates": [ [ - 42.84590232059418, - 143.99470727810694 + 76.23682403564453, + 128.2958221435547 ] ] }, @@ -4726,19 +3730,27 @@ "type": "LINE_TO", "coordinates": [ [ - 29.17224875066313, - 158.80153862931184 + 72.61900329589844, + 124.37818145751953 ] ] } ], - "cutDepth": 1.0, + "cutDepth": 5.0, "cutType": "ON_PATH", - "name": "Path (path5991)", + "transform": { + "m00": 3.7795276641845703, + "m10": 0.0, + "m01": 0.0, + "m11": -3.7795276641845703, + "m02": -245.2932831516955, + "m12": 615.5459597736626 + }, + "name": "Tool shadow", "type": "PATH" } ], - "name": "Group (layer1)", + "name": "Universal Gcode Sender", "type": "GROUP" } ], diff --git a/ugs-core/src/com/willwinder/universalgcodesender/model/GUIBackend.java b/ugs-core/src/com/willwinder/universalgcodesender/model/GUIBackend.java index 696402e60d..cbd4b9a10c 100644 --- a/ugs-core/src/com/willwinder/universalgcodesender/model/GUIBackend.java +++ b/ugs-core/src/com/willwinder/universalgcodesender/model/GUIBackend.java @@ -658,7 +658,9 @@ public boolean canCancel() { @Override public boolean canSend() { - return isIdle() && (this.gcodeFile != null); + return isIdle() && + controller.getControllerStatus().getState() != ControllerState.ALARM && + this.gcodeFile != null; } @Override diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/actions/ToolDrawTextAction.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/actions/ToolDrawTextAction.java new file mode 100644 index 0000000000..04beff8762 --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/actions/ToolDrawTextAction.java @@ -0,0 +1,49 @@ +/* + Copyright 2021 Will Winder + + This file is part of Universal Gcode Sender (UGS). + + UGS is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + UGS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with UGS. If not, see . + */ +package com.willwinder.ugs.nbp.designer.actions; + +import com.willwinder.ugs.nbp.designer.logic.Controller; +import com.willwinder.ugs.nbp.designer.logic.Tool; +import org.openide.util.ImageUtilities; + +import javax.swing.*; +import java.awt.event.ActionEvent; + +/** + * @author Joacim Breiler + */ +public class ToolDrawTextAction extends AbstractAction { + private static final String SMALL_ICON_PATH = "img/text.png"; + private static final String LARGE_ICON_PATH = "img/text24.png"; + private final Controller controller; + + public ToolDrawTextAction(Controller controller) { + putValue("iconBase", SMALL_ICON_PATH); + putValue(SMALL_ICON, ImageUtilities.loadImageIcon(SMALL_ICON_PATH, false)); + putValue(LARGE_ICON_KEY, ImageUtilities.loadImageIcon(LARGE_ICON_PATH, false)); + putValue("menuText", "Draw text"); + putValue(NAME, "Draw text"); + this.controller = controller; + } + + @Override + public void actionPerformed(ActionEvent e) { + controller.setTool(Tool.TEXT); + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/AbstractEntity.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/AbstractEntity.java index ed48ec9ce5..63795f6564 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/AbstractEntity.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/AbstractEntity.java @@ -81,6 +81,20 @@ public Size getSize() { return new Size(bounds.getWidth(), bounds.getHeight()); } + @Override + public void setSize(Size size) { + if (size.getWidth() < 0.1) { + size = new Size(0.1, size.getHeight()); + } + + if (size.getHeight() < 0.1) { + size = new Size(size.getWidth(), 0.1); + } + + Size currentSize = getSize(); + scale(size.getWidth() / currentSize.getWidth(), size.getHeight() / currentSize.getHeight()); + } + @Override public Rectangle2D getBounds() { return getShape().getBounds2D(); @@ -93,7 +107,8 @@ public Shape getShape() { @Override public Point2D getPosition() { - return new Point2D.Double(getBounds().getX(), getBounds().getY()); + Rectangle2D bounds = getBounds(); + return new Point2D.Double(bounds.getX(), bounds.getY()); } @Override @@ -110,7 +125,8 @@ public Point2D getCenter() { @Override public void setCenter(Point2D center) { - setPosition(new Point2D.Double(center.getX() - (getSize().getWidth() / 2d), center.getY() - (getSize().getHeight() / 2d))); + Size size = getSize(); + setPosition(new Point2D.Double(center.getX() - (size.getWidth() / 2d), center.getY() - (size.getHeight() / 2d))); } @@ -164,8 +180,9 @@ public void rotate(double angle) { @Override public void scale(double sx, double sy) { Point2D originalPosition = getPosition(); - transform.concatenate(AffineTransform.getScaleInstance(sx, sy)); + transform.preConcatenate(AffineTransform.getScaleInstance(sx, sy)); + // Restore position Point2D currentPosition = getPosition(); transform.preConcatenate(AffineTransform.getTranslateInstance(originalPosition.getX() - currentPosition.getX(), originalPosition.getY() - currentPosition.getY())); notifyEvent(new EntityEvent(this, EventType.RESIZED)); @@ -203,4 +220,14 @@ public String getName() { public String toString() { return getName(); } + + public void setWidth(double width) { + Size size = getSize(); + setSize(new Size(width, size.getHeight())); + } + + public void setHeight(double height) { + Size size = getSize(); + setSize(new Size(size.getWidth(), height)); + } } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EntityException.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EntityException.java new file mode 100644 index 0000000000..3e0f5eae29 --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EntityException.java @@ -0,0 +1,28 @@ +/* + Copyright 2021 Will Winder + + This file is part of Universal Gcode Sender (UGS). + + UGS is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + UGS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with UGS. If not, see . + */ +package com.willwinder.ugs.nbp.designer.entities; + +/** + * @author Joacim Breiler + */ +public class EntityException extends RuntimeException { + public EntityException(Exception e) { + super(e); + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EventType.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EventType.java index 3296ed379c..9069e6072e 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EventType.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/EventType.java @@ -30,5 +30,6 @@ public enum EventType { MOUSE_PRESSED, MOUSE_DRAGGED, MOUSE_RELEASED, - SETTINGS_CHANGED; + SETTINGS_CHANGED, + KEY_PRESSED } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/AbstractControl.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/AbstractControl.java index 65c696bbb8..7325d2471c 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/AbstractControl.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/AbstractControl.java @@ -36,11 +36,6 @@ protected AbstractControl(SelectionManager selectionManager) { this.selectionManager = selectionManager; } - @Override - public void setSize(Size size) { - // Never mind... - } - @Override public Optional getHoverCursor() { return Optional.empty(); diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateEllipseControl.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateEllipseControl.java index c635d53ea6..d9faa10d23 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateEllipseControl.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateEllipseControl.java @@ -103,6 +103,6 @@ private void createEntity() { @Override public String toString() { - return "CreateRectangleControl"; + return "CreateEllipseControl"; } } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateTextControl.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateTextControl.java new file mode 100644 index 0000000000..e8f27c713c --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/CreateTextControl.java @@ -0,0 +1,105 @@ +/* + Copyright 2021 Will Winder + + This file is part of Universal Gcode Sender (UGS). + + UGS is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + UGS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with UGS. If not, see . + */ +package com.willwinder.ugs.nbp.designer.entities.controls; + +import com.willwinder.ugs.nbp.designer.actions.AddAction; +import com.willwinder.ugs.nbp.designer.entities.EntityEvent; +import com.willwinder.ugs.nbp.designer.entities.EventType; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Text; +import com.willwinder.ugs.nbp.designer.gui.Drawing; +import com.willwinder.ugs.nbp.designer.gui.MouseEntityEvent; +import com.willwinder.ugs.nbp.designer.logic.Controller; +import com.willwinder.ugs.nbp.designer.logic.Tool; +import com.willwinder.universalgcodesender.uielements.helpers.ThemeColors; + +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; + +/** + * A control that will create a new ellipse + * + * @author Joacim Breiler + */ +public class CreateTextControl extends AbstractControl { + + private final Controller controller; + private Point2D startPosition; + private Point2D endPosition; + private boolean isPressed; + + public CreateTextControl(Controller controller) { + super(controller.getSelectionManager()); + this.controller = controller; + } + + @Override + public void render(Graphics2D graphics, Drawing drawing) { + if (isPressed) { + double startX = Math.min(startPosition.getX(), endPosition.getX()); + double endX = Math.max(startPosition.getX(), endPosition.getX()); + double startY = Math.min(startPosition.getY(), endPosition.getY()); + double endY = Math.max(startPosition.getY(), endPosition.getY()); + Rectangle2D.Double rect = new Rectangle2D.Double(startX, startY, endX - startX, endY - startY); + graphics.setColor(ThemeColors.LIGHT_BLUE_GREY); + graphics.draw(rect); + } + } + + @Override + public boolean isWithin(Point2D point) { + return controller.getTool() == Tool.TEXT; + } + + @Override + public void onEvent(EntityEvent entityEvent) { + if (entityEvent instanceof MouseEntityEvent) { + MouseEntityEvent mouseEntityEvent = (MouseEntityEvent) entityEvent; + startPosition = mouseEntityEvent.getStartMousePosition(); + endPosition = mouseEntityEvent.getCurrentMousePosition(); + + if (mouseEntityEvent.getType() == EventType.MOUSE_PRESSED) { + isPressed = true; + } else if (mouseEntityEvent.getType() == EventType.MOUSE_DRAGGED) { + isPressed = true; + } else if (mouseEntityEvent.getType() == EventType.MOUSE_RELEASED) { + isPressed = false; + createEntity(); + } + } + } + + private void createEntity() { + double startX = Math.min(startPosition.getX(), endPosition.getX()); + double startY = Math.min(startPosition.getY(), endPosition.getY()); + + Text text = new Text(startX, startY); + AddAction addAction = new AddAction(controller, text); + addAction.actionPerformed(new ActionEvent(this, 0, "")); + controller.addEntity(text); + controller.setTool(Tool.SELECT); + controller.getSelectionManager().addSelection(text); + } + + @Override + public String toString() { + return "CreateTextControl"; + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/EditTextControl.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/EditTextControl.java new file mode 100644 index 0000000000..ede143146b --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/EditTextControl.java @@ -0,0 +1,66 @@ +package com.willwinder.ugs.nbp.designer.entities.controls; + +import com.willwinder.ugs.nbp.designer.entities.Entity; +import com.willwinder.ugs.nbp.designer.entities.EntityEvent; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Text; +import com.willwinder.ugs.nbp.designer.gui.Colors; +import com.willwinder.ugs.nbp.designer.gui.Drawing; +import com.willwinder.ugs.nbp.designer.logic.Controller; + +import java.awt.*; +import java.awt.geom.Line2D; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; +import java.util.List; + +public class EditTextControl extends AbstractControl { + + private final Controller controller; + private long previousTime = 0; + + public EditTextControl(Controller controller) { + super(controller.getSelectionManager()); + this.controller = controller; + this.previousTime = System.currentTimeMillis(); + } + + @Override + public boolean isWithin(Point2D point) { + return isTextEntitySelected(); + } + + private boolean isTextEntitySelected() { + boolean isTextEntity = false; + List selection = controller.getSelectionManager().getSelection(); + if (!selection.isEmpty()) { + Entity entity = selection.get(0); + isTextEntity = entity instanceof Text; + } + return isTextEntity; + } + + @Override + public void render(Graphics2D graphics, Drawing drawing) { + if (!isTextEntitySelected()) { + return; + } + + if (previousTime + 600 < System.currentTimeMillis()) { + graphics.setColor(Colors.CURSOR); + graphics.setStroke(new BasicStroke(Double.valueOf(1 / drawing.getScale()).floatValue())); + Rectangle2D bounds = getRelativeShape().getBounds2D(); + Line2D line = new Line2D.Double(bounds.getX() + bounds.getWidth(), bounds.getY(), bounds.getX() + bounds.getWidth(), bounds.getY() + bounds.getHeight()); + graphics.draw(getSelectionManager().getTransform().createTransformedShape(line)); + + } + + if (previousTime + 1200 < System.currentTimeMillis()) { + previousTime = System.currentTimeMillis(); + } + } + + @Override + public void onEvent(EntityEvent entityEvent) { + + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/GridControl.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/GridControl.java index 7a50f2b5c0..fd148782f9 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/GridControl.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/GridControl.java @@ -26,6 +26,7 @@ This file is part of Universal Gcode Sender (UGS). import com.willwinder.ugs.nbp.designer.model.Size; import java.awt.*; +import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.util.Optional; @@ -68,13 +69,34 @@ public void render(Graphics2D graphics, Drawing drawing) { } + + AffineTransform affineTransform = AffineTransform.getScaleInstance(1 / drawing.getScale(), -1 / drawing.getScale()); + affineTransform.rotate(Math.PI/2); + Font font = new Font(null, Font.PLAIN, 10).deriveFont(affineTransform); + graphics.setFont(font); + FontMetrics fontMetrics = graphics.getFontMetrics(); + graphics.setStroke(new BasicStroke(Double.valueOf(0.2 / drawing.getScale()).floatValue())); for (int x = 0; x <= width; x += LARGE_GRID_SIZE) { graphics.drawLine(x, 0, x, height); + + String text = x + " mm"; + int y = -fontMetrics.stringWidth(text); + graphics.drawString(text, x - (int) Math.round(3 / drawing.getScale()), y - (int) Math.round(8 / drawing.getScale())); } + + affineTransform = AffineTransform.getScaleInstance(1 / drawing.getScale(), -1 / drawing.getScale()); + font = new Font(null, Font.PLAIN, 10).deriveFont(affineTransform); + graphics.setFont(font); + fontMetrics = graphics.getFontMetrics(); + for (int y = 0; y <= height; y += LARGE_GRID_SIZE) { graphics.drawLine(0, y, width, y); + + String text = y + " mm"; + int x = -fontMetrics.stringWidth(text); + graphics.drawString(text, x - (int) Math.round(8 / drawing.getScale()), y - (int) Math.round(3 / drawing.getScale())); } } @@ -83,10 +105,6 @@ public Optional getHoverCursor() { return Optional.empty(); } - @Override - public void setSize(Size size) { - - } @Override public Shape getShape() { diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/RotationControl.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/RotationControl.java index f154cdcfe6..106d290aa6 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/RotationControl.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/controls/RotationControl.java @@ -45,7 +45,7 @@ public class RotationControl extends AbstractControl { public static final int MARGIN = 16; private final Ellipse2D.Double shape; - private final Cursor cursor; + private Cursor cursor; private Point2D startPosition = new Point2D.Double(); private double startRotation = 0d; private Point2D center; @@ -54,7 +54,12 @@ public class RotationControl extends AbstractControl { public RotationControl(SelectionManager selectionManager) { super(selectionManager); shape = new Ellipse2D.Double(0, 0, SIZE, SIZE); - cursor = Toolkit.getDefaultToolkit().createCustomCursor(ImageUtilities.loadImage("img/cursors/rotate.svg", false), new Point(8, 8), "rotater"); + + try { + cursor = Toolkit.getDefaultToolkit().createCustomCursor(ImageUtilities.loadImage("img/cursors/rotate.svg", false), new Point(8, 8), "rotater"); + } catch (HeadlessException e) { + cursor = null; + } } private void updatePosition(Drawing drawing) { @@ -91,7 +96,7 @@ public Shape getRelativeShape() { @Override public Optional getHoverCursor() { - return Optional.of(cursor); + return Optional.ofNullable(cursor); } @Override diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Ellipse.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Ellipse.java index ce09c4531f..b8a4a82db0 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Ellipse.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Ellipse.java @@ -18,9 +18,7 @@ This file is part of Universal Gcode Sender (UGS). */ package com.willwinder.ugs.nbp.designer.entities.cuttable; -import com.willwinder.ugs.nbp.designer.model.Size; - -import java.awt.*; +import java.awt.Shape; import java.awt.geom.Ellipse2D; /** @@ -37,16 +35,11 @@ public Ellipse(double relativeX, double relativeY) { } public Ellipse() { - this.shape = new Ellipse2D.Double(0, 0, 10, 10); + this(0,0); } @Override public Shape getRelativeShape() { return shape; } - - @Override - public void setSize(Size size) { - this.shape.setFrame(0, 0, size.getWidth(), size.getHeight()); - } } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Path.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Path.java index 81ae149821..22686784d6 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Path.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Path.java @@ -18,11 +18,12 @@ This file is part of Universal Gcode Sender (UGS). */ package com.willwinder.ugs.nbp.designer.entities.cuttable; -import com.willwinder.ugs.nbp.designer.model.Size; +import com.willwinder.ugs.nbp.designer.entities.EntityException; -import java.awt.*; -import java.awt.geom.Arc2D; +import java.awt.Shape; +import java.awt.geom.NoninvertibleTransformException; import java.awt.geom.Path2D; +import java.awt.geom.Point2D; /** * @author Joacim Breiler @@ -42,31 +43,43 @@ public Shape getRelativeShape() { return shape; } - @Override - public void setSize(Size size) { - if (size.getWidth() < 2) { - size = new Size(2, size.getHeight()); - } - - if (size.getHeight() < 2) { - size = new Size(size.getWidth(), 2); - } - } - public void moveTo(double x, double y) { - shape.moveTo(x, y); + try { + Point2D relativePoint = getTransform().inverseTransform(new Point2D.Double(x, y), null); + shape.moveTo(relativePoint.getX(), relativePoint.getY()); + } catch (NoninvertibleTransformException e) { + throw new EntityException(e); + } } public void lineTo(double x, double y) { - shape.lineTo(x, y); + try { + Point2D relativePoint = getTransform().inverseTransform(new Point2D.Double(x, y), null); + shape.lineTo(relativePoint.getX(), relativePoint.getY()); + } catch (NoninvertibleTransformException e) { + throw new EntityException(e); + } } public void quadTo(double x1, double y1, double x2, double y2) { - shape.quadTo(x1, y1, x2, y2); + try { + Point2D relativePoint1 = getTransform().inverseTransform(new Point2D.Double(x1, y1), null); + Point2D relativePoint2 = getTransform().inverseTransform(new Point2D.Double(x2, y2), null); + shape.quadTo(relativePoint1.getX(), relativePoint1.getY(), relativePoint2.getX(), relativePoint2.getY()); + } catch (NoninvertibleTransformException e) { + throw new EntityException(e); + } } public void curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { - shape.curveTo(x1, y1, x2, y2, x3, y3); + try { + Point2D relativePoint1 = getTransform().inverseTransform(new Point2D.Double(x1, y1), null); + Point2D relativePoint2 = getTransform().inverseTransform(new Point2D.Double(x2, y2), null); + Point2D relativePoint3 = getTransform().inverseTransform(new Point2D.Double(x3, y3), null); + shape.curveTo(relativePoint1.getX(), relativePoint1.getY(), relativePoint2.getX(), relativePoint2.getY(), relativePoint3.getX(), relativePoint3.getY()); + } catch (NoninvertibleTransformException e) { + throw new EntityException(e); + } } public void append(Shape s) { diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Rectangle.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Rectangle.java index a8e8cd8a07..eb7e380dda 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Rectangle.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Rectangle.java @@ -18,11 +18,7 @@ This file is part of Universal Gcode Sender (UGS). */ package com.willwinder.ugs.nbp.designer.entities.cuttable; -import com.willwinder.ugs.nbp.designer.entities.EntityEvent; -import com.willwinder.ugs.nbp.designer.entities.EventType; -import com.willwinder.ugs.nbp.designer.model.Size; - -import java.awt.*; +import java.awt.Shape; import java.awt.geom.Rectangle2D; /** @@ -52,27 +48,4 @@ public Rectangle(double x, double y) { public Shape getRelativeShape() { return shape; } - - @Override - public void setSize(Size size) { - if (size.getWidth() < 2) { - size = new Size(2, size.getHeight()); - } - - if (size.getHeight() < 2) { - size = new Size(size.getWidth(), 2); - } - shape.setFrame(0, 0, size.getWidth(), size.getHeight()); - notifyEvent(new EntityEvent(this, EventType.RESIZED)); - } - - public void setWidth(double width) { - shape.setFrame(0, 0, width, shape.getHeight()); - notifyEvent(new EntityEvent(this, EventType.RESIZED)); - } - - public void setHeight(double height) { - shape.setFrame(0, 0, shape.getWidth(), height); - notifyEvent(new EntityEvent(this, EventType.RESIZED)); - } } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Text.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Text.java new file mode 100644 index 0000000000..54a5c15dfb --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/entities/cuttable/Text.java @@ -0,0 +1,66 @@ +package com.willwinder.ugs.nbp.designer.entities.cuttable; + +import org.apache.commons.lang3.StringUtils; + +import java.awt.Font; +import java.awt.Graphics2D; +import java.awt.Shape; +import java.awt.font.GlyphVector; +import java.awt.geom.AffineTransform; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; + +public class Text extends AbstractCuttable { + private String text; + private String fontFamily; + private Shape shape; + + private AffineTransform transform = AffineTransform.getScaleInstance(1, -1); + + public Text(double x, double y) { + super(x, y); + text = ""; + fontFamily = Font.SANS_SERIF; + regenerateShape(); + } + + public Text() { + this(0, 0); + } + + private void regenerateShape() { + if (StringUtils.isNotEmpty(text)) { + BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); + Graphics2D g2 = img.createGraphics(); + Font font = new Font(this.fontFamily, Font.PLAIN, 18); + GlyphVector glyphVector = font.createGlyphVector(g2.getFontRenderContext(), text); + shape = transform.createTransformedShape(glyphVector.getOutline(0, 0)); + } else { + // Create a temporary shape + shape = transform.createTransformedShape(new Rectangle2D.Double(0, 0, 2, 12)); + } + } + + @Override + public Shape getRelativeShape() { + return shape; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + regenerateShape(); + } + + public String getFontFamily() { + return fontFamily; + } + + public void setFontFamily(String fontFamily) { + this.fontFamily = fontFamily; + regenerateShape(); + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Colors.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Colors.java index d599c3f4b9..08ca30a57b 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Colors.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Colors.java @@ -31,9 +31,10 @@ private Colors() { } public static final Color SHAPE_HINT = new Color(190, 190, 190); - public static final Color SHAPE_OUTLINE = new Color(144, 183, 252); - public static final Color CONTROL_BORDER = new Color(144, 183, 252); + public static final Color SHAPE_OUTLINE = new Color(122, 161, 228); + public static final Color CONTROL_BORDER = new Color(122, 161, 228); public static final Color CONTROL_HANDLE = Color.GRAY; public static final Color BACKGROUND = new Color(246, 246, 246); + public static final Color CURSOR = new Color(246, 132, 38); } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Drawing.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Drawing.java index 361626ba65..d30565fa80 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Drawing.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/Drawing.java @@ -77,6 +77,8 @@ public Drawing(Controller controller) { controlsRoot.addChild(new SelectionControl(controller)); controlsRoot.addChild(new CreateRectangleControl(controller)); controlsRoot.addChild(new CreateEllipseControl(controller)); + controlsRoot.addChild(new CreateTextControl(controller)); + controlsRoot.addChild(new EditTextControl(controller)); setBackground(Colors.BACKGROUND); setScale(2); diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/FontDropDownRenderer.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/FontDropDownRenderer.java new file mode 100644 index 0000000000..7c751bdf9e --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/FontDropDownRenderer.java @@ -0,0 +1,46 @@ +package com.willwinder.ugs.nbp.designer.gui; + +import net.miginfocom.swing.MigLayout; + +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import java.awt.Component; +import java.awt.Font; + +public class FontDropDownRenderer extends JPanel implements javax.swing.ListCellRenderer { + + public static final int PREVIEW_FONT_SIZE = 10; + private final JLabel label; + private final JLabel preview; + + FontDropDownRenderer() { + setLayout(new MigLayout("insets 0")); + setBorder(new EmptyBorder(0, 0, 0, 0)); + setOpaque(true); + + label = new JLabel(); + add(label); + + preview = new JLabel("ABCDEF"); + preview.setEnabled(false); + add(preview); + } + + @Override + public Component getListCellRendererComponent(JList list, String value, int index, boolean isSelected, boolean cellHasFocus) { + if (isSelected) { + setBackground(list.getSelectionBackground()); + setForeground(list.getSelectionForeground()); + } else { + setBackground(list.getBackground()); + setForeground(list.getForeground()); + } + + Font font = new Font(value, Font.PLAIN, PREVIEW_FONT_SIZE); + label.setText(font.getFamily()); + preview.setFont(font); + return this; + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/KeyEntityEvent.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/KeyEntityEvent.java new file mode 100644 index 0000000000..6fb791a5d4 --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/KeyEntityEvent.java @@ -0,0 +1,46 @@ +/* + Copyright 2021 Will Winder + + This file is part of Universal Gcode Sender (UGS). + + UGS is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + UGS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with UGS. If not, see . + */ +package com.willwinder.ugs.nbp.designer.gui; + +import com.willwinder.ugs.nbp.designer.entities.Entity; +import com.willwinder.ugs.nbp.designer.entities.EntityEvent; +import com.willwinder.ugs.nbp.designer.entities.EventType; +import com.willwinder.ugs.nbp.designer.entities.controls.Control; + +import java.awt.geom.Point2D; + +/** + * @author Joacim Breiler + */ +public class KeyEntityEvent extends EntityEvent { + + private final char key; + private boolean shiftPressed; + private boolean altPressed; + private boolean ctrlPressed; + + public KeyEntityEvent(Entity entity, EventType type, char key) { + super(entity, type); + this.key = key; + } + + public char getKey() { + return key; + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/SelectionSettingsPanel.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/SelectionSettingsPanel.java index da11611fc6..c03a3bb7a1 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/SelectionSettingsPanel.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/SelectionSettingsPanel.java @@ -26,6 +26,7 @@ This file is part of Universal Gcode Sender (UGS). import com.willwinder.ugs.nbp.designer.entities.EventType; import com.willwinder.ugs.nbp.designer.entities.cuttable.CutType; import com.willwinder.ugs.nbp.designer.entities.cuttable.Cuttable; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Text; import com.willwinder.ugs.nbp.designer.entities.selection.SelectionEvent; import com.willwinder.ugs.nbp.designer.entities.selection.SelectionListener; import com.willwinder.ugs.nbp.designer.logic.Controller; @@ -33,13 +34,25 @@ This file is part of Universal Gcode Sender (UGS). import net.miginfocom.swing.MigLayout; import org.apache.commons.lang3.StringUtils; -import javax.swing.*; +import javax.swing.DefaultListCellRenderer; +import javax.swing.JComboBox; +import javax.swing.JFormattedTextField; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JSeparator; +import javax.swing.JSpinner; +import javax.swing.JTextField; +import javax.swing.SpinnerNumberModel; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.text.DefaultFormatter; -import java.awt.*; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.GraphicsEnvironment; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.geom.Point2D; @@ -55,12 +68,19 @@ public class SelectionSettingsPanel extends JPanel implements SelectionListener, private final JTextField posYTextField; private final JLabel cutDepthLabel; private final JComboBox cutTypeComboBox; - private transient Controller controller; private final JSpinner depthSpinner; private final JTextField heightTextField; + private JLabel textLabel; + private JComboBox fontDropDown; + private JLabel fontLabel; + private JSeparator fontSeparator; + private JTextField textTextField; + private transient Controller controller; public SelectionSettingsPanel(Controller controller) { - setLayout(new MigLayout("fill, wrap 2", "[] 10 [grow]")); + setLayout(new MigLayout("fill, wrap 2, hidemode 3", "[sg label] 10 [grow]")); + + addTextSettingFields(); posXTextField = new JTextField("0"); posXTextField.getDocument().addDocumentListener(this); @@ -136,6 +156,34 @@ public Component getListCellRendererComponent(JList list, Object value, int i depthSpinner.setModel(new SpinnerNumberModel(controller.getSettings().getStockThickness(), 0d, controller.getSettings().getStockThickness(), 0.1d)); } + private void addTextSettingFields() { + textTextField = new JTextField(); + textTextField.setVisible(false); + textTextField.getDocument().addDocumentListener(this); + textLabel = new JLabel("Text", SwingConstants.RIGHT); + textLabel.setVisible(false); + + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + String[] fontNames = Arrays.stream(ge.getAvailableFontFamilyNames()).distinct().toArray(String[]::new); + fontDropDown = new JComboBox<>(fontNames); + fontDropDown.setRenderer(new FontDropDownRenderer()); + fontDropDown.addItemListener(this); + fontDropDown.setVisible(false); + Dimension minimumSize = fontDropDown.getMinimumSize(); + fontDropDown.setMinimumSize(new Dimension(100, minimumSize.height)); + + fontLabel = new JLabel("Font", SwingConstants.RIGHT); + fontLabel.setVisible(false); + fontSeparator = new JSeparator(SwingConstants.HORIZONTAL); + fontSeparator.setVisible(false); + + add(textLabel, "grow"); + add(textTextField, "grow"); + add(fontLabel, "grow"); + add(fontDropDown, "grow"); + add(fontSeparator, "grow, spanx, wrap"); + } + @Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); @@ -226,6 +274,15 @@ public void changedUpdate(DocumentEvent e) { } } + if (!controller.getSelectionManager().isEmpty()) { + Entity entity = controller.getSelectionManager().getSelection().get(0); + if (entity instanceof Text) { + ((Text) entity).setText(textTextField.getText()); + ((Text) entity).setFontFamily((String) fontDropDown.getSelectedItem()); + } + controller.getDrawing().repaint(); + } + controller.getSelectionManager().addListener(this); } @@ -236,6 +293,7 @@ public void stateChanged(ChangeEvent e) { } CutType cutType = (CutType) cutTypeComboBox.getSelectedItem(); + String fontFamily = (String) fontDropDown.getSelectedItem(); controller.getSelectionManager().getSelection().forEach(selectedEntity -> { if (selectedEntity instanceof Cuttable) { Cuttable cuttable = (Cuttable) selectedEntity; @@ -243,6 +301,12 @@ public void stateChanged(ChangeEvent e) { controller.getUndoManager().addAction(changeCutSettingsAction); changeCutSettingsAction.actionPerformed(null); } + + if (selectedEntity instanceof Text) { + // TODO fix undoable action + Text text = (Text) selectedEntity; + text.setFontFamily(fontFamily); + } }); onEvent(new EntityEvent(controller.getSelectionManager(), EventType.SETTINGS_CHANGED)); } @@ -268,6 +332,16 @@ public void onEvent(EntityEvent entityEvent) { cutDepthLabel.setEnabled(hasCutTypeSelection); } + boolean isTextCuttable = selectedEntity instanceof Text; + textTextField.setVisible(isTextCuttable); + textLabel.setVisible(isTextCuttable); + fontLabel.setVisible(isTextCuttable); + fontDropDown.setVisible(isTextCuttable); + fontSeparator.setVisible(isTextCuttable); + if (isTextCuttable) { + setFieldValue(textTextField, ((Text) selectedEntity).getText()); + setFieldValue(fontDropDown, ((Text) selectedEntity).getFontFamily()); + } Point2D position = controller.getSelectionManager().getPosition(); setFieldValue(posXTextField, Utils.toString(position.getX())); diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/ToolBox.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/ToolBox.java index 0bc72f5d35..17cdb2efa6 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/ToolBox.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/gui/ToolBox.java @@ -55,6 +55,10 @@ public ToolBox(Controller controller) { circle.setToolTipText("Draw circles and ellipses"); add(circle); + JToggleButton text = new JToggleButton(new ToolDrawTextAction(controller)); + text.setText(""); + text.setToolTipText("Write text"); + add(text); JButton insert = new JButton(new ToolInsertAction(controller)); insert.setText(""); @@ -150,6 +154,7 @@ public ToolBox(Controller controller) { buttons.add(select); buttons.add(circle); buttons.add(rectangle); + buttons.add(text); buttons.add(insert); controller.addListener(event -> { @@ -166,6 +171,9 @@ public ToolBox(Controller controller) { case CIRCLE: circle.setSelected(true); break; + case TEXT: + text.setSelected(true); + break; case INSERT: insert.setSelected(true); break; diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReader.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReader.java index f55f1d0af7..ddee9375d7 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReader.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReader.java @@ -89,6 +89,7 @@ private Gson getParser() { entityAdapterFactory.registerSubtype(EntityGroupV1.class, EntityTypeV1.GROUP.name()); entityAdapterFactory.registerSubtype(EntityRectangleV1.class, EntityTypeV1.RECTANGLE.name()); entityAdapterFactory.registerSubtype(EntityEllipseV1.class, EntityTypeV1.ELLIPSE.name()); + entityAdapterFactory.registerSubtype(EntityTextV1.class, EntityTypeV1.TEXT.name()); return new GsonBuilder() .registerTypeAdapterFactory(entityAdapterFactory) diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignWriter.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignWriter.java index 1f0a09e5a2..5315d74ae6 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignWriter.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignWriter.java @@ -5,15 +5,29 @@ import com.willwinder.ugs.nbp.designer.Utils; import com.willwinder.ugs.nbp.designer.entities.Entity; import com.willwinder.ugs.nbp.designer.entities.EntityGroup; -import com.willwinder.ugs.nbp.designer.entities.cuttable.*; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Cuttable; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Ellipse; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Path; import com.willwinder.ugs.nbp.designer.entities.cuttable.Rectangle; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Text; import com.willwinder.ugs.nbp.designer.io.DesignWriter; -import com.willwinder.ugs.nbp.designer.io.ugsd.v1.*; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.CutTypeV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.CuttableEntityV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.DesignV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityEllipseV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityGroupV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityPathSegmentV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityPathTypeV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityPathV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityRectangleV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityTextV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.EntityV1; +import com.willwinder.ugs.nbp.designer.io.ugsd.v1.SettingsV1; import com.willwinder.ugs.nbp.designer.logic.Controller; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import java.awt.*; +import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.PathIterator; import java.io.File; @@ -65,6 +79,8 @@ private EntityV1 convertToEntity(Entity entity) { result = parseEllipse(entity); } else if (entity instanceof Path) { result = parsePath(entity); + } else if (entity instanceof Text) { + result = parseText((Text) entity); } else { return null; } @@ -80,32 +96,30 @@ private EntityV1 convertToEntity(Entity entity) { return result; } + private EntityV1 parseText(Text entity) { + EntityTextV1 text = new EntityTextV1(); + text.setTransform(entity.getTransform()); + text.setText(entity.getText()); + text.setFontName(entity.getFontFamily()); + return text; + } + private EntityV1 parsePath(Entity entity) { EntityPathV1 path = new EntityPathV1(); - path.setX(entity.getPosition().getX()); - path.setY(entity.getPosition().getY()); - path.setRotation(entity.getRotation()); + path.setTransform(entity.getTransform()); path.setSegments(convertPathToSegments(entity)); return path; } private EntityV1 parseEllipse(Entity entity) { EntityEllipseV1 ellipse = new EntityEllipseV1(); - ellipse.setX(entity.getPosition().getX()); - ellipse.setY(entity.getPosition().getY()); - ellipse.setWidth(entity.getRelativeShape().getBounds2D().getWidth()); - ellipse.setHeight(entity.getRelativeShape().getBounds2D().getHeight()); - ellipse.setRotation(entity.getRotation()); + ellipse.setTransform(entity.getTransform()); return ellipse; } private EntityV1 parseRectangle(Entity entity) { EntityRectangleV1 rectangle = new EntityRectangleV1(); - rectangle.setX(entity.getPosition().getX()); - rectangle.setY(entity.getPosition().getY()); - rectangle.setWidth(entity.getRelativeShape().getBounds2D().getWidth()); - rectangle.setHeight(entity.getRelativeShape().getBounds2D().getHeight()); - rectangle.setRotation(entity.getRotation()); + rectangle.setTransform(entity.getTransform()); return rectangle; } @@ -121,8 +135,8 @@ private EntityV1 parseGroup(EntityGroup entity) { private List convertPathToSegments(Entity entity) { List segments = new ArrayList<>(); - Shape shape = entity.getShape(); - PathIterator pathIterator = shape.getPathIterator(AffineTransform.getRotateInstance(Math.toRadians(Utils.normalizeRotation(entity.getRotation())), shape.getBounds2D().getCenterX(), shape.getBounds2D().getCenterY())); + Shape shape = entity.getRelativeShape(); + PathIterator pathIterator = shape.getPathIterator(new AffineTransform()); double[] coordinates = new double[8]; while (!pathIterator.isDone()) { Arrays.fill(coordinates, 0); diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/CuttableEntityV1.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/CuttableEntityV1.java index 6332d5744b..128341df17 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/CuttableEntityV1.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/CuttableEntityV1.java @@ -22,6 +22,8 @@ This file is part of Universal Gcode Sender (UGS). import com.willwinder.ugs.nbp.designer.entities.Entity; import com.willwinder.ugs.nbp.designer.entities.cuttable.Cuttable; +import java.awt.geom.AffineTransform; + /** * @author Joacim Breiler */ @@ -32,6 +34,9 @@ public class CuttableEntityV1 extends EntityV1 { @Expose private CutTypeV1 cutType; + @Expose + private AffineTransform transform; + public CuttableEntityV1(EntityTypeV1 type) { super(type); } @@ -56,9 +61,16 @@ public void setCutDepth(double cutDepth) { protected void applyCommonAttributes(Entity entity) { super.applyCommonAttributes(entity); + // We need to make a copy of the transformation to set the affine transformation state and type which is not serialized + entity.setTransform(new AffineTransform(transform.getScaleX(), transform.getShearY(), transform.getShearX(), transform.getScaleY(), transform.getTranslateX(), transform.getTranslateY())); + if (entity instanceof Cuttable) { ((Cuttable) entity).setCutDepth(cutDepth); ((Cuttable) entity).setCutType(CutTypeV1.toCutType(cutType)); } } + + public void setTransform(AffineTransform transform) { + this.transform = transform; + } } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityEllipseV1.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityEllipseV1.java index 2845058803..0a77e53e89 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityEllipseV1.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityEllipseV1.java @@ -20,71 +20,20 @@ This file is part of Universal Gcode Sender (UGS). import com.willwinder.ugs.nbp.designer.entities.Entity; import com.willwinder.ugs.nbp.designer.entities.cuttable.Ellipse; -import com.willwinder.ugs.nbp.designer.model.Size; - -import java.awt.*; -import java.awt.geom.Point2D; /** * @author Joacim Breiler */ public class EntityEllipseV1 extends CuttableEntityV1 { - private double x; - private double y; - private double width; - private double height; - private double rotation; + public EntityEllipseV1() { super(EntityTypeV1.ELLIPSE); } - public void setX(double x) { - this.x = x; - } - - public double getX() { - return x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public double getHeight() { - return height; - } - - public void setHeight(double height) { - this.height = height; - } - - public void setRotation(double rotation) { - this.rotation = rotation; - } - - public double getRotation() { - return rotation; - } - @Override public Entity toInternal() { Ellipse ellipse = new Ellipse(); - ellipse.setSize(new Size(width, height)); - ellipse.setRotation(getRotation()); - ellipse.setPosition(new Point2D.Double(x, y)); applyCommonAttributes(ellipse); return ellipse; } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityPathV1.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityPathV1.java index f95dbb0f1e..a67ea30145 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityPathV1.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityPathV1.java @@ -27,39 +27,12 @@ This file is part of Universal Gcode Sender (UGS). * @author Joacim Breiler */ public class EntityPathV1 extends CuttableEntityV1 { - private double x; - private double y; - private double rotation; private List segments; public EntityPathV1() { super(EntityTypeV1.PATH); } - public void setX(double x) { - this.x = x; - } - - public double getX() { - return x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - - public void setRotation(double rotation) { - this.rotation = rotation; - } - - public double getRotation() { - return rotation; - } - @Override public Entity toInternal() { Path path = new Path(); @@ -77,7 +50,6 @@ public Entity toInternal() { path.curveTo(segment.getCoordinates().get(0)[0], segment.getCoordinates().get(0)[1], segment.getCoordinates().get(1)[0], segment.getCoordinates().get(1)[1], segment.getCoordinates().get(2)[0], segment.getCoordinates().get(2)[1]); } }); - path.setRotation(rotation); applyCommonAttributes(path); return path; } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityRectangleV1.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityRectangleV1.java index d6298b69d2..75d99cbe94 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityRectangleV1.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityRectangleV1.java @@ -21,69 +21,17 @@ This file is part of Universal Gcode Sender (UGS). import com.willwinder.ugs.nbp.designer.entities.Entity; import com.willwinder.ugs.nbp.designer.entities.cuttable.Rectangle; -import java.awt.geom.Point2D; - /** * @author Joacim Breiler */ public class EntityRectangleV1 extends CuttableEntityV1 { - private double x; - private double y; - private double width; - private double height; - private double rotation; - public EntityRectangleV1() { super(EntityTypeV1.RECTANGLE); } - public void setX(double x) { - this.x = x; - } - - public double getX() { - return x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public double getHeight() { - return height; - } - - public void setHeight(double height) { - this.height = height; - } - - public void setRotation(double rotation) { - this.rotation = rotation; - } - - public double getRotation() { - return rotation; - } - @Override public Entity toInternal() { Rectangle rectangle = new Rectangle(); - rectangle.setWidth(width); - rectangle.setHeight(height); - rectangle.setRotation(rotation); - rectangle.setPosition(new Point2D.Double(x, y)); applyCommonAttributes(rectangle); return rectangle; } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTextV1.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTextV1.java new file mode 100644 index 0000000000..42174df57a --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTextV1.java @@ -0,0 +1,51 @@ +/* + Copyright 2021 Will Winder + + This file is part of Universal Gcode Sender (UGS). + + UGS is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + UGS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with UGS. If not, see . + */ +package com.willwinder.ugs.nbp.designer.io.ugsd.v1; + +import com.willwinder.ugs.nbp.designer.entities.Entity; +import com.willwinder.ugs.nbp.designer.entities.cuttable.Text; + +/** + * @author Joacim Breiler + */ +public class EntityTextV1 extends CuttableEntityV1 { + private String text; + private String fontName; + + public EntityTextV1() { + super(EntityTypeV1.TEXT); + } + + public void setText(String text) { + this.text = text; + } + + public void setFontName(String fontName) { + this.fontName = fontName; + } + + @Override + public Entity toInternal() { + Text text = new Text(); + text.setFontFamily(fontName); + text.setText(this.text); + applyCommonAttributes(text); + return text; + } +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTypeV1.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTypeV1.java index 795be66d63..db933c5fb5 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTypeV1.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/io/ugsd/v1/EntityTypeV1.java @@ -22,5 +22,5 @@ This file is part of Universal Gcode Sender (UGS). * @author Joacim Breiler */ public enum EntityTypeV1 { - PATH, GROUP, ELLIPSE, RECTANGLE + PATH, GROUP, ELLIPSE, RECTANGLE, TEXT } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/logic/Tool.java b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/logic/Tool.java index 030309bf6c..64c5bc6d48 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/logic/Tool.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/java/com/willwinder/ugs/nbp/designer/logic/Tool.java @@ -22,5 +22,5 @@ This file is part of Universal Gcode Sender (UGS). * @author Joacim Breiler */ public enum Tool { - CIRCLE, RECTANGLE, LINE, SELECT, INSERT; + CIRCLE, RECTANGLE, LINE, SELECT, INSERT, TEXT; } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text.svg b/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text.svg new file mode 100644 index 0000000000..a67555993d --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text.svg @@ -0,0 +1,61 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text24.svg b/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text24.svg new file mode 100644 index 0000000000..80e96adceb --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text24.svg @@ -0,0 +1,59 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text32.svg b/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text32.svg new file mode 100644 index 0000000000..5bfe8e28ac --- /dev/null +++ b/ugs-platform/ugs-platform-plugin-designer/src/main/resources/img/text32.svg @@ -0,0 +1,61 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/MoveControlTest.java b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/MoveControlTest.java index 7e97a5f70a..6ef618cfa8 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/MoveControlTest.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/MoveControlTest.java @@ -13,7 +13,6 @@ import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; -@Ignore("Need to figure out how to run these tests on build server") public class MoveControlTest { @Test diff --git a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/RectangleTest.java b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/RectangleTest.java index cfc065bcbc..1a33116219 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/RectangleTest.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/RectangleTest.java @@ -1,7 +1,7 @@ package com.willwinder.ugs.nbp.designer.entities; -import com.willwinder.ugs.nbp.designer.entities.EntityGroup; import com.willwinder.ugs.nbp.designer.entities.cuttable.Rectangle; +import com.willwinder.ugs.nbp.designer.model.Size; import org.junit.Test; import java.awt.geom.AffineTransform; @@ -85,12 +85,12 @@ public void moveShouldTranslateScaledEntity() { rectangle.setHeight(10); assertEquals(new Point2D.Double(20, 20), rectangle.getPosition()); - assertEquals(new Point2D.Double(30, 30), rectangle.getCenter()); + assertEquals(new Point2D.Double(25, 25), rectangle.getCenter()); rectangle.move(new Point2D.Double(-5, -5)); assertEquals(new Point2D.Double(15, 15), rectangle.getPosition()); - assertEquals(new Point2D.Double(25, 25), rectangle.getCenter()); + assertEquals(new Point2D.Double(20, 20), rectangle.getCenter()); } @Test @@ -251,4 +251,23 @@ public void scaleShouldChangeSizeWhenRotated() { } + @Test + public void setSizeWithAnotherWidthShouldOnlyScaleWidth() { + Rectangle rectangle = new Rectangle(); + rectangle.setPosition(new Point2D.Double(1, 1)); + rectangle.setWidth(100); + rectangle.setHeight(100); + rectangle.setRotation(90); + + assertEquals(100, rectangle.getSize().getWidth(), 0.1); + assertEquals(100, rectangle.getSize().getHeight(), 0.1); + assertEquals(1, rectangle.getPosition().getX(), 0.1); + assertEquals(1, rectangle.getPosition().getY(), 0.1); + assertEquals(90, rectangle.getRotation(), 0.1); + + rectangle.setSize(new Size(200, 150)); + assertEquals(200, rectangle.getSize().getWidth(), 0.1); + assertEquals(150, rectangle.getSize().getHeight(), 0.1); + } + } diff --git a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/selection/SelectionManagerTest.java b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/selection/SelectionManagerTest.java index 933a07a054..0801577c29 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/selection/SelectionManagerTest.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/entities/selection/SelectionManagerTest.java @@ -41,7 +41,8 @@ public void moveShouldMoveAllEntites() { target.move(new Point2D.Double(10, 10)); - assertEquals(new Size(50, 50), target.getSize()); + assertEquals(50, target.getSize().getWidth(), 0.1); + assertEquals(50, target.getSize().getHeight(), 0.1); assertEquals(new Point2D.Double(20, 30), target.getPosition()); assertEquals(new Point2D.Double(45, 55), target.getCenter()); assertEquals(0, target.getRotation(), 0.1); @@ -108,4 +109,4 @@ public void setSelectionWithControlShouldNotBePossible() { assertTrue(target.isEmpty()); } -} \ No newline at end of file +} diff --git a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReaderTest.java b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReaderTest.java index 960f865392..e0474b1a38 100644 --- a/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReaderTest.java +++ b/ugs-platform/ugs-platform-plugin-designer/src/test/java/com/willwinder/ugs/nbp/designer/io/ugsd/UgsDesignReaderTest.java @@ -15,6 +15,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import java.awt.Shape; import java.awt.geom.Point2D; import java.io.ByteArrayOutputStream; import java.util.Optional; @@ -99,9 +100,9 @@ public void readDesignWithRectangle() { @Test public void readDesignWithEllipse() { Ellipse entity = new Ellipse(); - entity.setSize(new Size(1, 1)); + entity.setSize(new Size(50, 100)); + entity.setRotation(10); entity.setName("ellipse"); - entity.setRotation(1); entity.setCutDepth(12); entity.setCutType(CutType.POCKET); String data = convertEntityToString(entity); @@ -111,23 +112,30 @@ public void readDesignWithEllipse() { Cuttable readEntity = (Cuttable) design.getEntities().get(0); assertTrue(readEntity instanceof Ellipse); + + assertEquals(entity.getTransform(), readEntity.getTransform()); assertEquals(entity.getPosition().getX(), readEntity.getPosition().getX(), 0.1); assertEquals(entity.getPosition().getY(), readEntity.getPosition().getY(), 0.1); assertEquals(entity.getName(), readEntity.getName()); assertEquals(entity.getCutType(), readEntity.getCutType()); assertEquals(entity.getCutDepth(), readEntity.getCutDepth(), 0.1); + assertEquals(entity.getRelativeShape().getBounds().getWidth(), readEntity.getRelativeShape().getBounds().getWidth(), 0.1); + assertEquals(entity.getRelativeShape().getBounds().getHeight(), readEntity.getRelativeShape().getBounds().getHeight(), 0.1); + assertEquals(entity.getSize().getWidth(), readEntity.getSize().getWidth(), 0.1); + assertEquals(entity.getSize().getHeight(), readEntity.getSize().getHeight(), 0.1); assertEquals(entity.getRotation(), readEntity.getRotation(), 0.1); } @Test public void readDesignWithPath() { Path entity = new Path(); - entity.setSize(new Size(1, 1)); entity.moveTo(0, 0); entity.lineTo(0, 0); - entity.lineTo(1.1, 1.1); - entity.lineTo(1, 0); + entity.lineTo(10.1, 10.1); + entity.lineTo(10, 0); entity.lineTo(0, 0); + entity.setSize(new Size(10, 12)); + entity.setPosition(new Point2D.Double(100, 120)); entity.setName("path"); entity.setRotation(1); entity.setCutDepth(12); @@ -161,4 +169,4 @@ private String convertEntityToString(Entity entity) { return new String(baos.toByteArray()); } -} \ No newline at end of file +}