TriangleMesh.jl icon indicating copy to clipboard operation
TriangleMesh.jl copied to clipboard

Remove Boolean arguments and add replace them by optional numerical values if possible

Open pablo-angulo opened this issue 3 years ago • 4 comments

There seems to be no argument for setting area_max, just a bool for user input, which is totally awkward. Could you replace user input by a regular argument that we can set from within the code?

pablo-angulo avatar Oct 17 '21 08:10 pablo-angulo

Seems that optional argument add_switches="a0.1" does the job, but a documented argument would be better. Honestly, a prompt for user input gives me the chill!

pablo-angulo avatar Oct 17 '21 08:10 pablo-angulo

Dear @pablo-angulo,

There seems to be no argument for setting area_max, just a bool for user input, which is totally awkward. Could you replace user input by a regular argument that we can set from within the code? Seems that optional argument add_switches="a0.1" does the job, but a documented argument would be better. Honestly, a prompt for user input gives me the chill!

Thank you for pointing this out. I am aware of this little inconvenience. This simple interface originated from a small project some years ago when there was no convenient interface to the C-library that does the actual work out there. This code solved my problem and in the hope that it would be useful to other people I shared it with the community. My time does not permit working on Julia code since my main projects are of totally different nature.

If you think this issue deserves a change you are welcome to improve the code, document it so every potential user will understand how to use it and submit a merge request. This is often the way how small open-source projects work.

Best, Konrad

konsim83 avatar Oct 17 '21 19:10 konsim83

Fair enough. I just started with julia, but the task does not seem hard. Thanks for sharing and will give a shot

pablo-angulo avatar Oct 18 '21 10:10 pablo-angulo

I just started. I'm not using visual studio but plain julia packages:

https://pkgdocs.julialang.org/v1/creating-packages/

I hope I don't mess with your config. Before I continue, let me show you a little bit of the work, and please do tell me if it is ok:

This is what I did intentionally: https://github.com/pablo-angulo/TriangleMesh.jl/commit/d4ea90d1f8afa522a062c02349af30e6e34a788d

And this happened automatically: https://github.com/pablo-angulo/TriangleMesh.jl/commit/54986bf92f9af8c84e9994082652eb5025ac7506

pablo-angulo avatar Oct 18 '21 11:10 pablo-angulo