Skip to content

Commit d2f6ce8

Browse files
authored
Merge pull request #1500 from TiagoCavalcanteTrindade/remove-viewpoint-rescale
Remove viewpoint rescale
2 parents 1f11eb5 + ac68d01 commit d2f6ce8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

mathics/builtin/box/graphics3d.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,6 @@ def calc_dimensions(final_pass=True):
303303
light["target"][j] * boxscale[j] for j in range(3)
304304
]
305305

306-
# Rescale viewpoint
307-
self.viewpoint = [
308-
vp * max([xmax - xmin, ymax - ymin, zmax - zmin])
309-
for vp in self.viewpoint
310-
]
311-
312306
w = 0 if (xmin is None or xmax is None) else xmax - xmin
313307
h = 0 if (ymin is None or ymax is None) else ymax - ymin
314308

@@ -601,7 +595,11 @@ def boxes_to_tex(self, leaves=None, **options):
601595
""".format(
602596
asy_number(width / 60),
603597
asy_number(height / 60),
604-
self.viewpoint,
598+
# Rescale viewpoint
599+
[
600+
vp * max([xmax - xmin, ymax - ymin, zmax - zmin])
601+
for vp in self.viewpoint
602+
],
605603
asy,
606604
boundbox_asy,
607605
)

0 commit comments

Comments
 (0)