mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-07 17:04:58 +01:00
not throw an error for sketches on curved surfaces
This commit is contained in:
parent
5ae92748cc
commit
dbe54c3890
1 changed files with 7 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue