I have trouble deciphering the individual parameters of the NURBS formula in the shapes NURBSTo entry (used for splines - curved edges). MS Visio documentation didn't help too much.
The number of parameters is variable depending on the complexity of the curve. A more simple example is:
NURBS(0.4492,3,0,1,0,-0.1875,0,1,1,-0.1875,0,1)
where I found out the start and end coordinate parameters start is 5th for X and 6th for Y. End is 9th for X and 10th for Y. But the Y coordinates are still wrong, so I suppose they should be combined with another parameter. This Java code provided the best results so far in getting the control points of the spline:
int j = 0;
for (int i = 2; i + 4 < pointsS.length; i = i + 4)
{
mxPoint currPoint = new mxPoint();
currPoint.setX(startXY.getX() + (endXY.getX() - startXY.getX()) * pointsRaw[i + 2]);
currPoint.setY(startXY.getY() - (endXY.getY() - startXY.getY()) * pointsRaw[i + 3]);
pointList.add(currPoint);
j++;
}
Just an example for a more complex spline:
NURBS(2.9857,3,1,1,0.1875,0,0,1,0.1875,-0.8954,0,1,0.1875,-1.3431,0,1,0.1875,-1.7908,0.4521,1,-0.4936,-1.7908,1.049,1,-1.1747,-1.7908,1.424,1,-1.1747,-2.1799,1.902,1,-1.1747,-2.5689,2.3742,1)
The documentation say for param 2 only "degree". I suppose it's the degree of the polynomial that is used for approximation.
The wiki page about NURBS: http://en.wikipedia.org/wiki/Non-uniform_rational_B-spline
Of course, it doesn't speak about Visio parameters :)