mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
humble attempt to save
This commit is contained in:
parent
5d962623fd
commit
06a76f643d
2 changed files with 15 additions and 3 deletions
|
|
@ -11,13 +11,15 @@ TCAD.UI = function(app) {
|
|||
var cameraFolder = new tk.Folder("Camera");
|
||||
var objectsFolder = new tk.Folder("Objects");
|
||||
var modificationsFolder = new tk.Folder("Modifications");
|
||||
var extrude, cut, edit, addPlane, refreshSketches, showSketches, printSolids, printFace, printFaceId;
|
||||
var extrude, cut, edit, addPlane, save,
|
||||
refreshSketches, showSketches, printSolids, printFace, printFaceId;
|
||||
tk.add(mainBox, propFolder);
|
||||
tk.add(propFolder, extrude = new tk.Button("Extrude"));
|
||||
tk.add(propFolder, cut = new tk.Button("Cut"));
|
||||
tk.add(propFolder, edit = new tk.Button("Edit"));
|
||||
tk.add(propFolder, addPlane = new tk.Button("Add a Plane"));
|
||||
tk.add(propFolder, refreshSketches = new tk.Button("Refresh Sketches"));
|
||||
tk.add(propFolder, save = new tk.Button("Save"));
|
||||
tk.add(propFolder, showSketches = new tk.CheckBox("Show Sketches", true));
|
||||
tk.add(mainBox, debugFolder);
|
||||
tk.add(debugFolder, printSolids = new tk.Button("Print Solids"));
|
||||
|
|
@ -172,6 +174,10 @@ TCAD.UI = function(app) {
|
|||
}
|
||||
app.viewer.render();
|
||||
});
|
||||
save.root.click(function() {
|
||||
app.save();
|
||||
});
|
||||
|
||||
this.solidFolder = null;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -288,9 +288,15 @@ TCAD.App.prototype._refreshSketches = function() {
|
|||
};
|
||||
|
||||
TCAD.App.prototype.save = function() {
|
||||
var data = {};
|
||||
data.solids = [];
|
||||
data.planes = [];
|
||||
data.history = this.craft.history
|
||||
var solid = this.findAllSolids();
|
||||
for (var i = 0; i < solid.length; i++) {
|
||||
var solid = solid[i];
|
||||
|
||||
var polyFace = this.viewer.selectionMgr.selection[0];
|
||||
var height = prompt("Height", "50");
|
||||
}
|
||||
};
|
||||
|
||||
TCAD.Bus = function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue