meshtools buried electrodes qhull voronoid error
- Concern : API
- Problem Description : QHull error is generated when trying to create a triangular mesh with buried electrodes.
- How to reproduce it :
import numpy as np
import pandas as pd
from resipy import Project
esurf = np.arange(0, 89*0.3, 0.3)
ebur = np.arange(0, 45*0.6, 0.6)
dfelec = pd.DataFrame()
dfelec['label'] = np.arange(89 + 45) + 1
dfelec['x'] = np.r_[esurf, ebur]
dfelec['y'] = 0
dfelec['z'] = np.r_[np.zeros(89), np.ones(45)*-0.5]
dfelec['buried'] = np.r_[np.zeros(89, dtype=bool), np.ones(45, dtype=bool)]
xdic = dict(zip(dfelec['label'], dfelec['x']))
k = Project()
k.setElec(dfelec)
k.createMesh('trian', fmd=4)