SciPy might actually not be needed for the release version. To be checked!! Note: Also need BLAS and gfortran to install scipy:
$ sudo apt-get install libopenblas-dev
$ sudo apt install gfortran
Need to manually install Trimesh dependencies.
- rtree (for nearest.on_surface)
I needed to manually install libspatialindex library (for rtree).
$ sudo apt-get install libspatialindex-dev
The FastHenry2
application needs to downloaded and installed.
Go to the download page, fill out the form, then download the
FastFieldSolvers
bundle, e.g. FastFieldSolvers Software Bundle Version 5.2.0
Under Linux systems, the project should be cloned from GitHub and compiled.
$ git clone https://github.com/ediloren/FastHenry2.git
$ cd FastHenry2/src
$ make
Note that MATLAB uses base index of 1 for arrays, whereas NumPy uses 0. Adjust all functions that create faces
arrays accordingly.
Confirm: Are mesh normals computed according to the right-hand rule? i.e. defined using the "counter-clockwise" or "anti-clockwise" vertex ordering, where the vertices of the face are specified in a counter-clockwise direction when viewed from the outside of the mesh.
I think there may be a fence-post bug in the original MATLAB code. The height of the resulting cylinder does not match the cylinder_height parameter. This is especially noticable for small values of num_longitudinal_divisions. See test_build_cylinder_mesh.py.
In define_target_field, line 104, I have to swap y and z coords to match MATLAB:
target_points = np.vstack((target_grid_x.ravel(), target_grid_z.ravel(), target_grid_y.ravel()))
The target_endcoding_function needs to be converted, too. The Python implementation uses eval
whereas the original MATLAB uses my_fun=str2func("@(x,y,z)"+target_endcoding_function);
.
TODO: Check caller implementations and convert appropriately.
When target_region_resolution is 10.
File "/home/kevin/Dev/CoilGen-Python/sub_functions/interconnect_within_groups.py", line 77, in interconnect_within_groups
part_group.opened_loop = part_group.loops.uv
AttributeError: 'list' object has no attribute 'uv'