Commit 914d8c81 authored by GoshaZotov's avatar GoshaZotov

change functions

parent fa0095c6
...@@ -10947,6 +10947,33 @@ drawSurfaceChart.prototype = ...@@ -10947,6 +10947,33 @@ drawSurfaceChart.prototype =
var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective; var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective;
var getGridPlain = function(index)
{
var gridX1 = xPoints[0].pos * t.chartProp.pxToMM;
var gridX2 = xPoints[xPoints.length - 1].pos * t.chartProp.pxToMM;
var gridY1 = yPoints[index].pos * t.chartProp.pxToMM;
var gridY2 = yPoints[index].pos * t.chartProp.pxToMM;
var gridPlain = t.cChartDrawer.getPlainEquation({x: gridX1,y: gridY1, z: 0}, {x: gridX2, y: gridY2, z: 0}, {x: gridX2, y: gridY2, z: perspectiveDepth});
return gridPlain;
};
var isEqualPoints = function(arr, point)
{
var res = null;
for(var p = 0; p < arr.length; p++)
{
if(arr[p] && point.x === arr[p].x && point.y === arr[p].y)
{
res = p;
break;
}
}
return res;
};
var getIntersectionPlanesAndLines = function(lines, pointsValue) var getIntersectionPlanesAndLines = function(lines, pointsValue)
{ {
...@@ -10961,11 +10988,7 @@ drawSurfaceChart.prototype = ...@@ -10961,11 +10988,7 @@ drawSurfaceChart.prototype =
continue; continue;
} }
var gridX1 = xPoints[0].pos * t.chartProp.pxToMM; var gridPlain = getGridPlain(k);
var gridX2 = xPoints[xPoints.length - 1].pos * t.chartProp.pxToMM;
var gridY1 = yPoints[k].pos * t.chartProp.pxToMM;
var gridY2 = yPoints[k].pos * t.chartProp.pxToMM;
var gridPlain = t.cChartDrawer.getPlainEquation({x: gridX1,y: gridY1, z: 0}, {x: gridX2, y: gridY2, z: 0}, {x: gridX2, y: gridY2, z: perspectiveDepth});
var tempPoints = []; var tempPoints = [];
var isFacePoint = null; var isFacePoint = null;
...@@ -11001,19 +11024,7 @@ drawSurfaceChart.prototype = ...@@ -11001,19 +11024,7 @@ drawSurfaceChart.prototype =
{ {
continue; continue;
} }
if(pointsValue[0] && convertResult.x === pointsValue[0].x && convertResult.y === pointsValue[0].y) if(null !== isEqualPoints(pointsValue, convertResult))
{
continue;
}
if(pointsValue[1] && convertResult.x === pointsValue[1].x && convertResult.y === pointsValue[1].y)
{
continue;
}
if(pointsValue[2] && convertResult.x === pointsValue[2].x && convertResult.y === pointsValue[2].y)
{
continue;
}
if(pointsValue[3] && convertResult.x === pointsValue[3].x && convertResult.y === pointsValue[3].y)
{ {
continue; continue;
} }
...@@ -11138,7 +11149,7 @@ drawSurfaceChart.prototype = ...@@ -11138,7 +11149,7 @@ drawSurfaceChart.prototype =
// | | // | |
// p-------p2 // p-------p2
var pointsValue = [p1, p2, p21, p]; var pointsValue = [p1, p2, p21, p];
//getIntersectionPlanesAndLines(lines, pointsValue); getIntersectionPlanesAndLines(lines, pointsValue);
} }
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment