From cc16a4bdbba01d008f3d95f4898ba0165a466b15 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Wed, 25 Feb 2015 20:59:29 -0800 Subject: [PATCH] Save points --- web/app/sketcher/main2d.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/app/sketcher/main2d.js b/web/app/sketcher/main2d.js index 6b37d97f..6737753c 100644 --- a/web/app/sketcher/main2d.js +++ b/web/app/sketcher/main2d.js @@ -76,6 +76,8 @@ TCAD.App2D = function() { toLayer.data.push(to); if (obj._class === 'TCAD.TWO.Segment') { to.points = [point(obj.a), point(obj.b)]; + } else if (obj._class === 'TCAD.TWO.EndPoint') { + to.location = point(obj); } else if (obj._class === 'TCAD.TWO.Arc') { to.points = [point(obj.a), point(obj.b), point(obj.c)]; } else if (obj._class === 'TCAD.TWO.Circle') { @@ -243,6 +245,8 @@ TCAD.App2D.prototype.loadSketch = function(sketch) { var a = endPoint(obj.points[0]); var b = endPoint(obj.points[1]); skobj = new TCAD.TWO.Segment(a, b); + } else if (obj._class === 'TCAD.TWO.EndPoint') { + skobj = endPoint(obj.location); } else if (obj._class === 'TCAD.TWO.Arc') { var a = endPoint(obj.points[0]); var b = endPoint(obj.points[1]);