aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/pathops_sorter.htm
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pathops_sorter.htm')
-rw-r--r--tools/pathops_sorter.htm91
1 files changed, 31 insertions, 60 deletions
diff --git a/tools/pathops_sorter.htm b/tools/pathops_sorter.htm
index 3c24aeb138..65868cdcfd 100644
--- a/tools/pathops_sorter.htm
+++ b/tools/pathops_sorter.htm
@@ -6,51 +6,18 @@
<title></title>
<div style="height:0">
-<div id="sect0">
-{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+<div id="angle">
+{{{2, 6, 1, 2, 7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f}}}
+{{{1, 2, 7.16666698f, 6.66666698f, -4.66666651f, 7.66666651f, 2, 6}}}
+{{{1.995156049728393555, 5.980457782745361328}, {2.08147298604749853, 5.917692615073925744}, {2.164281118403629023, 5.850987095630077128}, {2.242042064666748047, 5.780299663543701172}}}
+{{{1.995156049728393555, 5.980457782745361328}, {1.82665117196054072, 6.185735619599722845}, {1.80264212281170999, 5.19703332512428684}, {1.994958639144897461, 5.979661464691162109}}}
+{{{1.995156049728393555, 5.980457782745361328}, {1.825196881732315868, 6.187507280789372288}, {1.801190554235020613, 5.204762216940081565}, {2, 6}}}
</div>
-<div id="sect1">
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
-{{{{306.58801299999999, -227.983994}, {212.46499600000001, -262.24200400000001}, {95.551200899999998, 58.976398500000002}}}, 0.707107008f} id=1
-{{{{377.21899400000001, -141.98100299999999}, {237.77799285476553, -166.56830755921084}, {134.08399674208422, -155.06258330544892}}}, 0.788580656f} id=2
-{{{{134.08399674208422, -155.06258330544892}, {30.390000629402859, -143.55685905168704}, {23.185499199999999, -102.697998}}}, 0.923879623f} id=4
-</div>
-
-<div id="sect2">
-{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
-{{{{205.78973252799028, -158.12538713371103}, {143.97848953841861, -74.076645245042371}, {95.551200899999998, 58.976398500000002}}}, 0.923879623f} id=3
-{{{{377.21899400000001, -141.98100299999999}, {237.77799285476553, -166.56830755921084}, {134.08399674208422, -155.06258330544892}}}, 0.788580656f} id=2
-</div>
-
-<div id="sect3">
-{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
-{{{{205.78973252799028, -158.12538713371103}, {143.97848953841861, -74.076645245042371}, {95.551200899999998, 58.976398500000002}}}, 0.923879623f} id=3
-{{{{252.08225670812539, -156.90491625851064}, {185.93099479842493, -160.81544543232982}, {134.08399674208422, -155.06258330544892}}}, 0.835816324f} id=6
-</div>
-
-<div id="sect4">
-{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
-{{{{205.78973252799028, -158.12538713371103}, {174.88411103320448, -116.10101618937664}, {145.19509369736275, -56.857102571363754}}}, 0.871667147f} id=3
-{{{{252.08225670812539, -156.90491625851064}, {185.93099479842493, -160.81544543232982}, {134.08399674208422, -155.06258330544892}}}, 0.835816324f} id=6
-</div>
-
-<div id="sect5">
-{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
-{{{{205.78973252799028, -158.12538713371103}, {174.88411103320448, -116.10101618937664}, {145.19509369736275, -56.857102571363754}}}, 0.871667147f} id=3
-{{{{252.08225670812539, -156.90491625851064}, {219.70109133058406, -158.81912754088933}, {190.17095392508796, -158.38373974664466}}}, 0.858306944f} id=6
-</div>
-
-<div id="sect6">
-{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
-{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
-{{{{205.78973252799028, -158.12538713371103}, {190.33692178059735, -137.11320166154385}, {174.87004877564593, -111.2132534799228}}}, 0.858117759f} id=3
-{{{{252.08225670812539, -156.90491625851064}, {219.70109133058406, -158.81912754088933}, {190.17095392508796, -158.38373974664466}}}, 0.858306944f} id=6
+<div id="ref">
+{{{0.7153972983360290527, 4.712343692779541016}, {0.2472269223126296878, 4.55502436068874772}, {-0.1220090791716240131, 4.244018092892478222}, {0, 4}}},
+{{{0.7153972983360290527, 4.712343692779541016}, {0.1339736781445877156, 4.133975051508096854}, {0.7320473976783675729, 3.63397630116081638}, {2, 3}}},
+{{fX=-0.0012699038296868359 fY=-0.0012605104293301750 } {fX=-0.0025337575085910835 fY=-0.0025229424048465177 }
</div>
</div>
@@ -58,13 +25,8 @@
<script type="text/javascript">
var testDivs = [
-sect0,
-sect1,
-sect2,
-sect3,
-sect4,
-sect5,
-sect6,
+ angle,
+ ref,
];
var decimal_places = 3;
@@ -499,7 +461,7 @@ function dxy_at_t(curve, t) {
function drawPointAtT(curve) {
var x = x_at_t(curve, curveT);
var y = y_at_t(curve, curveT);
- drawPoint(x, y);
+ drawPoint(x, y, false);
}
function drawLine(x1, y1, x2, y2) {
@@ -511,7 +473,7 @@ function dxy_at_t(curve, t) {
ctx.stroke();
}
- function drawPoint(px, py) {
+ function drawPoint(px, py, xend) {
for (var pts = 0; pts < drawnPts.length; pts += 2) {
var x = drawnPts[pts];
var y = drawnPts[pts + 1];
@@ -524,8 +486,15 @@ function dxy_at_t(curve, t) {
var _px = (px - srcLeft) * scale;
var _py = (py - srcTop) * scale;
ctx.beginPath();
- ctx.arc(_px, _py, 3, 0, Math.PI * 2, true);
- ctx.closePath();
+ if (xend) {
+ ctx.moveTo(_px - 3, _py - 3);
+ ctx.lineTo(_px + 3, _py + 3);
+ ctx.moveTo(_px - 3, _py + 3);
+ ctx.lineTo(_px + 3, _py - 3);
+ } else {
+ ctx.arc(_px, _py, 3, 0, Math.PI * 2, true);
+ ctx.closePath();
+ }
ctx.stroke();
if (draw_point_xy) {
var label = px.toFixed(decimal_places) + ", " + py.toFixed(decimal_places);
@@ -537,7 +506,7 @@ function dxy_at_t(curve, t) {
}
function drawPointSolid(px, py) {
- drawPoint(px, py);
+ drawPoint(px, py, false);
ctx.fillStyle = "rgba(0,0,0, 0.4)";
ctx.fill();
}
@@ -814,15 +783,17 @@ function dxy_at_t(curve, t) {
}
ctx.stroke();
if (draw_endpoints > 0) {
- drawPoint(curve[0], curve[1]);
+ drawPoint(curve[0], curve[1], false);
if (draw_endpoints > 1 || curve.length == 4) {
- drawPoint(curve[2], curve[3]);
+ drawPoint(curve[2], curve[3], curve.length == 4 && draw_endpoints == 3);
}
if (curve.length == 6 || curve.length == 7 ||
(draw_endpoints > 1 && curve.length == 8)) {
- drawPoint(curve[4], curve[5]);
+ drawPoint(curve[4], curve[5], (curve.length == 6 || curve.length == 7) && draw_endpoints == 3);
+ }
+ if (curve.length == 8) {
+ drawPoint(curve[6], curve[7], curve.length == 8 && draw_endpoints == 3);
}
- if (curve.length == 8) drawPoint(curve[6], curve[7]);
}
if (draw_midpoint != 0) {
if ((curves == 0) == (midLeft == 0)) {
@@ -1168,7 +1139,7 @@ function dxy_at_t(curve, t) {
redraw();
break;
case 'e':
- draw_endpoints = (draw_endpoints + 1) % 3;
+ draw_endpoints = (draw_endpoints + 1) % 4;
redraw();
break;
case 'f':