Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNino van Hooff <ninovanhooff@gmail.com>2019-10-25 11:26:12 +0300
committerNino van Hooff <ninovanhooff@gmail.com>2019-10-25 11:26:12 +0300
commit8a963a0c4e05e682cc7e32990552a98a899434a2 (patch)
tree024ad6cc8c114b47a73beb0aa63f832fb6d78cb7 /plugins/ImageReader
parent6e65fe57727acf62cf8669557d7242b1ab9a1059 (diff)
parent03f7fab1247cd50ea409a4129feb0b92174ca402 (diff)
Merge remote-tracking branch 'origin/log_litho' into log_litho
# Conflicts: # plugins/ImageReader/ConfigUI.qml # plugins/ImageReader/ImageReader.py
Diffstat (limited to 'plugins/ImageReader')
-rw-r--r--plugins/ImageReader/ImageReader.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ImageReader/ImageReader.py b/plugins/ImageReader/ImageReader.py
index 2084844548..a77cc9b0ed 100644
--- a/plugins/ImageReader/ImageReader.py
+++ b/plugins/ImageReader/ImageReader.py
@@ -108,7 +108,7 @@ class ImageReader(MeshReader):
Job.yieldThread()
- if lighter_is_higher is use_transparency_model:
+ if lighter_is_higher == use_transparency_model:
height_data = 1 - height_data
for _ in range(0, blur_iterations):
@@ -129,11 +129,11 @@ class ImageReader(MeshReader):
Job.yieldThread()
if use_transparency_model:
- p = 1.0 / math.log(transmittance_1mm / 100.0, 2)
+ p = 1.0 / math.log(transmittance_1mm / 100.0, 2) # base doesn't matter here. use base 2 for fast computation
min_luminance = 2.0 ** ((peak_height - base_height) / p)
for (y, x) in numpy.ndindex(height_data.shape):
mapped_luminance = min_luminance + (1.0 - min_luminance) * height_data[y, x]
- height_data[y, x] = base_height + p * math.log(mapped_luminance, 2)
+ height_data[y, x] = base_height + p * math.log(mapped_luminance, 2) # use same base as a couple lines above this
else:
height_data *= scale_vector.y
height_data += base_height