Skip to content

Commit 0c34b56

Browse files
committed
Default 3D PointSize is 0.01
See page 1245 of the Mathematica book 5 And make it relative for json.
1 parent 541cba7 commit 0c34b56

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mathics/formatter/json.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,15 @@ def point_3d_box(self):
6060
face_color = RGBColor(components=(0, 0, 0, face_color.to_rgba()[3]))
6161

6262
point_size, _ = self.style.get_style(PointSize, face_element=False)
63-
if point_size is None:
64-
point_size = PointSize(self.graphics, value=0.005)
65-
absolute_point_size = point_size.get_size()
63+
relative_point_size = 0.01 if point_size is None else point_size.value
6664

6765
for line in self.lines:
6866
data.append(
6967
{
7068
"type": "point",
7169
"coords": [coords.pos() for coords in line],
7270
"color": face_color.to_rgba(),
73-
"pointSize": absolute_point_size,
71+
"pointSize": relative_point_size,
7472
}
7573
)
7674
# print("### json Point3DBox", data)

0 commit comments

Comments
 (0)