neuronsimulator/nrn

Unable to access surface mesh from swc file.

Opened this issue · 0 comments

I would like to produce a surface mesh from an swc file, stored as a list of triangles and vertices, however I cannot find an example of how to do this, even though it seems this should be possible.

My best guess on how to do this is:

from neuron import h, rxd

h.load_file("import3d.hoc")

class Cell:
    def __init__(self, filename):
        cell = h.Import3d_SWC_read()
        cell.input(filename)
        i3d = h.Import3d_GUI(cell, False)
        i3d.instantiate(self)

filename = swc_file
dx = 0.05
cell = Cell(filename)
rxd.set_solve_type(cell.all, dimension=3)
mesh =rxd.geometry3d.surface(h.allsec(),dx)

But this leads to the following error in line 61 of neuron/rxd/geometry3d/surface.py

AttributeError: 'list' object has no attribute 'xlo'
If anyone can let me know on how to do this or even if this is possible, please let me know.