Universite-Gustave-Eiffel / I-Simpa

An Open Source software for 3D sound propagation modelling
https://i-simpa.univ-gustave-eiffel.fr/
GNU General Public License v3.0
231 stars 57 forks source link

Batch geometry modify #108

Closed wbinek closed 6 years ago

wbinek commented 7 years ago

I would like to do some geometry optimization task using spps. I need to be able to change geometry before each rerun of spps. I can modify the .poly file and run tetgen for that poly. I will just change the vertexes coordinates so numbers of vertexes and polygons will not change.

Is it currently possible to automatically generate .mbin and .cbin for calculation?

Thanks for any help!

nicolas-f commented 7 years ago

mbin and cbin files driver are in libsimpa. However sadly the tetgen files driver are in I-Simpa.

So in python:

Please do not forget that SPPS does not take account of several noise propagation effect such as diffraction, wave interference.. Such as this computation core is more appropriate for indoor material optimisation than geometry optimisation.

wbinek commented 7 years ago

Thanks for the answer. I know about the limitations geometrical methods but it is a special case. So I should load tetgen results to python and export them using CMBIN class?

nicolas-f commented 7 years ago

Yes, I'm sorry I have not written a tutorial about this.

wbinek commented 7 years ago

Thanks for help! I will try to make make libismpa working for me and then I'll try it out.

wbinek commented 7 years ago

Hi!

I am trying to make is all work. I found that I have to export my geometry using CformatBIN to obtain .cbin file (this seams easy). The problem I have is how to create .mbin easily. I know that it is made using class CMBIN which requires a trimeshmodel.

In I-SIMPA the trimesh is made by CObjet3D::GetTetraMesh method. The problem is it is not in libsimpa. Would it be possible to add CObjet3D to libismpa? It will also allow .ply and other formats exchange. I think it may be useful.

nicolas-f commented 7 years ago

Hi,

.Poly and .node .ele .. drivers will be moved to libsimpa.

I'm currently rewriting all drivers for input/output of text files in order to solve localization issues.

https://github.com/nicolas-f/I-Simpa/tree/fix_model_mesh_io

In the future SPPS will also handle .ply files for input/output

wbinek commented 7 years ago

Thanks. I will wait until the drivers are moved.

In terms of SPPS ply support I think it will be good to support some modified ply with material info (like in CATT-Acoustics), so in one input file we can define both geometry and materials for it. Similar to the way ioModel is constructed only in text format. What do you think about it?

nicolas-f commented 7 years ago

Yes the identifier of face materials would be in the ply model. But not the acoustics properties.

wbinek commented 7 years ago

That's great, thanks!

wbinek commented 7 years ago

Hi! Is there any progress with this feature? Is there currently any function that allows to load and parse tetgen .face .ele .neigh .node files to create .mbin?

nicolas-f commented 7 years ago

Hi,

There is a python module for reading/writing tetgen files:

https://documen.tician.de/meshpy/tri-tet.html

You can install it directly in I-Simpa:

https://github.com/Ifsttar/I-Simpa/wiki/Add-python-packages-in-I-Simpa

wbinek commented 6 years ago

Hi! Thank you for the answer. As all the required pieces are available I close the issue.