Skip to content

Commit 15a1578

Browse files
committed
needed to add tiny error to force solve tiny caps
1 parent f37520a commit 15a1578

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/traces/isosurface/convert.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ function generateIsosurfaceMesh(data) {
352352
if(value < min) value = min;
353353
if(value > max) value = max;
354354

355-
var ratio = (pointOut[3] - value) / (pointOut[3] - pointIn[3]);
355+
var ratio = (pointOut[3] - value) / (pointOut[3] - pointIn[3] + 0.000000001); // we had to add this error to force solve the tiny caps
356356

357357
var result = [];
358358
for(var s = 0; s < 4; s++) {
@@ -619,13 +619,11 @@ function generateIsosurfaceMesh(data) {
619619
return result;
620620
}
621621

622-
function addRect(style, a, b, c, d, min, max
623-
// , previousResult
624-
) {
622+
function addRect(style, a, b, c, d, min, max, previousResult) {
625623
return [
626-
// (previousResult[0] === true) ? true :
624+
(previousResult[0] === true) ? true :
627625
tryCreateTri(style, getXYZV([a, b, c]), [a, b, c], min, max),
628-
// (previousResult[1] === true) ? true :
626+
(previousResult[1] === true) ? true :
629627
tryCreateTri(style, getXYZV([c, d, a]), [c, d, a], min, max)
630628
];
631629
}

0 commit comments

Comments
 (0)