mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 04:12:53 +01:00
fix coincident setup
This commit is contained in:
parent
b8bbb70f0a
commit
3034199d8c
1 changed files with 7 additions and 3 deletions
|
|
@ -107,17 +107,21 @@ TCAD.TWO.ParametricManager.prototype.radius = function(objs, promptCallback) {
|
|||
|
||||
TCAD.TWO.ParametricManager.prototype.coincident = function(objs) {
|
||||
if (objs.length == 0) return;
|
||||
var i;
|
||||
var last = objs.length - 1;
|
||||
for (var i = 0; i < objs.length - 1; ++i) {
|
||||
for (i = 0; i < objs.length - 1; ++i) {
|
||||
objs[i].x = objs[last].x;
|
||||
objs[i].y = objs[last].y;
|
||||
this.system.push(new TCAD.TWO.Constraints.Equal(objs[i]._x, objs[last]._x));
|
||||
this.system.push(new TCAD.TWO.Constraints.Equal(objs[i]._y, objs[last]._y));
|
||||
}
|
||||
|
||||
for (i = 0; i < objs.length; ++i) {
|
||||
for (var j = 0; j < objs.length; ++j) {
|
||||
if (objs[i].id !== objs[j].id) {
|
||||
objs[j].linked.push(objs[i]);
|
||||
}
|
||||
}
|
||||
this.system.push(new TCAD.TWO.Constraints.Equal(objs[i]._x, objs[last]._x));
|
||||
this.system.push(new TCAD.TWO.Constraints.Equal(objs[i]._y, objs[last]._y));
|
||||
}
|
||||
|
||||
this.solve();
|
||||
|
|
|
|||
Loading…
Reference in a new issue