|
|
@@ -38,6 +38,7 @@ FileZDM.prototype.applyOperation = function () {
|
|
|
// 7,0,"Standard",RS.VAlignTop,RS.HAlignLeft,false,false,0);
|
|
|
EAction.handleUserMessage("ZDM-40: " + formatDateTime());
|
|
|
//绘制坡道及竖曲线,1为坡道,2为竖曲线
|
|
|
+ var c = 0;
|
|
|
for (var i = 0; i < this.newEntityData.length - 1; i++) {
|
|
|
var TempLineData = new Array();
|
|
|
TempLineData.push([this.newEntityData[i][0], this.newEntityData[i][1]]);
|
|
|
@@ -48,8 +49,10 @@ FileZDM.prototype.applyOperation = function () {
|
|
|
var pdAngle = (this.newEntityData[i + 1][1] - this.newEntityData[i][1]) / (this.newEntityData[i + 1][0] - this.newEntityData[i][0]);
|
|
|
// 计算长度
|
|
|
var pdLen = sqrt((this.newEntityData[i + 1][1] - this.newEntityData[i][1]) * (this.newEntityData[i + 1][1] - this.newEntityData[i][1]) + (this.newEntityData[i + 1][0] - this.newEntityData[i][0]) * (this.newEntityData[i + 1][0] - this.newEntityData[i][0]));
|
|
|
- addSimpleTextToView((round(pdAngle * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 + 9], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
|
|
|
- addSimpleTextToView((round(pdLen * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 - 2], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
|
|
|
+ addSimpleTextToView((round(pdAngle * 100 * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 + 9], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
|
|
|
+ addSimpleTextToView((round(this.csvCoor[c+1][0]-this.csvCoor[c][0])).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 - 2], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
|
|
|
+ c++;
|
|
|
+ // addSimpleTextToView((round(pdLen * 1000) / 1000).toString(), [(this.newEntityData[i + 1][0] + this.newEntityData[i][0]) / 2 - 2, (this.newEntityData[i + 1][1] + this.newEntityData[i][1]) / 2 - 2], 7, rad2deg(pdAngle), "Standard", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
|
|
|
} else if (this.newEntityData[i][2] == 2) {
|
|
|
addPolylinetoView(TempLineData, false, false, 0, SQXColor);
|
|
|
}
|
|
|
@@ -258,6 +261,7 @@ FileZDM.prototype.applySlope = function (startPoint, space) {
|
|
|
var lastPoint = undefined;
|
|
|
for (var i = 0; i < this.newFZEntityData.length; i += 3) {
|
|
|
if (i + 1 < this.newFZEntityData.length && this.newFZEntityData[i + 1][2] == 2) {
|
|
|
+ addLineToView([lastPoint[0], lastPoint[1]], [startPoint[0], startPoint[1]], 0);
|
|
|
if (lastPoint && this.newFZEntityData[i + 1][1] > lastPoint[1]) {
|
|
|
addLineToView([lastPoint[0], startPoint[1] - space], [this.newFZEntityData[i + 1][0], startPoint[1]], 0);
|
|
|
} else if (lastPoint) {
|