From dbe54c3890432a00a7fe7a3de3bde1496433eabb Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Fri, 14 Dec 2018 23:49:27 -0800 Subject: [PATCH] not throw an error for sketches on curved surfaces --- web/app/cad/model/mface.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/web/app/cad/model/mface.js b/web/app/cad/model/mface.js index a48194c2..afc6f745 100644 --- a/web/app/cad/model/mface.js +++ b/web/app/cad/model/mface.js @@ -70,6 +70,11 @@ export class MFace extends MObject { } setSketch(sketch) { + + if (!this.isPlaneBased) { + return; + } + this.sketch = sketch; this.sketchObjects = []; @@ -104,22 +109,14 @@ export class MFace extends MObject { get sketchToWorldTransformation() { if (!this._sketchToWorldTransformation) { - if (this.isPlaneBased) { - this._sketchToWorldTransformation = this.csys.outTransformation; - } else { - throw 'sketches are supported only for planes yet'; - } + this._sketchToWorldTransformation = this.csys.outTransformation; } return this._sketchToWorldTransformation; } get worldToSketchTransformation() { if (!this._worldToSketchTransformation) { - if (this.isPlaneBased) { - this._worldToSketchTransformation = this.csys.inTransformation; - } else { - throw 'sketches are supported only for planes yet'; - } + this._worldToSketchTransformation = this.csys.inTransformation; } return this._worldToSketchTransformation; }