diff --git a/web/app/3d/actions/operation-actions.js b/web/app/3d/actions/operation-actions.js index 41d84ebb..a52a0f49 100644 --- a/web/app/3d/actions/operation-actions.js +++ b/web/app/3d/actions/operation-actions.js @@ -46,6 +46,10 @@ export const OperationActions = { 'UNION': mergeInfo('UNION', { info: 'union operation on two solids' + }), + + 'IMPORT_STL': mergeInfo('IMPORT_STL', { + info: 'union operation on two solids' }) }; diff --git a/web/app/3d/menu/menu-config.js b/web/app/3d/menu/menu-config.js index bd489858..b3161498 100644 --- a/web/app/3d/menu/menu-config.js +++ b/web/app/3d/menu/menu-config.js @@ -1,7 +1,7 @@ export const file = { label: 'file', cssIcons: ['file'], - actions: ['Save', 'StlExport'] + actions: ['Save', 'StlExport', '-', 'IMPORT_STL'] }; export const craft = { diff --git a/web/app/3d/operations.js b/web/app/3d/operations.js index cdd8b47f..79e297f3 100644 --- a/web/app/3d/operations.js +++ b/web/app/3d/operations.js @@ -54,6 +54,12 @@ export const UNION = { info: (p) => null }; +export const IMPORT_STL = { + icon: 'img/3d/stl', + label: 'STL Import', + info: (p) => null +}; + function r(value) { return value.toPrecision(4).replace(/\.0$/, ''); } \ No newline at end of file diff --git a/web/app/3d/ui/ctrl.js b/web/app/3d/ui/ctrl.js index cb2ac774..ed930e0e 100644 --- a/web/app/3d/ui/ctrl.js +++ b/web/app/3d/ui/ctrl.js @@ -154,6 +154,8 @@ UI.prototype.initOperation = function(op) { this.registerWizard(new PlaneWizard(this.app.viewer), false) } else if ('SPHERE' === op) { this.registerWizard(new SphereWizard(this.app.viewer), false) + } else if ('IMPORT_STL' === op) { + alert('men at work'); } else { console.log('unknown operation'); } diff --git a/web/img/3d/stl32.png b/web/img/3d/stl32.png new file mode 100644 index 00000000..6f54e56f Binary files /dev/null and b/web/img/3d/stl32.png differ diff --git a/web/img/3d/stl96.png b/web/img/3d/stl96.png new file mode 100644 index 00000000..55e581a2 Binary files /dev/null and b/web/img/3d/stl96.png differ