Skip to content

Commit dde5d67

Browse files
committed
fix(vispy): use proximal and distal radii for mesh
During refactoring, we'd used only the one radii, but that meant we only got cylinders, not cones and other related shapes where the two radii can be different. Note that this means there may be more unique meshes, and so, the precision may be reduced more by the heuristic. But, it will allow users with more computing power to get more accurate meshes.
1 parent 96eb97a commit dde5d67

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pyneuroml/plot/PlotMorphologyVispy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -724,10 +724,11 @@ def plot_3D_cell_morphology(
724724
length = cell.get_segment_length(seg.id)
725725

726726
# round up to precision
727-
r = round(p.diameter / 2, mesh_precision)
727+
r1 = round(p.diameter / 2, mesh_precision)
728+
r2 = round(d.diameter / 2, mesh_precision)
728729
key = (
729-
f"{r:.{mesh_precision}f}",
730-
f"{r:.{mesh_precision}f}",
730+
f"{r1:.{mesh_precision}f}",
731+
f"{r2:.{mesh_precision}f}",
731732
f"{round(length, mesh_precision):.{mesh_precision}f}",
732733
)
733734

0 commit comments

Comments
 (0)