| | |
| | | that.crnBody = getArrVal(object.objects, "name", that.crnNo + "-body"); |
| | | that.crnLoad = getArrVal(object.objects, "name", that.crnNo + "-load"); |
| | | that.crnFork = getArrVal(object.objects, "name", that.crnNo + "-fork"); |
| | | if (that.crnBody===null || that.crnLoad===null || that.crnFork==null) { |
| | | console.log(that.crnNo + "号堆垛机没有初始化"); |
| | | } |
| | | }; |
| | | init(); |
| | | |
| | | that.modify = function (crnData) { |
| | | if (that.run || that.crnNo === 0 || that.crnBody===null || that.crnLoad===null || that.crnFork==null) { |
| | | // console.log(that.crnNo + "号堆垛机更新失败"); |
| | | } else { |
| | | if (that.run || that.crnNo === 0) { |
| | | console.error(that.crnNo + "号堆垛机更新失败"); |
| | | return; |
| | | } |
| | | if (that.crnBody===null) { |
| | | that.crnBody = getArrVal(object.objects, "name", that.crnNo + "-body"); |
| | | return; |
| | | } |
| | | if (that.crnLoad===null) { |
| | | that.crnLoad = getArrVal(object.objects, "name", that.crnNo + "-load"); |
| | | return; |
| | | } |
| | | if (that.crnFork===null) { |
| | | that.crnFork = getArrVal(object.objects, "name", that.crnNo + "-fork"); |
| | | return; |
| | | } |
| | | if (JSON.stringify(crnData.position) === JSON.stringify(that.position)) { |
| | | return; |
| | | } |
| | |
| | | |
| | | curves[0].start = true; |
| | | |
| | | } |
| | | } |
| | | |
| | | that.move = function () { |