Hi,
When I re-meshed my model, I did by accident missed a face with four vertices. Unaware of my miss, I proceed further without any problem in NumCalc. However, the computation failed when I attempted to compute the HRTF. Therefore, I just wanted to highlight this potential pitfall. My suggested solution would be to check that all rows in "Model_Name"\ObjectMeshes\Elements.txt
, except for the first row, consists of seven numbers.
Best Regards,
Filip Tsai
Hi Filip,
sorry for my slow responses lately - I had quite a work stack followed by a vacation. A check for triangular faces would be good, indeed. It might be easier though to directly check it in Blender upon project export. Here's an example for checking if all faces are quads, but it would be easy to change:
https://blender.stackexchange.com/questions/146051/how-to-check-if-all-my-faces-on-mesh-are-all-quads-using-a-script
Would you have time to try to incorporate this in the Python export script? This might be how it's done:
- change to edit mode (theres an example of how to switch somewhere in the beginning)
- check all faces
- raise an Error if there is a quad face
- switch back to object mode
Best, Fabian
Hi Fabian,
Oh, silly me.
Here is my Python solution:
Best Regards,
Filip
Thanks - that looks good! I think I would only change the error message to
"Error! Not all faces in the Reference mesh are triangular!"
Can you give it a try and include it in exportMesh2HRTF.py in the develop branch? That would be great. It might be the most modular solution to make it a function that is called after line 344
Best, Fabian
Hi Fabian,
I was able to change it on my exportMesh2HRTF.py version after adding an else-statement. Unfortunately, I have forgotten how to changing the file in a
branch
as I barely usegit
. If you guide me through the steps I can do it or you can add the following code after the if-statement:Best Regards,
Filip
Hi again,
After som additional code editing and testing I think this code should work in exportMesh2HRTF.py
Best Regards,
Filip
Last edit: Filip Tsai 2021-08-13
Hi Filip,
can you upload your entire export_Mesh2HRTF.py? This would make it easier for me to spot and update your changes :)
Best, Fabian
Hi Fabian,
Here is my export_Mesh2HRTF.py
Best Regards,
Filip
thanks - This is now part of the develop branch :)