From 7beb811f01cdbcf98f7e62f6e4b71144bb3d71c0 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Thu, 13 Mar 2025 21:37:41 -0500 Subject: [PATCH 01/20] Fix templates --- ct_data_schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct_data_schema.json b/ct_data_schema.json index 6f689b2..23d7901 100644 --- a/ct_data_schema.json +++ b/ct_data_schema.json @@ -16,7 +16,7 @@ "description": "", "type": "integer", "readOnly": true, - "template": "{{firstChar Parameter_Label}}", + "template": "{{charToOrd (firstChar Parameter_Label)}}", "watch": { "Parameter_Label": "root.Parameter_Label" }, @@ -27,7 +27,7 @@ "description": "Derived from the Parameter_Label", "type": "string", "format": "custom", - "template": "{{charToOrd (firstChar Parameter_Label)}}", + "template": "{{firstChar Parameter_Label}}", "watch": { "Parameter_Label": "root.Parameter_Label" }, @@ -131,4 +131,4 @@ "Percent_Porosity_Contour", "Total_Porosity_Percent" ] -} \ No newline at end of file +} From 6074940632aee2551eff29db61549d645cbcbcbb Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Thu, 3 Apr 2025 12:33:36 -0500 Subject: [PATCH 02/20] Add an automatic IGSN creation --- printer_build_schema.json | 946 ++++++++++++++++++++++++-------------- 1 file changed, 604 insertions(+), 342 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index 522dc03..be0cfbe 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -1,368 +1,630 @@ { - "title": "Printer Build", - "description": "Metadata for a single build using a metals additive manufacturing printer", - "type": "object", - "properties": { - "printerBuildID": { - "title": "Printer Build ID", - "description": "Automatically generated identifier for the printer build", - "type": "string", - "template": "{{replaceAll params.runDate '-' ''}}_{{params.location}}_{{material}}_{{buildGeometry}}_{{padNumber partNumber 3}}{{joinarray extraInfo '_' true}}", - "watch": { - "params": "root.userParameters", - "material": "root.buildPlate.material", - "buildGeometry": "root.buildGeometry", - "partNumber": "root.partNumber", - "extraInfo": "root.extraInfo" - }, - "readOnly": true, - "propertyOrder": 0 + "title": "Printer Build", + "description": "Metadata for a single build using a metals additive manufacturing printer", + "type": "object", + "properties": { + "igsn": { + "$ref": "#/definitions/igsn", + "propertyOrder": 0 + }, + "printerBuildID": { + "title": "Printer Build ID", + "description": "Automatically generated identifier for the printer build", + "type": "string", + "template": "{{replaceAll params.runDate '-' ''}}_{{params.location}}_{{material}}{{joinarray extraInfo '_' true}}", + "watch": { + "params": "root.userParameters", + "material": "root.buildPlate.material", + "extraInfo": "root.extraInfo" + }, + "readOnly": true, + "propertyOrder": 0 + }, + "buildMachine": { + "title": "Build Machine", + "description": "Machine used for the build", + "type": "string", + "enum": [ + "EOS M290 at CMU" + ], + "propertyOrder": 1 + }, + "rawPowderID": { + "title": "Raw Powder", + "description": "Reference to a 'Raw Powder Details' entry", + "type": "string", + "enumSource": "girder.formId:663e6d21b18fa1c426e939ab", + "propertyOrder": 2 + }, + "buildGeometries": { + "title": "Build Geometries", + "description": "Available build geometries for the printer", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "headerTemplate": "Geometry {{i1}}", + "$ref": "#/definitions/geometry" + }, + "propertyOrder": 3, + "options": { + "grid_columns": 12 + }, + "format": "grid" + }, + "extraInfo": { + "title": "Extraneous Information", + "description": "Optional identifiers for split/batch numbers, etc.", + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "propertyOrder": 5 + }, + "buildPlate": { + "title": "Build Plate", + "type": "object", + "format": "grid", + "properties": { + "material": { + "title": "Material", + "type": "string", + "enum": [ + "Ti-6Al-4V" + ], + "default": "Ti-6Al-4V", + "propertyOrder": 0 }, - "buildMachine": { - "title": "Build Machine", - "description": "Machine used for the build", - "type": "string", - "enum": [ - "EOS M290 at CMU" - ], - "propertyOrder": 1 + "temperature": { + "title": "Temperature (C)", + "type": "number", + "minimum": 0, + "maximum": 450, + "propertyOrder": 1 + } + }, + "required": [ + "material", + "temperature" + ], + "propertyOrder": 7 + }, + "flowGas": { + "title": "Flow Gas", + "type": "object", + "format": "grid", + "properties": { + "type": { + "title": "Gas Type", + "type": "string", + "enum": [ + "Ar", + "N2" + ], + "propertyOrder": 0 }, - "rawPowderID": { - "title": "Raw Powder", - "description": "Reference to a 'Raw Powder Details' entry", - "type": "string", - "enumSource": "girder.formId:663e6d21b18fa1c426e939ab", - "propertyOrder": 2 + "flowRate": { + "title": "Flow Rate (lpm)", + "type": "number", + "minimum": 0, + "maximum": 10, + "propertyOrder": 1 }, - "buildGeometry": { - "title": "Build Geometry", - "description": "The geometry of the build", + "o2Concentration": { + "title": "Oxygen Concentration (%)", + "type": "number", + "minimum": 0, + "maximum": 100, + "propertyOrder": 2 + } + }, + "required": [ + "type", + "o2Concentration" + ], + "propertyOrder": 8 + }, + "recoater": { + "title": "Recoater", + "type": "object", + "format": "grid", + "properties": { + "material": { + "title": "Material", + "type": "string", + "enum": [ + "metal", + "rubber", + "ceramic" + ], + "propertyOrder": 0 + }, + "style": { + "title": "Style", + "type": "string", + "enum": [ + "rake", + "roller", + "blade" + ], + "propertyOrder": 1 + } + }, + "required": [ + "material", + "style" + ], + "propertyOrder": 9 + }, + "buildParameters": { + "title": "Build Parameters", + "type": "object", + "properties": { + "contouringParameters": { + "title": "Contouring Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 0 + }, + "infillParameters": { + "title": "Infill Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 1 + }, + "upskinParameters": { + "title": "Upskin Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 2 + }, + "downskinParameters": { + "title": "Downskin Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 3 + } + }, + "required": [ + "contouringParameters" + ], + "propertyOrder": 10 + }, + "userParameters": { + "title": "User Parameters", + "type": "object", + "format": "grid", + "properties": { + "runDate": { + "title": "Run Date", + "type": "string", + "format": "date", + "description": "Date in YYYY-MM-DD format", + "default": "2025-01-01", + "propertyOrder": 0 + }, + "runTime": { + "title": "Run Time", + "type": "string", + "format": "time", + "default": "00:00:00", + "propertyOrder": 1 + }, + "location": { + "title": "Location", + "description": "Location where the build occurred", + "type": "string", + "options": { + "enum_titles": [ + "Applied Physics Laboratory", + "Carnegie Mellon University", + "Northwestern University" + ] + }, + "default": "CMU", + "enum": [ + "APL", + "CMU", + "NU" + ], + "propertyOrder": 2 + }, + "teamMembers": { + "title": "Team Members", + "type": "array", + "items": { "type": "string", - "default": "4PTF", - "propertyOrder": 3, "enum": [ - "4PTF" + "Evan Adcock", + "Nick Lamprinakos", + "Katie O'Donnell" ] + }, + "propertyOrder": 3 + } + }, + "required": [ + "runDate", + "runTime", + "location", + "teamMembers" + ], + "propertyOrder": 6 + }, + "openjzFile": { + "title": "Build File", + "description": "Upload the build file (*.openjz)", + "type": "string", + "propertyOrder": 11 + }, + "eosReportFile": { + "title": "EOS Report", + "description": "Upload the EOS job quality report (PDF)", + "type": "string", + "propertyOrder": 12 + }, + "misc": { + "title": "Additional Information", + "description": "Key-value pairs for miscellaneous metadata", + "type": "array", + "items": { + "$ref": "#/definitions/keyValue" + }, + "propertyOrder": 13 + }, + "igsn_prefix": { + "type": "string", + "propertyOrder": 100, + "description": "The unique identifier for the build.", + "hidden": true, + "template": "{{org}}{{gCM}}{{material}}{{sMA}}", + "watch": { + "org": "root.igsn.institution", + "gCM": "root.igsn.groupCM", + "material": "root.igsn.material", + "sMA": "root.igsn.submaterialMA", + "suffix": "root.igsn_suffix" + }, + "options": { + "grid_columns": 12, + "hidden": true + } + }, + "igsn_request": { + "type": "boolean", + "propertyOrder": -1, + "title": "Request IGSN", + "description": "Whether to request an IGSN for this sputter run.", + "default": true, + "options": { + "hidden": true, + "grid_columns": 12 + } + }, + "igsnId": { + "type": "string", + "propertyOrder": 0, + "title": "IGSN for this build", + "options": { + "hidden": true, + "grid_columns": 12 + }, + "template": "{{prefix}}{{suffix}}", + "watch": { + "prefix": "root.igsn_prefix", + "suffix": "root.igsn_suffix" + } + }, + "igsn_field": { + "type": "string", + "propertyOrder": 102, + "title": "Field with IGSN prefix", + "const": "igsnId", + "default": "igsnId", + "options": { + "hidden": true, + "grid_columns": 12 + } + }, + "igsn_suffix": { + "type": "string", + "propertyOrder": 103, + "title": "IGSN suffix", + "options": { + "hidden": true, + "grid_columns": 12 + } + }, + "igsn_track": { + "type": "boolean", + "propertyOrder": 104, + "title": "Track IGSN", + "description": "Whether to create Sample tracking.", + "default": true, + "options": { + "hidden": true + } + } + }, + "required": [ + "printerBuildID", + "buildMachine", + "rawPowderID", + "buildGeometries", + "userParameters", + "buildPlate", + "flowGas", + "recoater", + "buildParameters", + "openjzFile", + "eosReportFile" + ], + "definitions": { + "igsn": { + "id": "igsn", + "type": "object", + "format": "grid-strict", + "title": "Sample IGSN Creation", + "options": { + "grid_columns": 12, + "titleHidden": true + }, + "properties": { + "_text1": { + "format": "hidden", + "type": "string", + "title": "IGSN metadata", + "description": "

This section gathers necessary information to create an IGSNs for each sample created during the build

", + "propertyOrder": 0, + "options": { + "grid_columns": 12, + "grid_break": true + } }, - "partNumber": { - "title": "Part Number", - "description": "Number assigned to the part", - "type": "number", - "propertyOrder": 4, - "default": 1 - }, - "extraInfo": { - "title": "Extraneous Information", - "description": "Optional identifiers for split/batch numbers, etc.", - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "propertyOrder": 5 + "institution": { + "type": "string", + "description": "Originating Institution", + "enum": [ + "CM" + ], + "default": "CM", + "propertyOrder": 1, + "options": { + "titleHidden": true, + "grid_columns": 3, + "enum_titles": [ + "Carnegie Mellon University" + ] + } }, - "buildPlate": { - "title": "Build Plate", - "type": "object", - "format": "grid", - "properties": { - "material": { - "title": "Material", - "type": "string", - "enum": [ - "Ti-6Al-4V" - ], - "default": "Ti-6Al-4V", - "propertyOrder": 0 - }, - "temperature": { - "title": "Temperature (C)", - "type": "number", - "minimum": 0, - "maximum": 450, - "propertyOrder": 1 - } - }, - "required": [ - "material", - "temperature" - ], - "propertyOrder": 7 + "groupCM": { + "type": "string", + "description": "Group within the institution", + "enum": [ + "X" + ], + "default": "X", + "propertyOrder": 2, + "options": { + "titleHidden": true, + "grid_columns": 3, + "enum_titles": [ + "Unknown" + ] + } }, - "flowGas": { - "title": "Flow Gas", - "type": "object", - "format": "grid", - "properties": { - "type": { - "title": "Gas Type", - "type": "string", - "enum": [ - "Ar", - "N2" - ], - "propertyOrder": 0 - }, - "flowRate": { - "title": "Flow Rate (lpm)", - "type": "number", - "minimum": 0, - "maximum": 10, - "propertyOrder": 1 - }, - "o2Concentration": { - "title": "Oxygen Concentration (%)", - "type": "number", - "minimum": 0, - "maximum": 100, - "propertyOrder": 2 - } - }, - "required": [ - "type", - "o2Concentration" - ], - "propertyOrder": 8 + "material": { + "type": "string", + "description": "Material Type", + "enum": [ + "MA" + ], + "default": "MA", + "propertyOrder": 3, + "options": { + "titleHidden": true, + "grid_columns": 3, + "enum_titles": [ + "metals and alloys" + ] + } }, - "recoater": { - "title": "Recoater", - "type": "object", - "format": "grid", - "properties": { - "material": { - "title": "Material", - "type": "string", - "enum": [ - "metal", - "rubber", - "ceramic" - ], - "propertyOrder": 0 - }, - "style": { - "title": "Style", - "type": "string", - "enum": [ - "rake", - "roller", - "blade" - ], - "propertyOrder": 1 - } + "submaterialMA": { + "type": "string", + "description": "Material Subtype", + "enum": [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L" + ], + "propertyOrder": 4, + "default": "L", + "options": { + "titleHidden": true, + "dependencies": { + "material": "MA" }, - "required": [ - "material", - "style" + "enum_titles": [ + "Al-containing", + "commercially puremetals", + "Cu-containing", + "Fe-containing", + "intermetallics", + "Mg-containing", + "Ni-containing", + "rare earth", + "refactories", + "steels", + "superalloys", + "Ti-containing" ], - "propertyOrder": 9 + "grid_columns": 3 + } }, - "buildParameters": { - "title": "Build Parameters", - "type": "object", - "properties": { - "contouringParameters": { - "title": "Contouring Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 0 - }, - "infillParameters": { - "title": "Infill Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 1 - }, - "upskinParameters": { - "title": "Upskin Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 2 - }, - "downskinParameters": { - "title": "Downskin Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 3 - } - }, - "required": [ - "contouringParameters" - ], - "propertyOrder": 10 + "title": { + "type": "string", + "title": "Sample Name", + "template": "{{replaceAll params.runDate '-' ''}}_{{params.location}}_{{material}}{{joinarray extraInfo '_' true}}", + "watch": { + "params": "root.userParameters", + "material": "root.buildPlate.material", + "extraInfo": "root.extraInfo" + }, + "readOnly": true, + "propertyOrder": 5, + "options": { + "grid_columns": 12, + "titleHidden": true, + "hidden": true + } + } + } + }, + "geometry": { + "type": "object", + "format": "grid-strict", + "properties": { + "geometryType": { + "title": "Geometry Type", + "type": "string", + "enum": [ + "4PTF", + "TEN", + "AXFT" + ], + "options": { + "grid_columns": 6, + "enum_titles": [ + "4PTF (4-point bending fatigue)", + "TEN (Tensile)", + "AXFT (Axial Fatigue)" + ] + }, + "propertyOrder": 0, + "description": "The geometry type available for the build" }, - "userParameters": { - "title": "User Parameters", - "type": "object", - "format": "grid", - "properties": { - "runDate": { - "title": "Run Date", - "type": "string", - "format": "date", - "description": "Date in YYYY-MM-DD format", - "default": "2025-01-01", - "propertyOrder": 0 - }, - "runTime": { - "title": "Run Time", - "type": "string", - "format": "time", - "default": "00:00:00", - "propertyOrder": 1 - }, - "location": { - "title": "Location", - "description": "Location where the build occurred", - "type": "string", - "options": { - "enum_titles": [ - "Applied Physics Laboratory", - "Carnegie Mellon University", - "Northwestern University" - ] - }, - "default": "CMU", - "enum": [ - "APL", - "CMU", - "NU" - ], - "propertyOrder": 2 - }, - "teamMembers": { - "title": "Team Members", - "type": "array", - "items": { - "type": "string", - "enum": [ - "Evan Adcock", - "Nick Lamprinakos", - "Katie O'Donnell" - ] - }, - "propertyOrder": 3 - } - }, - "required": [ - "runDate", - "runTime", - "location", - "teamMembers" - ], - "propertyOrder": 6 + "count": { + "title": "Count", + "type": "number", + "minimum": 1, + "maximum": 1000, + "propertyOrder": 1, + "options": { + "grid_columns": 6 + }, + "description": "The number of parts that can be built with this geometry type" + } + }, + "description": "Geometry type for the build" + }, + "buildParameterSet": { + "title": "Build parameter set", + "type": "object", + "properties": { + "laserPower": { + "title": "Laser Power (W)", + "type": "number", + "minimum": 0, + "maximum": 370 }, - "openjzFile": { - "title": "Build File", - "description": "Upload the build file (*.openjz)", - "type": "string", - "propertyOrder": 11 + "laserVelocity": { + "title": "Laser Velocity (mm/s)", + "type": "number", + "minimum": 0, + "maximum": 10000 }, - "eosReportFile": { - "title": "EOS Report", - "description": "Upload the EOS job quality report (PDF)", - "type": "string", - "propertyOrder": 12 + "hatchSpacing": { + "title": "Hatch Spacing (µm)", + "type": "number", + "minimum": 0, + "maximum": 300 }, - "misc": { - "title": "Additional Information", - "description": "Key-value pairs for miscellaneous metadata", - "type": "array", - "items": { - "$ref": "#/definitions/keyValue" - }, - "propertyOrder": 13 + "layerThickness": { + "title": "Layer Thickness (µm)", + "type": "number", + "minimum": 0, + "maximum": 100 } + }, + "required": [ + "laserPower", + "laserVelocity", + "hatchSpacing", + "layerThickness" + ] }, - "required": [ - "printerBuildID", - "buildMachine", - "rawPowderID", - "buildGeometry", - "partNumber", - "userParameters", - "buildPlate", - "flowGas", - "recoater", - "buildParameters", - "openjzFile", - "eosReportFile" - ], - "definitions": { - "buildParameterSet": { - "title": "Build parameter set", - "type": "object", - "properties": { - "laserPower": { - "title": "Laser Power (W)", - "type": "number", - "minimum": 0, - "maximum": 370 - }, - "laserVelocity": { - "title": "Laser Velocity (mm/s)", - "type": "number", - "minimum": 0, - "maximum": 10000 - }, - "hatchSpacing": { - "title": "Hatch Spacing (µm)", - "type": "number", - "minimum": 0, - "maximum": 300 - }, - "layerThickness": { - "title": "Layer Thickness (µm)", - "type": "number", - "minimum": 0, - "maximum": 100 - } - }, - "required": [ - "laserPower", - "laserVelocity", - "hatchSpacing", - "layerThickness" - ] + "fileUpload": { + "title": "File", + "type": "object", + "format": "grid", + "properties": { + "file": { + "title": "Upload file", + "type": "string", + "propertyOrder": 0 }, - "fileUpload": { - "title": "File", - "type": "object", - "format": "grid", - "properties": { - "file": { - "title": "Upload file", - "type": "string", - "propertyOrder": 0 - }, - "button": { - "title": "Browse", - "format": "button", - "options": { - "button": { - "action": "button1CB", - "uploadFor": "file" - } - }, - "propertyOrder": 2 - } + "button": { + "title": "Browse", + "format": "button", + "options": { + "button": { + "action": "button1CB", + "uploadFor": "file" } + }, + "propertyOrder": 2 + } + } + }, + "keyValue": { + "title": "Misc. metadata", + "type": "object", + "format": "grid", + "properties": { + "key": { + "title": "Key", + "type": "string", + "propertyOrder": 0 }, - "keyValue": { - "title": "Misc. metadata", - "type": "object", - "format": "grid", - "properties": { - "key": { - "title": "Key", - "type": "string", - "propertyOrder": 0 - }, - "value": { - "title": "Value", - "type": "string", - "propertyOrder": 1 - } - }, - "required": [ - "key", - "value" - ] + "value": { + "title": "Value", + "type": "string", + "propertyOrder": 1 } + }, + "required": [ + "key", + "value" + ] + } + }, + "if": { + "properties": { + "igsn_request": { + "const": false + } + } + }, + "then": { + "properties": { + "igsn": { + "options": { + "hidden": true + }, + "readonly": true + }, + "igsnId": { + "options": { + "hidden": false + }, + "readonly": true + } } + } } From ea32f3ad2274d0baecdbd7518b8b901a5d6585e6 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Fri, 11 Apr 2025 10:33:13 -0500 Subject: [PATCH 03/20] Add js helpers --- ct_data_schema.js | 18 ++++++++++++++++++ printer_build_schema.js | 14 ++++++++++++++ raw_powder_shema.js | 18 ++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 ct_data_schema.js create mode 100644 printer_build_schema.js create mode 100644 raw_powder_shema.js diff --git a/ct_data_schema.js b/ct_data_schema.js new file mode 100644 index 0000000..b25cf8a --- /dev/null +++ b/ct_data_schema.js @@ -0,0 +1,18 @@ +Handlebars.registerHelper('firstChar', function (str) { + if (typeof str !== 'string' || str.length === 0) { + return ''; // Return an empty string if the input is invalid + } + return str.charAt(0); // Return the first character of the string +}); + +Handlebars.registerHelper('charToOrd', function (char) { + if (typeof char !== 'string' || char.length === 0) { + return ''; // Return an empty string if the input is invalid + } + const capitalChar = char.toUpperCase(); // Ensure the character is uppercase + const asciiCode = capitalChar.charCodeAt(0); // Get the ASCII code + if (asciiCode >= 65 && asciiCode <= 90) { // Check if it's a capital letter (A-Z) + return asciiCode - 64; // Return the position in the alphabet (A=1, B=2, ..., Z=26) + } + return ''; // Return an empty string if the character is not a capital letter +}); diff --git a/printer_build_schema.js b/printer_build_schema.js new file mode 100644 index 0000000..6ca0458 --- /dev/null +++ b/printer_build_schema.js @@ -0,0 +1,14 @@ +Handlebars.registerHelper('replaceAll', function (string, search, replacement) { + return (string !== undefined && string !== null) ? string.replaceAll(search, replacement) : ''; +}); +Handlebars.registerHelper('joinarray', function (a, sep, prefix=false) { + if (!a || !Array.isArray(a) || a.length === 0) { + // Handle empty or undefined array + return ''; + } + const result = a.join(sep); + if (result !== '' && prefix) { + return `${sep}${result}`; + } + return result; +}); diff --git a/raw_powder_shema.js b/raw_powder_shema.js new file mode 100644 index 0000000..4317fd1 --- /dev/null +++ b/raw_powder_shema.js @@ -0,0 +1,18 @@ +Handlebars.registerHelper("padNumber", function (number, width) { + if (number === null || number === undefined || number === '') { + return ''; + } + let numStr = number.toString(); + return numStr.padStart(width, "0"); +}); +Handlebars.registerHelper('joinarray', function (a, sep, prefix=false) { + if (!a || !Array.isArray(a) || a.length === 0) { + // Handle empty or undefined array + return ''; + } + const result = a.join(sep); + if (result !== '' && prefix) { + return `${sep}${result}`; + } + return result; +}); From e2c1ca815b5957f8bc3f41c94df02310e76911e1 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Wed, 7 May 2025 09:20:21 -0500 Subject: [PATCH 04/20] port to new IGSN structure --- printer_build_schema.json | 981 +++++++++++++++++++++----------------- 1 file changed, 547 insertions(+), 434 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index be0cfbe..5f06bf7 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -2,363 +2,9 @@ "title": "Printer Build", "description": "Metadata for a single build using a metals additive manufacturing printer", "type": "object", - "properties": { - "igsn": { - "$ref": "#/definitions/igsn", - "propertyOrder": 0 - }, - "printerBuildID": { - "title": "Printer Build ID", - "description": "Automatically generated identifier for the printer build", - "type": "string", - "template": "{{replaceAll params.runDate '-' ''}}_{{params.location}}_{{material}}{{joinarray extraInfo '_' true}}", - "watch": { - "params": "root.userParameters", - "material": "root.buildPlate.material", - "extraInfo": "root.extraInfo" - }, - "readOnly": true, - "propertyOrder": 0 - }, - "buildMachine": { - "title": "Build Machine", - "description": "Machine used for the build", - "type": "string", - "enum": [ - "EOS M290 at CMU" - ], - "propertyOrder": 1 - }, - "rawPowderID": { - "title": "Raw Powder", - "description": "Reference to a 'Raw Powder Details' entry", - "type": "string", - "enumSource": "girder.formId:663e6d21b18fa1c426e939ab", - "propertyOrder": 2 - }, - "buildGeometries": { - "title": "Build Geometries", - "description": "Available build geometries for the printer", - "type": "array", - "uniqueItems": true, - "minItems": 1, - "items": { - "headerTemplate": "Geometry {{i1}}", - "$ref": "#/definitions/geometry" - }, - "propertyOrder": 3, - "options": { - "grid_columns": 12 - }, - "format": "grid" - }, - "extraInfo": { - "title": "Extraneous Information", - "description": "Optional identifiers for split/batch numbers, etc.", - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "propertyOrder": 5 - }, - "buildPlate": { - "title": "Build Plate", - "type": "object", - "format": "grid", - "properties": { - "material": { - "title": "Material", - "type": "string", - "enum": [ - "Ti-6Al-4V" - ], - "default": "Ti-6Al-4V", - "propertyOrder": 0 - }, - "temperature": { - "title": "Temperature (C)", - "type": "number", - "minimum": 0, - "maximum": 450, - "propertyOrder": 1 - } - }, - "required": [ - "material", - "temperature" - ], - "propertyOrder": 7 - }, - "flowGas": { - "title": "Flow Gas", - "type": "object", - "format": "grid", - "properties": { - "type": { - "title": "Gas Type", - "type": "string", - "enum": [ - "Ar", - "N2" - ], - "propertyOrder": 0 - }, - "flowRate": { - "title": "Flow Rate (lpm)", - "type": "number", - "minimum": 0, - "maximum": 10, - "propertyOrder": 1 - }, - "o2Concentration": { - "title": "Oxygen Concentration (%)", - "type": "number", - "minimum": 0, - "maximum": 100, - "propertyOrder": 2 - } - }, - "required": [ - "type", - "o2Concentration" - ], - "propertyOrder": 8 - }, - "recoater": { - "title": "Recoater", - "type": "object", - "format": "grid", - "properties": { - "material": { - "title": "Material", - "type": "string", - "enum": [ - "metal", - "rubber", - "ceramic" - ], - "propertyOrder": 0 - }, - "style": { - "title": "Style", - "type": "string", - "enum": [ - "rake", - "roller", - "blade" - ], - "propertyOrder": 1 - } - }, - "required": [ - "material", - "style" - ], - "propertyOrder": 9 - }, - "buildParameters": { - "title": "Build Parameters", - "type": "object", - "properties": { - "contouringParameters": { - "title": "Contouring Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 0 - }, - "infillParameters": { - "title": "Infill Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 1 - }, - "upskinParameters": { - "title": "Upskin Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 2 - }, - "downskinParameters": { - "title": "Downskin Parameters", - "$ref": "#/definitions/buildParameterSet", - "propertyOrder": 3 - } - }, - "required": [ - "contouringParameters" - ], - "propertyOrder": 10 - }, - "userParameters": { - "title": "User Parameters", - "type": "object", - "format": "grid", - "properties": { - "runDate": { - "title": "Run Date", - "type": "string", - "format": "date", - "description": "Date in YYYY-MM-DD format", - "default": "2025-01-01", - "propertyOrder": 0 - }, - "runTime": { - "title": "Run Time", - "type": "string", - "format": "time", - "default": "00:00:00", - "propertyOrder": 1 - }, - "location": { - "title": "Location", - "description": "Location where the build occurred", - "type": "string", - "options": { - "enum_titles": [ - "Applied Physics Laboratory", - "Carnegie Mellon University", - "Northwestern University" - ] - }, - "default": "CMU", - "enum": [ - "APL", - "CMU", - "NU" - ], - "propertyOrder": 2 - }, - "teamMembers": { - "title": "Team Members", - "type": "array", - "items": { - "type": "string", - "enum": [ - "Evan Adcock", - "Nick Lamprinakos", - "Katie O'Donnell" - ] - }, - "propertyOrder": 3 - } - }, - "required": [ - "runDate", - "runTime", - "location", - "teamMembers" - ], - "propertyOrder": 6 - }, - "openjzFile": { - "title": "Build File", - "description": "Upload the build file (*.openjz)", - "type": "string", - "propertyOrder": 11 - }, - "eosReportFile": { - "title": "EOS Report", - "description": "Upload the EOS job quality report (PDF)", - "type": "string", - "propertyOrder": 12 - }, - "misc": { - "title": "Additional Information", - "description": "Key-value pairs for miscellaneous metadata", - "type": "array", - "items": { - "$ref": "#/definitions/keyValue" - }, - "propertyOrder": 13 - }, - "igsn_prefix": { - "type": "string", - "propertyOrder": 100, - "description": "The unique identifier for the build.", - "hidden": true, - "template": "{{org}}{{gCM}}{{material}}{{sMA}}", - "watch": { - "org": "root.igsn.institution", - "gCM": "root.igsn.groupCM", - "material": "root.igsn.material", - "sMA": "root.igsn.submaterialMA", - "suffix": "root.igsn_suffix" - }, - "options": { - "grid_columns": 12, - "hidden": true - } - }, - "igsn_request": { - "type": "boolean", - "propertyOrder": -1, - "title": "Request IGSN", - "description": "Whether to request an IGSN for this sputter run.", - "default": true, - "options": { - "hidden": true, - "grid_columns": 12 - } - }, - "igsnId": { - "type": "string", - "propertyOrder": 0, - "title": "IGSN for this build", - "options": { - "hidden": true, - "grid_columns": 12 - }, - "template": "{{prefix}}{{suffix}}", - "watch": { - "prefix": "root.igsn_prefix", - "suffix": "root.igsn_suffix" - } - }, - "igsn_field": { - "type": "string", - "propertyOrder": 102, - "title": "Field with IGSN prefix", - "const": "igsnId", - "default": "igsnId", - "options": { - "hidden": true, - "grid_columns": 12 - } - }, - "igsn_suffix": { - "type": "string", - "propertyOrder": 103, - "title": "IGSN suffix", - "options": { - "hidden": true, - "grid_columns": 12 - } - }, - "igsn_track": { - "type": "boolean", - "propertyOrder": 104, - "title": "Track IGSN", - "description": "Whether to create Sample tracking.", - "default": true, - "options": { - "hidden": true - } - } - }, - "required": [ - "printerBuildID", - "buildMachine", - "rawPowderID", - "buildGeometries", - "userParameters", - "buildPlate", - "flowGas", - "recoater", - "buildParameters", - "openjzFile", - "eosReportFile" - ], "definitions": { - "igsn": { - "id": "igsn", + "igsnMetadata": { + "id": "igsnMetadata", "type": "object", "format": "grid-strict", "title": "Sample IGSN Creation", @@ -483,143 +129,610 @@ "titleHidden": true, "hidden": true } + }, + "attributes": { + "type": "object", + "properties": { + "alternateIdentifiers": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "alternateIdentifier": { + "type": "string", + "propertyOrder": 1, + "watch": { + "sampleId": "root.printerBuildID" + }, + "template": "{{sampleId}}" + }, + "alternateIdentifierType": { + "type": "string", + "propertyOrder": 2, + "default": "local" + } + } + } + } + } + }, + "relatedIdentifiers": { + "type": "array", + "title": "Related Identifiers", + "propertyOrder": 2, + "readonly": true, + "minItems": 1, + "items": { + "type": "object", + "properties": { + "relatedIdentifier": { + "type": "string", + "title": "Related Identifier", + "propertyOrder": 1, + "readonly": true, + "watch": { + "powderId": "root.rawPowderID" + }, + "template": "/api/v1/entry/{{powderId}}" + }, + "relatedIdentifierType": { + "type": "string", + "propertyOrder": 2, + "readonly": true, + "enum": [ + "URL", + "IGSN", + "DOI", + "Other" + ], + "default": "URL" + }, + "relationType": { + "type": "string", + "propertyOrder": 3, + "readonly": true, + "default": "HasMetadata" + }, + "relatedMetadataScheme": { + "type": "string", + "propertyOrder": 4, + "readonly": true, + "default": "/api/v1/form/663e6d21b18fa1c426e939ab/schema" + } + } + } + } + } + }, + "igsn": { + "id": "igsn", + "type": "object", + "format": "grid-strict", + "title": "Sample IGSN Creation", + "options": { + "grid_columns": 12, + "titleHidden": true + }, + "properties": { + "suffix": { + "type": "string", + "propertyOrder": 1, + "options": { + "hidden": true, + "grid_columns": 12 + }, + "default": "" + }, + "prefix": { + "type": "string", + "propertyOrder": 2, + "description": "The unique identifier for the build.", + "hidden": true, + "template": "{{org}}{{gCM}}{{material}}{{sMA}}", + "watch": { + "org": "root.igsnMeta.institution", + "gCM": "root.igsnMeta.groupCM", + "material": "root.igsnMeta.material", + "sMA": "root.igsnMeta.submaterialMA" + }, + "options": { + "grid_columns": 12, + "hidden": true + } + }, + "request": { + "type": "boolean", + "propertyOrder": 3, + "title": "Request IGSN", + "description": "Whether to request an IGSN.", + "default": true, + "options": { + "hidden": true, + "grid_columns": 12 + } + }, + "track": { + "type": "boolean", + "propertyOrder": 4, + "title": "Track IGSN", + "description": "Whether to create Sample tracking.", + "default": true, + "options": { + "hidden": true, + "grid_columns": 12 + } + }, + "field": { + "type": "string", + "propertyOrder": 5, + "title": "Field with IGSN prefix", + "const": "assignedIGSN", + "default": "assignedIGSN", + "options": { + "hidden": true, + "grid_columns": 12 + } + }, + "batch": { + "type": "object", + "propertyOrder": 6, + "properties": { + "method": { + "type": "string", + "propertyOrder": 1, + "title": "Batching Method", + "default": "imqcam", + "options": { + "hidden": true + } + } + } + } + } + }, + "geometry": { + "type": "object", + "format": "grid-strict", + "properties": { + "geometryType": { + "title": "Geometry Type", + "type": "string", + "enum": [ + "4PTF", + "TEN", + "AXFT" + ], + "options": { + "grid_columns": 6, + "enum_titles": [ + "4PTF (4-point bending fatigue)", + "TEN (Tensile)", + "AXFT (Axial Fatigue)" + ] + }, + "propertyOrder": 0, + "description": "The geometry type available for the build" + }, + "count": { + "title": "Count", + "type": "number", + "minimum": 1, + "maximum": 1000, + "propertyOrder": 1, + "options": { + "grid_columns": 6 + }, + "description": "The number of parts that can be built with this geometry type" + } + }, + "description": "Geometry type for the build" + }, + "buildParameterSet": { + "title": "Build parameter set", + "type": "object", + "properties": { + "laserPower": { + "title": "Laser Power (W)", + "type": "number", + "minimum": 0, + "maximum": 370 + }, + "laserVelocity": { + "title": "Laser Velocity (mm/s)", + "type": "number", + "minimum": 0, + "maximum": 10000 + }, + "hatchSpacing": { + "title": "Hatch Spacing (µm)", + "type": "number", + "minimum": 0, + "maximum": 300 + }, + "layerThickness": { + "title": "Layer Thickness (µm)", + "type": "number", + "minimum": 0, + "maximum": 100 + } + }, + "required": [ + "laserPower", + "laserVelocity", + "hatchSpacing", + "layerThickness" + ] + }, + "fileUpload": { + "title": "File", + "type": "object", + "format": "grid", + "properties": { + "file": { + "title": "Upload file", + "type": "string", + "propertyOrder": 0 + }, + "button": { + "title": "Browse", + "format": "button", + "options": { + "button": { + "action": "button1CB", + "uploadFor": "file" + } + }, + "propertyOrder": 2 + } + } + }, + "keyValue": { + "title": "Misc. metadata", + "type": "object", + "format": "grid", + "properties": { + "key": { + "title": "Key", + "type": "string", + "propertyOrder": 0 + }, + "value": { + "title": "Value", + "type": "string", + "propertyOrder": 1 } + }, + "required": [ + "key", + "value" + ] + } + }, + "properties": { + "assignedIGSN": { + "type": "string", + "propertyOrder": 0, + "template": "{{prefix}}{{suffix}}", + "watch": { + "prefix": "igsn.prefix", + "suffix": "igsn.suffix" + }, + "options": { + "hidden": true, + "grid_columns": 12 } }, - "geometry": { + "igsnMeta": { + "$ref": "#/definitions/igsnMetadata", + "propertyOrder": 0, + "options": { + "hidden": true + } + }, + "igsn": { + "$ref": "#/definitions/igsn", + "propertyOrder": 0, + "options": { + "hidden": true + } + }, + "printerBuildID": { + "title": "Printer Build ID", + "description": "Automatically generated identifier for the printer build", + "type": "string", + "template": "{{replaceAll params.runDate '-' ''}}_{{params.location}}_{{material}}{{joinarray extraInfo '_' true}}", + "watch": { + "params": "root.userParameters", + "material": "root.buildPlate.material", + "extraInfo": "root.extraInfo" + }, + "readOnly": true, + "propertyOrder": 1 + }, + "buildMachine": { + "title": "Build Machine", + "description": "Machine used for the build", + "type": "string", + "enum": [ + "EOS M290 at CMU" + ], + "propertyOrder": 2 + }, + "rawPowderID": { + "title": "Raw Powder", + "description": "Reference to a 'Raw Powder Details' entry", + "type": "string", + "enumSource": "girder.formId:663e6d21b18fa1c426e939ab", + "propertyOrder": 3 + }, + "buildGeometries": { + "title": "Build Geometries", + "description": "Available build geometries for the printer", + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "headerTemplate": "Geometry {{i1}}", + "$ref": "#/definitions/geometry" + }, + "propertyOrder": 4, + "options": { + "grid_columns": 12 + }, + "format": "grid" + }, + "extraInfo": { + "title": "Extraneous Information", + "description": "Optional identifiers for split/batch numbers, etc.", + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "propertyOrder": 5 + }, + "buildPlate": { + "title": "Build Plate", "type": "object", - "format": "grid-strict", + "format": "grid", "properties": { - "geometryType": { - "title": "Geometry Type", + "material": { + "title": "Material", "type": "string", "enum": [ - "4PTF", - "TEN", - "AXFT" + "Ti-6Al-4V" ], - "options": { - "grid_columns": 6, - "enum_titles": [ - "4PTF (4-point bending fatigue)", - "TEN (Tensile)", - "AXFT (Axial Fatigue)" - ] - }, - "propertyOrder": 0, - "description": "The geometry type available for the build" + "default": "Ti-6Al-4V", + "propertyOrder": 0 }, - "count": { - "title": "Count", + "temperature": { + "title": "Temperature (C)", "type": "number", - "minimum": 1, - "maximum": 1000, - "propertyOrder": 1, - "options": { - "grid_columns": 6 - }, - "description": "The number of parts that can be built with this geometry type" + "minimum": 0, + "maximum": 450, + "propertyOrder": 1 } }, - "description": "Geometry type for the build" + "required": [ + "material", + "temperature" + ], + "propertyOrder": 7 }, - "buildParameterSet": { - "title": "Build parameter set", + "flowGas": { + "title": "Flow Gas", "type": "object", + "format": "grid", "properties": { - "laserPower": { - "title": "Laser Power (W)", - "type": "number", - "minimum": 0, - "maximum": 370 - }, - "laserVelocity": { - "title": "Laser Velocity (mm/s)", - "type": "number", - "minimum": 0, - "maximum": 10000 + "type": { + "title": "Gas Type", + "type": "string", + "enum": [ + "Ar", + "N2" + ], + "propertyOrder": 0 }, - "hatchSpacing": { - "title": "Hatch Spacing (µm)", + "flowRate": { + "title": "Flow Rate (lpm)", "type": "number", "minimum": 0, - "maximum": 300 + "maximum": 10, + "propertyOrder": 1 }, - "layerThickness": { - "title": "Layer Thickness (µm)", + "o2Concentration": { + "title": "Oxygen Concentration (%)", "type": "number", "minimum": 0, - "maximum": 100 + "maximum": 100, + "propertyOrder": 2 } }, "required": [ - "laserPower", - "laserVelocity", - "hatchSpacing", - "layerThickness" - ] + "type", + "o2Concentration" + ], + "propertyOrder": 8 }, - "fileUpload": { - "title": "File", + "recoater": { + "title": "Recoater", "type": "object", "format": "grid", "properties": { - "file": { - "title": "Upload file", + "material": { + "title": "Material", "type": "string", + "enum": [ + "metal", + "rubber", + "ceramic" + ], "propertyOrder": 0 }, - "button": { - "title": "Browse", - "format": "button", - "options": { - "button": { - "action": "button1CB", - "uploadFor": "file" - } - }, + "style": { + "title": "Style", + "type": "string", + "enum": [ + "rake", + "roller", + "blade" + ], + "propertyOrder": 1 + } + }, + "required": [ + "material", + "style" + ], + "propertyOrder": 9 + }, + "buildParameters": { + "title": "Build Parameters", + "type": "object", + "properties": { + "contouringParameters": { + "title": "Contouring Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 0 + }, + "infillParameters": { + "title": "Infill Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 1 + }, + "upskinParameters": { + "title": "Upskin Parameters", + "$ref": "#/definitions/buildParameterSet", "propertyOrder": 2 + }, + "downskinParameters": { + "title": "Downskin Parameters", + "$ref": "#/definitions/buildParameterSet", + "propertyOrder": 3 } - } + }, + "required": [ + "contouringParameters" + ], + "propertyOrder": 10 }, - "keyValue": { - "title": "Misc. metadata", + "userParameters": { + "title": "User Parameters", "type": "object", "format": "grid", "properties": { - "key": { - "title": "Key", + "runDate": { + "title": "Run Date", "type": "string", + "format": "date", + "description": "Date in YYYY-MM-DD format", + "default": "2025-01-01", "propertyOrder": 0 }, - "value": { - "title": "Value", + "runTime": { + "title": "Run Time", "type": "string", + "format": "time", + "default": "00:00:00", "propertyOrder": 1 + }, + "location": { + "title": "Location", + "description": "Location where the build occurred", + "type": "string", + "options": { + "enum_titles": [ + "Applied Physics Laboratory", + "Carnegie Mellon University", + "Northwestern University" + ] + }, + "default": "CMU", + "enum": [ + "APL", + "CMU", + "NU" + ], + "propertyOrder": 2 + }, + "teamMembers": { + "title": "Team Members", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Evan Adcock", + "Nick Lamprinakos", + "Katie O'Donnell" + ] + }, + "propertyOrder": 3 } }, "required": [ - "key", - "value" - ] + "runDate", + "runTime", + "location", + "teamMembers" + ], + "propertyOrder": 6 + }, + "openjzFile": { + "title": "Build File", + "description": "Upload the build file (*.openjz)", + "type": "string", + "propertyOrder": 11 + }, + "eosReportFile": { + "title": "EOS Report", + "description": "Upload the EOS job quality report (PDF)", + "type": "string", + "propertyOrder": 12 + }, + "misc": { + "title": "Additional Information", + "description": "Key-value pairs for miscellaneous metadata", + "type": "array", + "items": { + "$ref": "#/definitions/keyValue" + }, + "propertyOrder": 13 } }, + "required": [ + "printerBuildID", + "buildMachine", + "rawPowderID", + "buildGeometries", + "userParameters", + "buildPlate", + "flowGas", + "recoater", + "buildParameters", + "openjzFile", + "eosReportFile" + ], "if": { "properties": { - "igsn_request": { - "const": false + "igsn": { + "properties": { + "request": { + "const": false + } + } } } }, "then": { "properties": { - "igsn": { + "igsnMeta": { "options": { "hidden": true }, "readonly": true }, - "igsnId": { + "assignedIGSN": { "options": { "hidden": false }, From 09552998d0921f0590fa090d8e6f322293ea2601 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Wed, 7 May 2025 09:22:19 -0500 Subject: [PATCH 05/20] fix typo in the name --- raw_powder_shema.js => raw_powder_schema.js | 0 raw_powder_shema.json => raw_powder_schema.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename raw_powder_shema.js => raw_powder_schema.js (100%) rename raw_powder_shema.json => raw_powder_schema.json (100%) diff --git a/raw_powder_shema.js b/raw_powder_schema.js similarity index 100% rename from raw_powder_shema.js rename to raw_powder_schema.js diff --git a/raw_powder_shema.json b/raw_powder_schema.json similarity index 100% rename from raw_powder_shema.json rename to raw_powder_schema.json From f2ceaa63b7e7d3eb7b1312814cff786e01ff654e Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Wed, 7 May 2025 09:34:27 -0500 Subject: [PATCH 06/20] Fix and show igsn meta --- printer_build_schema.json | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index 5f06bf7..881c445 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -110,7 +110,8 @@ "superalloys", "Ti-containing" ], - "grid_columns": 3 + "grid_columns": 3, + "grid_break": true } }, "title": { @@ -132,6 +133,7 @@ }, "attributes": { "type": "object", + "propertyOrder": 6, "properties": { "alternateIdentifiers": { "type": "array", @@ -155,12 +157,17 @@ } } } + }, + "options": { + "grid_columns": 12, + "grid_break": true, + "hidden": true } }, "relatedIdentifiers": { "type": "array", "title": "Related Identifiers", - "propertyOrder": 2, + "propertyOrder": 7, "readonly": true, "minItems": 1, "items": { @@ -201,6 +208,11 @@ "default": "/api/v1/form/663e6d21b18fa1c426e939ab/schema" } } + }, + "options": { + "grid_columns": 12, + "grid_break": true, + "hidden": true } } } @@ -427,7 +439,7 @@ "$ref": "#/definitions/igsnMetadata", "propertyOrder": 0, "options": { - "hidden": true + "hidden": false } }, "igsn": { From f782d7b53c44a2676cbd8d4601f2af68914b4ff4 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Mon, 16 Jun 2025 09:56:20 -0500 Subject: [PATCH 07/20] Enable file upload for printer builds --- printer_build_schema.json | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index 881c445..3aa8092 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -384,7 +384,7 @@ "file": { "title": "Upload file", "type": "string", - "propertyOrder": 0 + "propertyOrder": 1 }, "button": { "title": "Browse", @@ -396,6 +396,18 @@ } }, "propertyOrder": 2 + }, + "targetPath": { + "type": "string", + "title": "Target Path", + "watch": { + "path": "root.printerBuildID" + }, + "template": "{{path}}", + "options": { + "hidden": true + }, + "propertyOrder": 3 } } }, @@ -693,13 +705,13 @@ "openjzFile": { "title": "Build File", "description": "Upload the build file (*.openjz)", - "type": "string", + "$ref": "#/definitions/fileUpload", "propertyOrder": 11 }, "eosReportFile": { "title": "EOS Report", "description": "Upload the EOS job quality report (PDF)", - "type": "string", + "$ref": "#/definitions/fileUpload", "propertyOrder": 12 }, "misc": { From cf2abe2289da7d7d6726ff86a10be0d4367eb9a8 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Tue, 5 Aug 2025 13:53:39 -0500 Subject: [PATCH 08/20] Add missing split function --- archival_uli_build_simple.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/archival_uli_build_simple.js b/archival_uli_build_simple.js index 22b271f..b4957ea 100644 --- a/archival_uli_build_simple.js +++ b/archival_uli_build_simple.js @@ -34,3 +34,11 @@ window.JSONEditor.defaults.callbacks.autocomplete = { } } }; + +Handlebars.registerHelper('split', function (string, separator, index) { + try { + return string.split(separator)[index].trim(); + } catch (e) { + return ''; + } +}); From ef3de9dcc6e6ac0e8846e6e48cd41ea5ed02785b Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Fri, 15 Aug 2025 13:46:51 -0500 Subject: [PATCH 09/20] Add Nickel Alloy 718 to raw powder --- raw_powder_schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/raw_powder_schema.json b/raw_powder_schema.json index 278bd7c..faf3b04 100644 --- a/raw_powder_schema.json +++ b/raw_powder_schema.json @@ -23,7 +23,8 @@ "title": "Powder Alloy", "type": "string", "enum": [ - "Ti-6Al-4V" + "Ti-6Al-4V", + "IN718" ], "propertyOrder": 1 }, From 74f02f4602ad5095d687ff5fdd5bac87f4bb3452 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Tue, 26 Aug 2025 10:54:18 -0500 Subject: [PATCH 10/20] Convert raw powder to array --- printer_build_schema.json | 60 ++++----------------------------------- 1 file changed, 6 insertions(+), 54 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index 3aa8092..ee236d4 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -163,57 +163,6 @@ "grid_break": true, "hidden": true } - }, - "relatedIdentifiers": { - "type": "array", - "title": "Related Identifiers", - "propertyOrder": 7, - "readonly": true, - "minItems": 1, - "items": { - "type": "object", - "properties": { - "relatedIdentifier": { - "type": "string", - "title": "Related Identifier", - "propertyOrder": 1, - "readonly": true, - "watch": { - "powderId": "root.rawPowderID" - }, - "template": "/api/v1/entry/{{powderId}}" - }, - "relatedIdentifierType": { - "type": "string", - "propertyOrder": 2, - "readonly": true, - "enum": [ - "URL", - "IGSN", - "DOI", - "Other" - ], - "default": "URL" - }, - "relationType": { - "type": "string", - "propertyOrder": 3, - "readonly": true, - "default": "HasMetadata" - }, - "relatedMetadataScheme": { - "type": "string", - "propertyOrder": 4, - "readonly": true, - "default": "/api/v1/form/663e6d21b18fa1c426e939ab/schema" - } - } - }, - "options": { - "grid_columns": 12, - "grid_break": true, - "hidden": true - } } } }, @@ -484,10 +433,13 @@ "propertyOrder": 2 }, "rawPowderID": { - "title": "Raw Powder", + "title": "Raw Powders", "description": "Reference to a 'Raw Powder Details' entry", - "type": "string", - "enumSource": "girder.formId:663e6d21b18fa1c426e939ab", + "type": "array", + "items": { + "type": "string", + "enumSource": "girder.formId:663e6d21b18fa1c426e939ab" + }, "propertyOrder": 3 }, "buildGeometries": { From 59aa1cf81e4e9a256b5ebe9b63c066ec24ea3eff Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Tue, 26 Aug 2025 10:56:44 -0500 Subject: [PATCH 11/20] Rename buildFile and reportFile --- printer_build_schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index ee236d4..82859a6 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -654,15 +654,15 @@ ], "propertyOrder": 6 }, - "openjzFile": { + "buildFile": { "title": "Build File", - "description": "Upload the build file (*.openjz)", + "description": "Upload the build file (e.g. *.openjz)", "$ref": "#/definitions/fileUpload", "propertyOrder": 11 }, - "eosReportFile": { - "title": "EOS Report", - "description": "Upload the EOS job quality report (PDF)", + "reportFile": { + "title": "Build Report File", + "description": "Upload e.g. the EOS job quality report (PDF)", "$ref": "#/definitions/fileUpload", "propertyOrder": 12 }, From 079058d941c077706096f4bddb1cdae02309ae0d Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Tue, 26 Aug 2025 10:57:41 -0500 Subject: [PATCH 12/20] IN718 -> alloy718 --- raw_powder_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raw_powder_schema.json b/raw_powder_schema.json index faf3b04..d6d1d99 100644 --- a/raw_powder_schema.json +++ b/raw_powder_schema.json @@ -24,7 +24,7 @@ "type": "string", "enum": [ "Ti-6Al-4V", - "IN718" + "alloy718" ], "propertyOrder": 1 }, From af47b4027ef8707842b991c0e3a0d523b7df7598 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Wed, 27 Aug 2025 10:52:20 -0500 Subject: [PATCH 13/20] Make powder characteristics optional --- raw_powder_schema.json | 50 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/raw_powder_schema.json b/raw_powder_schema.json index d6d1d99..1f4ae3b 100644 --- a/raw_powder_schema.json +++ b/raw_powder_schema.json @@ -127,47 +127,85 @@ "type": "object", "format": "grid", "properties": { + "tested": { + "title": "Tested?", + "description": "Check if particle size distribution and virgin powder percentage are known", + "type": "boolean", + "format": "checkbox", + "default": true, + "propertyOrder": 0 + }, "minSize": { "title": "Min Particle Size (microns)", "type": "number", "minimum": 10, "maximum": 100, - "propertyOrder": 0 + "propertyOrder": 1, + "options": { + "dependencies": { + "tested": true + } + } }, "tenthPercentileSize": { "title": "D10 Particle Size (microns)", "type": "number", "minimum": 10, "maximum": 100, - "propertyOrder": 1 + "propertyOrder": 2, + "options": { + "dependencies": { + "tested": true + } + } }, "fiftiethPercentileSize": { "title": "D50 Particle Size (microns)", "type": "number", "minimum": 10, "maximum": 100, - "propertyOrder": 2 + "propertyOrder": 3, + "options": { + "dependencies": { + "tested": true + } + } }, "ninetiethPercentileSize": { "title": "D90 Particle Size (microns)", "type": "number", "minimum": 10, "maximum": 100, - "propertyOrder": 3 + "propertyOrder": 4, + "options": { + "dependencies": { + "tested": true + } + } }, "maxSize": { "title": "Max Particle Size (microns)", "type": "number", "minimum": 10, "maximum": 100, - "propertyOrder": 4 + "propertyOrder": 5, + "options": { + "dependencies": { + "tested": true + } + } }, "virginPercent": { "title": "Virgin Powder %", "type": "number", "minimum": 0, "maximum": 100, - "propertyOrder": 5 + "propertyOrder": 6, + "options": { + "dependencies": { + "tested": true + } + } } }, "propertyOrder": 8 From 798e2e821832031d7274f847ac3ae894abbdd9f2 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Wed, 27 Aug 2025 11:09:27 -0500 Subject: [PATCH 14/20] Fix required props --- printer_build_schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index 82859a6..1730afe 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -686,8 +686,8 @@ "flowGas", "recoater", "buildParameters", - "openjzFile", - "eosReportFile" + "buildFile", + "reportFile" ], "if": { "properties": { From 4fc1185cab48f6ba8dbc38a20dd804c55f5db36b Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Thu, 28 Aug 2025 11:34:28 -0500 Subject: [PATCH 15/20] apply formatting to raw_powder_schema.json --- raw_powder_schema.json | 680 ++++++++++++++++++++--------------------- 1 file changed, 340 insertions(+), 340 deletions(-) diff --git a/raw_powder_schema.json b/raw_powder_schema.json index 1f4ae3b..f80b057 100644 --- a/raw_powder_schema.json +++ b/raw_powder_schema.json @@ -1,358 +1,358 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Raw Feed Powder", - "description": "Metadata associated with a batch of powder used as raw material for metals added manufacturing", - "type": "object", - "properties": { - "rawPowderID": { - "title": "Raw Powder ID", - "description": "Must be unique among all raw powders", - "type": "string", - "format": "custom", - "template": "PWD_{{alloy}}_{{supplyCompany}}_{{purchaser}}_{{padNumber sampleNumber 3}}{{joinarray extraInfo '_' true}}", - "watch": { - "supplyCompany": "root.supplyCompany", - "alloy": "root.alloy", - "purchaser": "root.purchaser", - "sampleNumber": "root.sampleNumber", - "extraInfo": "root.extraInfo" - }, - "propertyOrder": 0 + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Raw Feed Powder", + "description": "Metadata associated with a batch of powder used as raw material for metals added manufacturing", + "type": "object", + "properties": { + "rawPowderID": { + "title": "Raw Powder ID", + "description": "Must be unique among all raw powders", + "type": "string", + "format": "custom", + "template": "PWD_{{alloy}}_{{supplyCompany}}_{{purchaser}}_{{padNumber sampleNumber 3}}{{joinarray extraInfo '_' true}}", + "watch": { + "supplyCompany": "root.supplyCompany", + "alloy": "root.alloy", + "purchaser": "root.purchaser", + "sampleNumber": "root.sampleNumber", + "extraInfo": "root.extraInfo" + }, + "propertyOrder": 0 + }, + "alloy": { + "title": "Powder Alloy", + "type": "string", + "enum": [ + "Ti-6Al-4V", + "alloy718" + ], + "propertyOrder": 1 + }, + "supplyCompany": { + "title": "Supply Company", + "type": "string", + "options": { + "enum_titles": [ + "ATI", + "Elementum", + "Carpenter", + "EOS", + "Kennametal", + "Tekna", + "AP&C", + "P&C", + "Unknown" + ] + }, + "enum": [ + "ATI", + "ELE", + "CAR", + "EOS", + "KEN", + "TEK", + "APC", + "PC", + "UNK" + ], + "propertyOrder": 2 + }, + "purchaser": { + "title": "Purchaser", + "type": "string", + "options": { + "enum_titles": [ + "Applied Physics Laboratory", + "Carnegie Mellon University", + "Northwestern University", + "Johns Hopkins University", + "Vanderbilt University", + "University of Texas at San Antonio", + "University of Virginia", + "Case Western Reserve University", + "Southwest Research Institute", + "Pratt & Whitney" + ] + }, + "enum": [ + "APL", + "CMU", + "NU", + "JHU", + "VU", + "UTSA", + "UVA", + "CWRU", + "SWRI", + "PW" + ], + "propertyOrder": 3 + }, + "sampleNumber": { + "title": "Sample Number", + "description": "Sequential identifier for this sample of powder", + "type": "integer", + "propertyOrder": 4 + }, + "extraInfo": { + "title": "Extraneous Information", + "description": "Optional identifiers for split/batch numbers, etc.", + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "propertyOrder": 5 + }, + "batchInformation": { + "title": "Additional batch information", + "description": "String-only keys/values for misc. metadata (not validated)", + "type": "array", + "items": { + "$ref": "#/definitions/keyValue" + }, + "propertyOrder": 6 + }, + "composition": { + "title": "Powder Composition", + "type": "array", + "items": { + "$ref": "#/definitions/compositionElement" + }, + "minItems": 1, + "propertyOrder": 7 + }, + "characteristics": { + "title": "Powder Characteristics", + "type": "object", + "format": "grid", + "properties": { + "tested": { + "title": "Tested?", + "description": "Check if particle size distribution and virgin powder percentage are known", + "type": "boolean", + "format": "checkbox", + "default": true, + "propertyOrder": 0 }, - "alloy": { - "title": "Powder Alloy", - "type": "string", - "enum": [ - "Ti-6Al-4V", - "alloy718" - ], - "propertyOrder": 1 + "minSize": { + "title": "Min Particle Size (microns)", + "type": "number", + "minimum": 10, + "maximum": 100, + "propertyOrder": 1, + "options": { + "dependencies": { + "tested": true + } + } }, - "supplyCompany": { - "title": "Supply Company", - "type": "string", - "options": { - "enum_titles": [ - "ATI", - "Elementum", - "Carpenter", - "EOS", - "Kennametal", - "Tekna", - "AP&C", - "P&C", - "Unknown" - ] - }, - "enum": [ - "ATI", - "ELE", - "CAR", - "EOS", - "KEN", - "TEK", - "APC", - "PC", - "UNK" - ], - "propertyOrder": 2 + "tenthPercentileSize": { + "title": "D10 Particle Size (microns)", + "type": "number", + "minimum": 10, + "maximum": 100, + "propertyOrder": 2, + "options": { + "dependencies": { + "tested": true + } + } }, - "purchaser": { - "title": "Purchaser", - "type": "string", - "options": { - "enum_titles": [ - "Applied Physics Laboratory", - "Carnegie Mellon University", - "Northwestern University", - "Johns Hopkins University", - "Vanderbilt University", - "University of Texas at San Antonio", - "University of Virginia", - "Case Western Reserve University", - "Southwest Research Institute", - "Pratt & Whitney" - ] - }, - "enum": [ - "APL", - "CMU", - "NU", - "JHU", - "VU", - "UTSA", - "UVA", - "CWRU", - "SWRI", - "PW" - ], - "propertyOrder": 3 + "fiftiethPercentileSize": { + "title": "D50 Particle Size (microns)", + "type": "number", + "minimum": 10, + "maximum": 100, + "propertyOrder": 3, + "options": { + "dependencies": { + "tested": true + } + } }, - "sampleNumber": { - "title": "Sample Number", - "description": "Sequential identifier for this sample of powder", - "type": "integer", - "propertyOrder": 4 + "ninetiethPercentileSize": { + "title": "D90 Particle Size (microns)", + "type": "number", + "minimum": 10, + "maximum": 100, + "propertyOrder": 4, + "options": { + "dependencies": { + "tested": true + } + } + }, + "maxSize": { + "title": "Max Particle Size (microns)", + "type": "number", + "minimum": 10, + "maximum": 100, + "propertyOrder": 5, + "options": { + "dependencies": { + "tested": true + } + } + }, + "virginPercent": { + "title": "Virgin Powder %", + "type": "number", + "minimum": 0, + "maximum": 100, + "propertyOrder": 6, + "options": { + "dependencies": { + "tested": true + } + } + } + }, + "propertyOrder": 8 + }, + "files": { + "title": "Associated Files", + "type": "array", + "items": { + "$ref": "#/definitions/fileUpload" + }, + "propertyOrder": 9 + } + }, + "required": [ + "rawPowderID", + "alloy", + "composition", + "supplyCompany", + "characteristics" + ], + "definitions": { + "keyValue": { + "title": "Misc. metadata", + "type": "object", + "format": "grid", + "properties": { + "key": { + "title": "Key", + "type": "string", + "propertyOrder": 0 }, - "extraInfo": { - "title": "Extraneous Information", - "description": "Optional identifiers for split/batch numbers, etc.", - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "propertyOrder": 5 + "value": { + "title": "Value", + "type": "string", + "propertyOrder": 1 + } + }, + "required": [ + "key", + "value" + ] + }, + "compositionElement": { + "title": "Element", + "type": "object", + "format": "grid", + "properties": { + "element": { + "title": "Element", + "type": "string", + "enum": [ + "Ti", + "Al", + "V", + "Ni", + "Cr", + "Fe", + "Mo", + "Nb", + "Ta", + "Co", + "Mn", + "Cu", + "Si", + "C", + "S", + "P", + "B", + "O", + "N", + "H", + "Y" + ], + "propertyOrder": 0 }, - "batchInformation": { - "title": "Additional batch information", - "description": "String-only keys/values for misc. metadata (not validated)", - "type": "array", - "items": { - "$ref": "#/definitions/keyValue" - }, - "propertyOrder": 6 + "amount": { + "title": "Amount", + "type": "number", + "minimum": 0, + "maximum": 100, + "propertyOrder": 1 }, - "composition": { - "title": "Powder Composition", - "type": "array", - "items": { - "$ref": "#/definitions/compositionElement" - }, - "minItems": 1, - "propertyOrder": 7 + "isBalance": { + "title": "Balance?", + "type": "boolean", + "format": "checkbox", + "propertyOrder": 2 }, - "characteristics": { - "title": "Powder Characteristics", - "type": "object", - "format": "grid", - "properties": { - "tested": { - "title": "Tested?", - "description": "Check if particle size distribution and virgin powder percentage are known", - "type": "boolean", - "format": "checkbox", - "default": true, - "propertyOrder": 0 - }, - "minSize": { - "title": "Min Particle Size (microns)", - "type": "number", - "minimum": 10, - "maximum": 100, - "propertyOrder": 1, - "options": { - "dependencies": { - "tested": true - } - } - }, - "tenthPercentileSize": { - "title": "D10 Particle Size (microns)", - "type": "number", - "minimum": 10, - "maximum": 100, - "propertyOrder": 2, - "options": { - "dependencies": { - "tested": true - } - } - }, - "fiftiethPercentileSize": { - "title": "D50 Particle Size (microns)", - "type": "number", - "minimum": 10, - "maximum": 100, - "propertyOrder": 3, - "options": { - "dependencies": { - "tested": true - } - } - }, - "ninetiethPercentileSize": { - "title": "D90 Particle Size (microns)", - "type": "number", - "minimum": 10, - "maximum": 100, - "propertyOrder": 4, - "options": { - "dependencies": { - "tested": true - } - } - }, - "maxSize": { - "title": "Max Particle Size (microns)", - "type": "number", - "minimum": 10, - "maximum": 100, - "propertyOrder": 5, - "options": { - "dependencies": { - "tested": true - } - } - }, - "virginPercent": { - "title": "Virgin Powder %", - "type": "number", - "minimum": 0, - "maximum": 100, - "propertyOrder": 6, - "options": { - "dependencies": { - "tested": true - } - } - } - }, - "propertyOrder": 8 + "unit": { + "title": "Unit of measure", + "type": "string", + "enum": [ + "%", + "max %" + ], + "propertyOrder": 3 }, - "files": { - "title": "Associated Files", - "type": "array", - "items": { - "$ref": "#/definitions/fileUpload" - }, - "propertyOrder": 9 + "method": { + "title": "Method", + "type": "string", + "enum": [ + "WET (Inductively coupled plasma emission)", + "GAS (Inert gas fusion)", + "CS (Combustion/IR detection)", + "NA (for balance)" + ], + "propertyOrder": 4 } + }, + "required": [ + "element", + "amount", + "isBalance", + "unit", + "method" + ] }, - "required": [ - "rawPowderID", - "alloy", - "composition", - "supplyCompany", - "characteristics" - ], - "definitions": { - "keyValue": { - "title": "Misc. metadata", - "type": "object", - "format": "grid", - "properties": { - "key": { - "title": "Key", - "type": "string", - "propertyOrder": 0 - }, - "value": { - "title": "Value", - "type": "string", - "propertyOrder": 1 - } - }, - "required": [ - "key", - "value" - ] + "fileUpload": { + "title": "File", + "type": "object", + "format": "grid", + "properties": { + "file": { + "title": "Upload file", + "type": "string", + "propertyOrder": 0 }, - "compositionElement": { - "title": "Element", - "type": "object", - "format": "grid", - "properties": { - "element": { - "title": "Element", - "type": "string", - "enum": [ - "Ti", - "Al", - "V", - "Ni", - "Cr", - "Fe", - "Mo", - "Nb", - "Ta", - "Co", - "Mn", - "Cu", - "Si", - "C", - "S", - "P", - "B", - "O", - "N", - "H", - "Y" - ], - "propertyOrder": 0 - }, - "amount": { - "title": "Amount", - "type": "number", - "minimum": 0, - "maximum": 100, - "propertyOrder": 1 - }, - "isBalance": { - "title": "Balance?", - "type": "boolean", - "format": "checkbox", - "propertyOrder": 2 - }, - "unit": { - "title": "Unit of measure", - "type": "string", - "enum": [ - "%", - "max %" - ], - "propertyOrder": 3 - }, - "method": { - "title": "Method", - "type": "string", - "enum": [ - "WET (Inductively coupled plasma emission)", - "GAS (Inert gas fusion)", - "CS (Combustion/IR detection)", - "NA (for balance)" - ], - "propertyOrder": 4 - } - }, - "required": [ - "element", - "amount", - "isBalance", - "unit", - "method" - ] + "fileType": { + "title": "Type of File", + "type": "string", + "enum": [ + "Manufacturer report PDF" + ], + "propertyOrder": 1 }, - "fileUpload": { - "title": "File", - "type": "object", - "format": "grid", - "properties": { - "file": { - "title": "Upload file", - "type": "string", - "propertyOrder": 0 - }, - "fileType": { - "title": "Type of File", - "type": "string", - "enum": [ - "Manufacturer report PDF" - ], - "propertyOrder": 1 - }, - "button": { - "title": "Browse", - "format": "button", - "options": { - "button": { - "action": "button1CB", - "uploadFor": "file" - } - }, - "propertyOrder": 2 - } + "button": { + "title": "Browse", + "format": "button", + "options": { + "button": { + "action": "button1CB", + "uploadFor": "file" } + }, + "propertyOrder": 2 } + } } + } } From ffb7e37738a9fadd55d569f9f013ea80c0864fda Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Thu, 28 Aug 2025 11:36:31 -0500 Subject: [PATCH 16/20] Allow to view/download files uploaded via form --- printer_build_schema.json | 21 ++++++++++++++++++--- raw_powder_schema.json | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/printer_build_schema.json b/printer_build_schema.json index 1730afe..8150fe6 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -331,12 +331,27 @@ "format": "grid", "properties": { "file": { - "title": "Upload file", + "title": "Uploaded File ID", "type": "string", - "propertyOrder": 1 + "propertyOrder": 1, + "links": [ + { + "rel": "View", + "title": "View", + "href": "/api/v1/file/{{self}}/download?contentDisposition=inline", + "class": "girder-file-link" + }, + { + "rel": "Download", + "title": "Download", + "href": "/api/v1/file/{{self}}/download", + "download": true, + "class": "girder-file-link" + } + ] }, "button": { - "title": "Browse", + "title": "Click to Upload", "format": "button", "options": { "button": { diff --git a/raw_powder_schema.json b/raw_powder_schema.json index f80b057..d289ddc 100644 --- a/raw_powder_schema.json +++ b/raw_powder_schema.json @@ -329,9 +329,24 @@ "format": "grid", "properties": { "file": { - "title": "Upload file", + "title": "Uploaded File ID", "type": "string", - "propertyOrder": 0 + "propertyOrder": 0, + "links": [ + { + "rel": "View", + "title": "View", + "href": "/api/v1/file/{{self}}/download?contentDisposition=inline", + "class": "girder-file-link" + }, + { + "rel": "Download", + "title": "Download", + "href": "/api/v1/file/{{self}}/download", + "download": true, + "class": "girder-file-link" + } + ] }, "fileType": { "title": "Type of File", @@ -342,7 +357,7 @@ "propertyOrder": 1 }, "button": { - "title": "Browse", + "title": "Click to Upload", "format": "button", "options": { "button": { From 5bede3c6f54374c3d9e45dd35f3d784ca2349d7a Mon Sep 17 00:00:00 2001 From: APonugoti1 Date: Fri, 10 Oct 2025 15:18:59 -0400 Subject: [PATCH 17/20] Added Form for Factrography Test data (#15) Adding Factrography form --- factrography_schema.js | 60 +++++++++ factrography_schema.json | 264 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 324 insertions(+) create mode 100644 factrography_schema.js create mode 100644 factrography_schema.json diff --git a/factrography_schema.js b/factrography_schema.js new file mode 100644 index 0000000..cd21f54 --- /dev/null +++ b/factrography_schema.js @@ -0,0 +1,60 @@ + +// Autocomplete helpers +window.JSONEditor.defaults.callbacks.autocomplete = { + 'search_deposition': function (editor, input) { + if (input.length < 3) return []; + return restRequest({ + url: 'deposition', + method: 'GET', + data: { q: input, limit: 10 } + }); + }, + 'render_deposition': function (editor, result, props) { + try { + const localId = result.metadata.alternateIdentifiers.find( + (id) => id.alternateIdentifierType.toLowerCase() === 'local' + ); + return `
  • ${result.igsn} (localId: ${localId.alternateIdentifier})
  • `; + } catch (e) { + return `
  • ${result.igsn} (title: ${result.metadata.titles[0]['title']})
  • `; + } + }, + 'get_deposition_value': function (editor, result) { + try { + const localId = result.metadata.alternateIdentifiers.find( + (id) => id.alternateIdentifierType.toLowerCase() === 'local' + ); + return `${result.igsn} - ${result._id} - ${localId.alternateIdentifier}`; + } catch (e) { + return `${result.igsn} - ${result._id} - no localId`; + } + } +}; + +// Handlebars helpers +Handlebars.registerHelper('sqrt', function (area) { + try { + return Number(Math.sqrt(area)); + } + catch (e) { + return 0; + } +}); + +Handlebars.registerHelper('equidiameter', function (area) { + try { + const val = parseFloat(area); + if (isNaN(val)) return 0; // return 0 if area is invalid + return Number(Math.sqrt((4 * val) / Math.PI).toFixed(8)); + } catch (e) { + return 0; + } +}); + +Handlebars.registerHelper('split', function (string, separator, index) { + try { + return string.split(separator)[index].trim(); + } catch (e) { + return ''; + } +}); \ No newline at end of file diff --git a/factrography_schema.json b/factrography_schema.json new file mode 100644 index 0000000..081bca6 --- /dev/null +++ b/factrography_schema.json @@ -0,0 +1,264 @@ +{ + "title": "Factrography Test Data Schema", + "description": "Schema for Factrography test data", + "type": "object", + "properties": { + "lookup": { + "type": "string", + "title": "IGSN", + "description": "Lookup for the IGSN of the sample", + "format": "autocomplete", + "options": { + "autocomplete": { + "search": "search_deposition", + "renderResult": "render_deposition", + "getResultValue": "get_deposition_value", + "autoSelect": true, + "debounceTime": 500 + } + }, + "propertyOrder": 0 + }, + "depositionId": { + "type": "string", + "title": "IGSN ID", + "description": "Unique identifier for the deposition", + "readOnly": true, + "propertyOrder": 999, + "watch": { + "igsn": "lookup" + }, + "template": "{{split igsn ' - ' 1}}", + "options": { + "grid_columns": 12, + "hidden": true + } + }, + "buildId": { + "type": "string", + "title": "Build ID", + "description": "Unique identifier for the build", + "readOnly": true, + "format": "text", + "propertyOrder": 1, + "watch": { + "igsn": "lookup" + }, + "template": "{{split igsn ' - ' 2}}", + "options": { + "grid_columns": 12 + } + }, + "tests": { + "type": "array", + "title": "Tests", + "description": "Note: All values in this form are in µm (micrometers).", + "format": "tabs", + "propertyOrder": 2, + "minItems": 1, + "items": { + "type": "object", + "format": "grid-strict", + "id": "arr_items", + "required": ["testNumber"], + "properties": { + "testNumber": { + "type": "integer", + "title": "Test Number", + "propertyOrder": 0, + "options": { + "grid_columns": 4 + } + }, + "Retest": { + "type": "integer", + "title": "Retest", + "propertyOrder": 1, + "enum": [ 0,1], + "options": { + "grid_columns": 4 + } + }, + "Defect_Type": { + "type": "string", + "title": "Defect Type", + "enum": [ + "LOF", + "Keyhole", + "Gas_Pore", + "" + ], + "propertyOrder": 2, + "options": { + "grid_columns": 4 + } + }, + "Fatigue_Tensile": { + "type": "string", + "title": "Fatigue Tensile", + "enum": [ + "fatigue", "tensile", + "" + ], + "propertyOrder": 3, + "options": { + "grid_columns": 4 + } + }, + "Initiated_at_Chamfer": { + "type": "string", + "title": "Initiated at Chamfer", + "propertyOrder": 4, + "enum": ["Yes","No",""], + "options": { + "grid_columns": 4 + } + }, + "Surface_Subsurface": { + "type": "string", + "title": "Surface/Subsurface", + "enum": [ + "subsurface", + "Surface", + "" + ], + "propertyOrder": 5, + "options": { + "grid_columns": 4 + } + }, + "area": { + "type": "number", + "title": "Area", + "propertyOrder": 6, + "options": { + "grid_columns": 4 + } + }, + "x": { + "type": "number", + "title": "X coordinate", + "propertyOrder": 7, + "options": { + "grid_columns": 4 + } + }, + "y": { + "type": "number", + "title": "Y coordinate", + "propertyOrder": 8, + "options": { + "grid_columns": 4 + } + }, + "perimeter": { + "type": "number", + "title": "Perimeter", + "propertyOrder": 9, + "options": { + "grid_columns": 4 + } + }, + "circ": { + "type": "number", + "title": "Circularity", + "propertyOrder": 10, + "options": { + "grid_columns": 4 + } + }, + "feret": { + "type": "number", + "title": "Feret", + "propertyOrder": 11, + "options": { + "grid_columns": 4 + } + }, + "feretX": { + "type": "number", + "title": "Feret X", + "propertyOrder": 12, + "options": { + "grid_columns": 4 + } + }, + "feretY": { + "type": "number", + "title": "Feret Y", + "propertyOrder": 13, + "options": { + "grid_columns": 4 + } + }, + "feretAngle": { + "type": "number", + "title": "Feret Angle", + "propertyOrder": 14, + "options": { + "grid_columns": 4 + } + }, + "minFeret": { + "type": "number", + "title": "Min Feret", + "propertyOrder": 15, + "options": { + "grid_columns": 4 + } + }, + "aspRatio": { + "type": "number", + "title": "Aspect Ratio", + "propertyOrder": 16, + "options": { + "grid_columns": 4 + } + }, + "roundness": { + "type": "number", + "title": "Roundness", + "propertyOrder": 17, + "options": { + "grid_columns": 4 + } + }, + "convexity": { + "type": "number", + "title": "Convexity", + "propertyOrder": 18, + "options": { + "grid_columns": 4 + } + }, + "rootArea": { + "type": "number", + "title": "Root Area", + "readOnly": true, + "template": "{{sqrt area}}", + "watch": { + "area": "arr_items.area" + }, + "propertyOrder": 19, + "options": { + "grid_columns": 4 + } + }, + "equidiameter": { + "type": "number", + "title": "Equidiameter", + "readOnly": true, + "template": "{{equidiameter area}}", + "watch": { + "area": "arr_items.area" + }, + "propertyOrder": 20, + "options": { + "grid_columns": 4 + } + } + } + } + } + } +} From 73495c85c44a90182991b2be48053598473f8245 Mon Sep 17 00:00:00 2001 From: APonugoti1 Date: Wed, 26 Nov 2025 13:33:11 -0500 Subject: [PATCH 18/20] Testing by adding ASTM Standard ID for common data model --- test.js | 44 ++++++++++++++++++++++++++ test.json | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 test.js create mode 100644 test.json diff --git a/test.js b/test.js new file mode 100644 index 0000000..14eddf6 --- /dev/null +++ b/test.js @@ -0,0 +1,44 @@ +window.JSONEditor.defaults.callbacks.autocomplete = { + 'search_deposition': function (editor, input) { + if (input.length < 3) { + return []; + } + + return restRequest({ + url: 'deposition', + method: 'GET', + data: { + q: input, + limit: 10 + } + }) + }, + 'render_deposition': function (editor, result, props) { + try { + const localId = result.metadata.alternateIdentifiers.find( + (id) => id.alternateIdentifierType.toLowerCase() === 'local' + ); + return `
  • ${result.igsn} (localId: ${localId.alternateIdentifier})
  • `; + } catch (e) { + return `
  • ${result.igsn} (title: ${result.metadata.titles[0]['title']})
  • `; + } + }, + 'get_deposition_value': function (editor, result) { + try { + const localId = result.metadata.alternateIdentifiers.find( + (id) => id.alternateIdentifierType.toLowerCase() === 'local' + ); + return `${result.igsn} - ${result._id} - ${localId.alternateIdentifier}`; + } catch (e) { + return `${result.igsn} - ${result._id} - no localId`; + } + } +}; + +Handlebars.registerHelper('split', function (string, separator, index) { + try { + return string.split(separator)[index].trim(); + } catch (e) { + return ''; + } +}); \ No newline at end of file diff --git a/test.json b/test.json new file mode 100644 index 0000000..3d81a0f --- /dev/null +++ b/test.json @@ -0,0 +1,93 @@ +{ + "title": "Archival ULI Build (simplified)", + "description": "Schema for Archival ULI Builds, only selected fields are included", + "type": "object", + "properties": { + "lookup": { + "type": "string", + "title": "IGSN", + "description": "Lookup for the IGSN of the sample", + "format": "autocomplete", + "options": { + "autocomplete": { + "search": "search_deposition", + "renderResult": "render_deposition", + "getResultValue": "get_deposition_value", + "autoSelect": true, + "debounceTime": 500 + } + }, + "propertyOrder": 0 + }, + "depositionId": { + "type": "string", + "title": "IGSN ID", + "description": "Unique identifier for the deposition", + "readOnly": true, + "propertyOrder": 999, + "watch": { + "igsn": "lookup" + }, + "template": "{{split igsn ' - ' 1}}", + "options": { + "grid_columns": 12, + "hidden": true + } + }, + "buildId": { + "type": "string", + "title": "Build ID", + "description": "Unique identifier for the build", + "readOnly": true, + "format": "text", + "propertyOrder": 1, + "watch": { + "igsn": "lookup" + }, + "template": "{{split igsn ' - ' 2}}", + "options": { + "grid_columns": 12 + } + }, + "location": { + "type": "string", + "title": "Location", + "default": "CMU", + "enum": ["CMU", "CWRU", "Tugce", "ASM", "Unknown"], + "propertyOrder": 2 + }, + "projectName": { + "type": "string", + "title": "Project Name", + "default": "ULI", + "enum": ["ULI", "STRI", "Unknown"], + "propertyOrder": 3 + }, + "scanPower": { + "type": "number", + "description": "PRD-3-4", + "title": "Scan Power (W)", + "propertyOrder": 4 + }, + "scanVelocity": { + "type": "number", + "description": "PRD-3-8", + "title": "Scan velocity (mm/s)", + "propertyOrder": 5 + }, + "hatchSpacing": { + "type": "number", + "description": "PRC-3-2-6", + "title": "Hatch Spacing (mm)", + "propertyOrder": 6 + } + }, + "required": [ + "buildId", + "location", + "projectName", + "scanPower", + "scanVelocity", + "hatchSpacing" + ] +} \ No newline at end of file From 46c0b38b183aca24004f1fa5891a419e1f942611 Mon Sep 17 00:00:00 2001 From: APonugoti1 Date: Tue, 2 Dec 2025 19:15:52 -0500 Subject: [PATCH 19/20] Deleted test .js and .json files --- test.js | 44 -------------------------- test.json | 93 ------------------------------------------------------- 2 files changed, 137 deletions(-) delete mode 100644 test.js delete mode 100644 test.json diff --git a/test.js b/test.js deleted file mode 100644 index 14eddf6..0000000 --- a/test.js +++ /dev/null @@ -1,44 +0,0 @@ -window.JSONEditor.defaults.callbacks.autocomplete = { - 'search_deposition': function (editor, input) { - if (input.length < 3) { - return []; - } - - return restRequest({ - url: 'deposition', - method: 'GET', - data: { - q: input, - limit: 10 - } - }) - }, - 'render_deposition': function (editor, result, props) { - try { - const localId = result.metadata.alternateIdentifiers.find( - (id) => id.alternateIdentifierType.toLowerCase() === 'local' - ); - return `
  • ${result.igsn} (localId: ${localId.alternateIdentifier})
  • `; - } catch (e) { - return `
  • ${result.igsn} (title: ${result.metadata.titles[0]['title']})
  • `; - } - }, - 'get_deposition_value': function (editor, result) { - try { - const localId = result.metadata.alternateIdentifiers.find( - (id) => id.alternateIdentifierType.toLowerCase() === 'local' - ); - return `${result.igsn} - ${result._id} - ${localId.alternateIdentifier}`; - } catch (e) { - return `${result.igsn} - ${result._id} - no localId`; - } - } -}; - -Handlebars.registerHelper('split', function (string, separator, index) { - try { - return string.split(separator)[index].trim(); - } catch (e) { - return ''; - } -}); \ No newline at end of file diff --git a/test.json b/test.json deleted file mode 100644 index 3d81a0f..0000000 --- a/test.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "title": "Archival ULI Build (simplified)", - "description": "Schema for Archival ULI Builds, only selected fields are included", - "type": "object", - "properties": { - "lookup": { - "type": "string", - "title": "IGSN", - "description": "Lookup for the IGSN of the sample", - "format": "autocomplete", - "options": { - "autocomplete": { - "search": "search_deposition", - "renderResult": "render_deposition", - "getResultValue": "get_deposition_value", - "autoSelect": true, - "debounceTime": 500 - } - }, - "propertyOrder": 0 - }, - "depositionId": { - "type": "string", - "title": "IGSN ID", - "description": "Unique identifier for the deposition", - "readOnly": true, - "propertyOrder": 999, - "watch": { - "igsn": "lookup" - }, - "template": "{{split igsn ' - ' 1}}", - "options": { - "grid_columns": 12, - "hidden": true - } - }, - "buildId": { - "type": "string", - "title": "Build ID", - "description": "Unique identifier for the build", - "readOnly": true, - "format": "text", - "propertyOrder": 1, - "watch": { - "igsn": "lookup" - }, - "template": "{{split igsn ' - ' 2}}", - "options": { - "grid_columns": 12 - } - }, - "location": { - "type": "string", - "title": "Location", - "default": "CMU", - "enum": ["CMU", "CWRU", "Tugce", "ASM", "Unknown"], - "propertyOrder": 2 - }, - "projectName": { - "type": "string", - "title": "Project Name", - "default": "ULI", - "enum": ["ULI", "STRI", "Unknown"], - "propertyOrder": 3 - }, - "scanPower": { - "type": "number", - "description": "PRD-3-4", - "title": "Scan Power (W)", - "propertyOrder": 4 - }, - "scanVelocity": { - "type": "number", - "description": "PRD-3-8", - "title": "Scan velocity (mm/s)", - "propertyOrder": 5 - }, - "hatchSpacing": { - "type": "number", - "description": "PRC-3-2-6", - "title": "Hatch Spacing (mm)", - "propertyOrder": 6 - } - }, - "required": [ - "buildId", - "location", - "projectName", - "scanPower", - "scanVelocity", - "hatchSpacing" - ] -} \ No newline at end of file From d62ec819dfcb1e18b115b7b788f96fec9639e4f6 Mon Sep 17 00:00:00 2001 From: APonugoti1 Date: Tue, 2 Dec 2025 19:27:41 -0500 Subject: [PATCH 20/20] Added ASTM ID's for some of the fields --- archival_uli_build_simple.json | 5 ++++- ct_data_schema.json | 10 +++++----- printer_build_schema.json | 10 ++++++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/archival_uli_build_simple.json b/archival_uli_build_simple.json index 1746df6..c60d887 100644 --- a/archival_uli_build_simple.json +++ b/archival_uli_build_simple.json @@ -37,7 +37,7 @@ "buildId": { "type": "string", "title": "Build ID", - "description": "Unique identifier for the build", + "description": "BLD-1: Unique identifier for the build", "readOnly": true, "format": "text", "propertyOrder": 1, @@ -65,16 +65,19 @@ }, "scanPower": { "type": "number", + "description": "PRC-3-2-3", "title": "Scan Power (W)", "propertyOrder": 4 }, "scanVelocity": { "type": "number", + "description": " PRC-3-2-9", "title": "Scan velocity (mm/s)", "propertyOrder": 5 }, "hatchSpacing": { "type": "number", + "description": "PRC-3-2-6", "title": "Hatch Spacing (mm)", "propertyOrder": 6 } diff --git a/ct_data_schema.json b/ct_data_schema.json index ff7279b..00d40d3 100644 --- a/ct_data_schema.json +++ b/ct_data_schema.json @@ -6,7 +6,7 @@ "properties": { "Build_ID": { "title": "Build ID", - "description": "Unique identifier for the build, formatted as DATE_LOC_MAT_GEOM_PART_[###]", + "description": "BLD-1: Unique identifier for the build, formatted as DATE_LOC_MAT_GEOM_PART_[###]", "type": "string", "format": "custom", "template": "{{Parameter_Label}}_{{Build_Date}}_{{Location}}_{{Material}}_{{Geometry}}", @@ -125,25 +125,25 @@ }, "Hatch_mm": { "title": "Hatch Spacing", - "description": "Hatch spacing in mm", + "description": "PRC-3-2-6: Hatch spacing in mm", "type": "number", "propertyOrder": 14 }, "Speed_mm_per_s": { "title": "Speed", - "description": "Laser speed in mm/s", + "description": "PRC-3-2-9: Laser speed in mm/s", "type": "number", "propertyOrder": 15 }, "Power_W": { "title": "Power", - "description": "Laser Power in Watts", + "description": "PRC-3-2-3:Laser Power in Watts", "type": "number", "propertyOrder": 16 }, "Layer_mm": { "title": "Layer Thickness", - "description": "Layer thickness in mm", + "description": "PRC-3-2-1:Layer thickness in mm", "type": "number", "propertyOrder": 17 }, diff --git a/printer_build_schema.json b/printer_build_schema.json index 8150fe6..d42d3f4 100644 --- a/printer_build_schema.json +++ b/printer_build_schema.json @@ -296,23 +296,27 @@ "laserPower": { "title": "Laser Power (W)", "type": "number", + "description": "PRC-3-2-3", "minimum": 0, "maximum": 370 }, "laserVelocity": { "title": "Laser Velocity (mm/s)", "type": "number", + "description": "PRC-3-2-9", "minimum": 0, "maximum": 10000 }, "hatchSpacing": { "title": "Hatch Spacing (µm)", "type": "number", + "description": "PRC-3-2-6", "minimum": 0, "maximum": 300 }, "layerThickness": { "title": "Layer Thickness (µm)", + "description": "PRC-3-2-1", "type": "number", "minimum": 0, "maximum": 100 @@ -364,6 +368,7 @@ "targetPath": { "type": "string", "title": "Target Path", + "description": "BLD-1: Unique identifier for the build", "watch": { "path": "root.printerBuildID" }, @@ -427,7 +432,7 @@ }, "printerBuildID": { "title": "Printer Build ID", - "description": "Automatically generated identifier for the printer build", + "description": "BLD-1: Automatically generated identifier for the printer build", "type": "string", "template": "{{replaceAll params.runDate '-' ''}}_{{params.location}}_{{material}}{{joinarray extraInfo '_' true}}", "watch": { @@ -440,7 +445,7 @@ }, "buildMachine": { "title": "Build Machine", - "description": "Machine used for the build", + "description": "AMS-1-6: Machine used for the build", "type": "string", "enum": [ "EOS M290 at CMU" @@ -518,6 +523,7 @@ "properties": { "type": { "title": "Gas Type", + "description": "MAT-4-4", "type": "string", "enum": [ "Ar",