From 92ff059969e00e8d9d578650c9e76d92ef11c5c3 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Tue, 4 Nov 2014 23:32:22 -0800 Subject: [PATCH] not show boundary --- web/app/engine.js | 7 ++++--- web/app/main.js | 1 + web/app/workbench.js | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web/app/engine.js b/web/app/engine.js index 727c6172..84a4d548 100644 --- a/web/app/engine.js +++ b/web/app/engine.js @@ -260,9 +260,10 @@ TCAD.SketchFace = function(poly) { this.sketch3DGroup = null; }; -TCAD.SketchFace.prototype.syncSketches = function(geom) { - var material = new THREE.LineBasicMaterial({ +TCAD.SketchFace.prototype.SKETCH_MATERIAL = new THREE.LineBasicMaterial({ color: 0xFFFFFF, linewidth: 3}); + +TCAD.SketchFace.prototype.syncSketches = function(geom) { var normal = this.polygon.normal; var offVector = normal.multiply(0.5); @@ -285,7 +286,7 @@ TCAD.SketchFace.prototype.syncSketches = function(geom) { lg.vertices.push(a.plus(offVector).three()); lg.vertices.push(b.plus(offVector).three()); - var line = new THREE.Segment(lg, material); + var line = new THREE.Segment(lg, this.SKETCH_MATERIAL); this.sketch3DGroup.add(line); } }; diff --git a/web/app/main.js b/web/app/main.js index b0f6f951..a2f9549e 100644 --- a/web/app/main.js +++ b/web/app/main.js @@ -20,6 +20,7 @@ TCAD.App = function() { this.viewer.scene.add(sketchFace.sketch3DGroup); } } + this.viewer.render(); function storage_handler(evt) { diff --git a/web/app/workbench.js b/web/app/workbench.js index 6f2552db..f7879b8e 100644 --- a/web/app/workbench.js +++ b/web/app/workbench.js @@ -6,6 +6,7 @@ TCAD.workbench.readSketchGeom = function(sketch) { for (var l = 0; l < sketch.layers.length; ++l) { for (var i = 0; i < sketch.layers[l].length; ++i) { var obj = sketch.layers[l][i]; + if (obj.edge !== undefined) continue; if (obj._class === 'TCAD.TWO.Segment') { out.lines.push([ obj.points[0][1][1], obj.points[0][2][1], //x,y