mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 12:23:03 +01:00
fix redundency check
This commit is contained in:
parent
b977c18a9d
commit
afd12fadd9
1 changed files with 5 additions and 3 deletions
|
|
@ -55,7 +55,7 @@ TCAD.TWO.ParametricManager.prototype._add = function(constr) {
|
|||
break;
|
||||
}
|
||||
subSystem.constraints.push(constr);
|
||||
this.checkRedundancy(subSystem, constr);
|
||||
return subSystem;
|
||||
};
|
||||
|
||||
TCAD.TWO.ParametricManager.prototype.checkRedundancy = function (subSystem, constr) {
|
||||
|
|
@ -73,13 +73,15 @@ TCAD.TWO.ParametricManager.prototype.refresh = function() {
|
|||
|
||||
TCAD.TWO.ParametricManager.prototype.add = function(constr) {
|
||||
this.viewer.historyManager.checkpoint();
|
||||
this._add(constr);
|
||||
var subSystem = this._add(constr)
|
||||
this.checkRedundancy(subSystem, constr);
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
TCAD.TWO.ParametricManager.prototype.addAll = function(constrs) {
|
||||
for (var i = 0; i < constrs.length; i++) {
|
||||
this._add(constrs[i]);
|
||||
var subSystem = this._add(constrs[i]);
|
||||
this.checkRedundancy(subSystem, constrs[i]);
|
||||
}
|
||||
this.refresh();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue