From 0ce0072d762c8975363cecb026af63cbeee1c0fc Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Fri, 16 Jan 2015 01:02:19 -0800 Subject: [PATCH] first approach to history --- web/app/workbench.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/web/app/workbench.js b/web/app/workbench.js index 4ef7bd8a..827ae072 100644 --- a/web/app/workbench.js +++ b/web/app/workbench.js @@ -41,9 +41,29 @@ TCAD.workbench.applyHistory = function(history) { } } - }; +TCAD.workbench.Cut = function() { + + this.depth = null; + + this.load = function(data) { + this.depth = data.depth; + }; + + this.save = function() { + return { + depth : this.depth + }; + }; + + this.apply = function(app, face, faces) { + TCAD.craft.cut(app, face, faces, this.depth); + }; +}; + +TCAD.workbench.Cut.prototype.TYPE = 'CUT'; + TCAD.craft = {};