From eaa522458da458bb52011c2f3f527fe7e3f6d316 Mon Sep 17 00:00:00 2001 From: ericx Date: Mon, 24 Jun 2024 13:14:47 -0400 Subject: [PATCH 1/2] Terrace Component --- package-lock.json | 309 +++++++++++++--------------- src/app/library/terrace.ts | 159 ++++++++++++++ src/app/library/well.ts | 103 ++++++++++ src/componentAPI.ts | 6 + src/components/ComponentToolBar.vue | 2 +- 5 files changed, 408 insertions(+), 171 deletions(-) create mode 100644 src/app/library/terrace.ts create mode 100644 src/app/library/well.ts diff --git a/package-lock.json b/package-lock.json index 4856c3ed..2b3c2186 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2778,6 +2778,44 @@ "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -2788,6 +2826,33 @@ "estraverse": "^4.1.1" } }, + "fork-ts-checker-webpack-plugin-v5": { + "version": "npm:fork-ts-checker-webpack-plugin@5.2.1", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz", + "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==", + "dev": true, + "optional": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@types/json-schema": "^7.0.5", + "chalk": "^4.1.0", + "cosmiconfig": "^6.0.0", + "deepmerge": "^4.2.2", + "fs-extra": "^9.0.0", + "memfs": "^3.1.2", + "minimatch": "^3.0.4", + "schema-utils": "2.7.0", + "semver": "^7.3.2", + "tapable": "^1.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, "mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -2797,6 +2862,28 @@ "minimist": "^1.2.6" } }, + "schema-utils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", + "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", + "dev": true, + "optional": true, + "requires": { + "@types/json-schema": "^7.0.4", + "ajv": "^6.12.2", + "ajv-keywords": "^3.4.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "watchpack": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", @@ -3090,6 +3177,17 @@ "color-convert": "^2.0.1" } }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -3146,6 +3244,13 @@ "universalify": "^0.1.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -3155,6 +3260,18 @@ "graceful-fs": "^4.1.6" } }, + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -3190,12 +3307,34 @@ "minipass": "^3.1.1" } }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } + }, "watchpack": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", @@ -7841,95 +7980,6 @@ } } }, - "fork-ts-checker-webpack-plugin-v5": { - "version": "npm:fork-ts-checker-webpack-plugin@5.2.1", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.2.1.tgz", - "integrity": "sha512-SVi+ZAQOGbtAsUWrZvGzz38ga2YqjWvca1pXQFUArIVXqli0lLoDQ8uS0wg0kSpcwpZmaW5jVCZXQebkyUQSsw==", - "dev": true, - "optional": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@types/json-schema": "^7.0.5", - "chalk": "^4.1.0", - "cosmiconfig": "^6.0.0", - "deepmerge": "^4.2.2", - "fs-extra": "^9.0.0", - "memfs": "^3.1.2", - "minimatch": "^3.0.4", - "schema-utils": "2.7.0", - "semver": "^7.3.2", - "tapable": "^1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "schema-utils": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", - "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==", - "dev": true, - "optional": true, - "requires": { - "@types/json-schema": "^7.0.4", - "ajv": "^6.12.2", - "ajv-keywords": "^3.4.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", @@ -19277,87 +19327,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.3", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", - "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-property-decorator": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-9.1.2.tgz", diff --git a/src/app/library/terrace.ts b/src/app/library/terrace.ts new file mode 100644 index 00000000..2cdeb295 --- /dev/null +++ b/src/app/library/terrace.ts @@ -0,0 +1,159 @@ +import Template from "./template"; +import paper from "paper"; +import ComponentPort from "../core/componentPort"; +import { LogicalLayerType } from "../core/init"; + + +export default class Terrace extends Template { + constructor() { + super(); + } + + __setupDefinitions(): void { + this.__unique = { + position: "Point" + }; + + this.__heritable = { + componentSpacing: "Float", + insideRadius: "Float", + outsideRadius: "Float", + length: "Float", + height: "Float", + }; + + this.__defaults = { + componentSpacing: 1000, + insideRadius: 0.7 * 1000, + outsideRadius: 1 * 1000, + length: 4.0 * 1000, + height: 1.1 * 1000 + }; + + this.__units = { + componentSpacing: "μm", + insideRadius: "μm", + outsideRadius: "μm", + height: "μm" + }; + + this.__minimum = { + componentSpacing: 0, + insideRadius: 0.5*10, + outsideRadius: 0.8 * 10, + length: 1.0 * 10, + height: 10 + }; + + this.__maximum = { + componentSpacing: 10000, + insideRadius: 5000, + outsideRadius: 5000, + length: 20000, + height: 1200 + }; + + this.__placementTool = "componentPositionTool"; + + this.__toolParams = { + position: "position" + }; + + this.__featureParams = { + componentSpacing: "componentSpacing", + position: "position", + insideRadius: "insideRadius", + outsideRadius: "outsideRadius", + length: "length" + }; + + this.__targetParams = { + componentSpacing: "componentSpacing", + insideRadius: "insideRadius", + outsideRadius: "outsideRadius", + length: "length" + }; + + this.__renderKeys = ["FLOW"]; + + this.__mint = "TERRACE"; + + this.__zOffsetKeys = { + FLOW: "height" + }; + + this.__substrateOffset = { + FLOW: "0" + }; + } + + render2D(params: { [k: string]: any }, key: string) { + + //Instead of making 4 seperate triangles, just find the 4 points of the diamond, already found 2 of them + const position = params.position; + const outsideRadius = params.outsideRadius; + const insideRadius = params.insideRadius; + const length = params.length; + const color1 = params.color; + const pos = new paper.Point(position[0], position[1]); + + const circle = new paper.Path.Circle(pos, outsideRadius); + + const tangent_point = new paper.Point(outsideRadius * Math.cos(5*Math.PI/6), outsideRadius * Math.sin(5*Math.PI/6)); + const p1 = new paper.Point(tangent_point.x - (tangent_point.y / Math.tan(Math.PI/3)),0); + const p2 = new paper.Point(0, (-p1.x) * Math.tan(Math.PI/3)) + const p3 = new paper.Point(-p1.x, p1.y); + const p4 = new paper.Point(p2.x,-p2.y); + + const inside_circle = new paper.Path.Circle(pos, insideRadius) + + const diamond = new paper.Path(); + diamond.add(p1); + diamond.add(p2); + diamond.add(p3); + diamond.add(p4); + diamond.closed = true; + diamond.translate(pos); + + let terrace = diamond.subtract(inside_circle); + + const subtraction_rec = terrace.bounds; + + const subtraction_path = new paper.Path.Rectangle(terrace.bounds); + subtraction_path.translate(new paper.Point(0,subtraction_rec.height/2 + length/2)); + terrace = terrace.subtract(subtraction_path); + + subtraction_path.scale(1,-1,new paper.Point(position)); + + + terrace = terrace.subtract(subtraction_path); + + terrace.fillColor = color1; + + return terrace; + } + + render2DTarget(key: string | null, params: { [k: string]: any }) { + if (key === null) { + key = this.__renderKeys[0]; + } + const render = this.render2D(params, key); + render.fillColor!.alpha = 0.5; + return render; + } + + getPorts(params: { [k: string]: any }) { + + const render = this.render2D(params,"FLOW"); + + const rec = render.bounds; + + + const ports = []; + + ports.push(new ComponentPort(0, -rec.height/2, "1", LogicalLayerType.FLOW)); + ports.push(new ComponentPort(0, rec.height/2, "2", LogicalLayerType.FLOW)); + + return ports; + } +} diff --git a/src/app/library/well.ts b/src/app/library/well.ts new file mode 100644 index 00000000..92f59a98 --- /dev/null +++ b/src/app/library/well.ts @@ -0,0 +1,103 @@ +import Template from "./template"; +import paper from "paper"; +import ComponentPort from "../core/componentPort"; +import { LogicalLayerType } from "../core/init"; + +export default class Well extends Template { + constructor() { + super(); + } + + __setupDefinitions(): void { + this.__unique = { + position: "Point" + }; + + this.__heritable = { + componentSpacing: "Float", + radius: "Float", + height: "Float" + }; + + this.__defaults = { + componentSpacing: 1000, + radius: 0.7 * 1000, + height: 1.1 * 1000 + }; + + this.__units = { + componentSpacing: "μm", + radius: "μm", + height: "μm" + }; + + this.__minimum = { + componentSpacing: 0, + radius: 0.8 * 10, + height: 10 + }; + + this.__maximum = { + componentSpacing: 10000, + radius: 3000, + height: 1200 + }; + + this.__placementTool = "componentPositionTool"; + + this.__toolParams = { + position: "position" + }; + + this.__featureParams = { + componentSpacing: "componentSpacing", + position: "position", + radius: "radius" + }; + + this.__targetParams = { + componentSpacing: "componentSpacing", + radius: "radius" + }; + + this.__renderKeys = ["FLOW"]; + + this.__mint = "WELL"; + + this.__zOffsetKeys = { + FLOW: "height" + }; + + this.__substrateOffset = { + FLOW: "0" + }; + } + + render2D(params: { [k: string]: any }, key: string) { + // Regardless of the key... + const position = params.position; + const radius = params.radius; + const color1 = params.color; + const pos = new paper.Point(position[0], position[1]); + const outerCircle = new paper.Path.Circle(pos, radius); + outerCircle.fillColor = color1; + return outerCircle; + } + + render2DTarget(key: string | null, params: { [k: string]: any }) { + if (key === null) { + key = this.__renderKeys[0]; + } + const render = this.render2D(params, key); + render.fillColor!.alpha = 0.5; + return render; + } + + getPorts(params: { [k: string]: any }) { + const radius = params.radius; + + const ports: ComponentPort[] = []; + + return ports; + } +} diff --git a/src/componentAPI.ts b/src/componentAPI.ts index aaf2edcf..97b34e5f 100644 --- a/src/componentAPI.ts +++ b/src/componentAPI.ts @@ -29,6 +29,7 @@ import LLChamber from "./app/library/llChamber"; import ThreeDMixer from "./app/library/threeDMixer"; import Via from "./app/library/via"; + // new import Filter from "./app/library/filter"; @@ -47,6 +48,8 @@ import DropletGeneratorFlowFocus from "./app/library/dropletGeneratorFlowFocus"; import LogicArray from "./app/library/logicArray"; import ToroidalMixer from "./app/library/toroidalMixer"; import DogboneInsert from "./app/library/dogboneInsert"; +import Well from "./app/library/well"; +import Terrace from "./app/library/terrace"; import Template from "./app/library/template"; import ComponentPort from "./app/core/componentPort"; @@ -168,6 +171,9 @@ export class ComponentAPI { LogicArray: { object: new LogicArray(), key: "FLOW" }, LogicArray_control: { object: new LogicArray(), key: "CONTROL" }, LogicArray_cell: { object: new LogicArray(), key: "CELL" }, + Well: { object: new Well(), key: "FLOW"}, + Terrace: { object: new Terrace(), key: "FLOW"} + }; static connectionLibrary: { [key: string]: LibraryEntry } = { diff --git a/src/components/ComponentToolBar.vue b/src/components/ComponentToolBar.vue index f5b01b3f..6fd010aa 100644 --- a/src/components/ComponentToolBar.vue +++ b/src/components/ComponentToolBar.vue @@ -42,7 +42,7 @@ export default { toolTree: { Mix: ["MIXER", "MIXER3D", "TOROIDAL MIXER", "GRADIENT GENERATOR", "CURVED MIXER", "ROTARY MIXER"], Control: ["VALVE3D", "VALVE", "PUMP3D", "PUMP"], - Storage: ["LONG CELL TRAP", "SQUARE CELL TRAP", "REACTION CHAMBER", "DIAMOND REACTION CHAMBER"], + Storage: ["TRIANGLE TRAP", "LONG CELL TRAP", "SQUARE CELL TRAP", "REACTION CHAMBER", "DIAMOND REACTION CHAMBER", "WELL", "TERRACE"], Process: ["LL CHAMBER", "FILTER","DOGBONE INSERT","LOGIC ARRAY"], Distribute: ["PORT", "VIA", "YTREE", "TREE", "MUX", "TRANSPOSER", "MUX3D"], Droplet: ["NOZZLE DROPLET GENERATOR", "DROPLET CAPACITANCE SENSOR", "DROPLET MERGER", "PICOINJECTOR", "DROPLET SPLITTER"] From fa8407cbcf5f11d9c496ca5ae0e82812405298e2 Mon Sep 17 00:00:00 2001 From: EricXie-02 <91748564+EricXie-02@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:54:16 -0400 Subject: [PATCH 2/2] Update ComponentToolBar.vue --- src/components/ComponentToolBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ComponentToolBar.vue b/src/components/ComponentToolBar.vue index 6fd010aa..386e3b68 100644 --- a/src/components/ComponentToolBar.vue +++ b/src/components/ComponentToolBar.vue @@ -42,7 +42,7 @@ export default { toolTree: { Mix: ["MIXER", "MIXER3D", "TOROIDAL MIXER", "GRADIENT GENERATOR", "CURVED MIXER", "ROTARY MIXER"], Control: ["VALVE3D", "VALVE", "PUMP3D", "PUMP"], - Storage: ["TRIANGLE TRAP", "LONG CELL TRAP", "SQUARE CELL TRAP", "REACTION CHAMBER", "DIAMOND REACTION CHAMBER", "WELL", "TERRACE"], + Storage: ["LONG CELL TRAP", "SQUARE CELL TRAP", "REACTION CHAMBER", "DIAMOND REACTION CHAMBER", "WELL", "TERRACE"], Process: ["LL CHAMBER", "FILTER","DOGBONE INSERT","LOGIC ARRAY"], Distribute: ["PORT", "VIA", "YTREE", "TREE", "MUX", "TRANSPOSER", "MUX3D"], Droplet: ["NOZZLE DROPLET GENERATOR", "DROPLET CAPACITANCE SENSOR", "DROPLET MERGER", "PICOINJECTOR", "DROPLET SPLITTER"]