BRL-CAD / brlcad

BRL-CAD is a powerful cross-platform open source combinatorial solid modeling system
https://brlcad.org
Other
686 stars 140 forks source link

Brl-Cad and Arbitrary Precision Arithmetic #123

Open AhmetAParker opened 5 months ago

AhmetAParker commented 5 months ago

I was searching for big number (arbitrary precision arithmetic) support for Brl-Cad. I found at internet that Gmp library integration has been complete. Is it true? if yes, how can I choose unit system according to it and do I need to enable something on the software? Regards Ahmet Alper Parker

brlcad commented 5 months ago

A really long time ago (maybe 15+ years), someone worked on implementing a C++ "fastf_t" class that used GMP for its implementation with operator overloading. I don't believe that work was ever integrated into the repository. It may still even be sitting on sourceforge as a patch.

Other than that, there is not support for arbitrary precision but there is support for pretty much any unit system. Geometry modeling can be done using any units and is specified using the "units" command. What exactly are you trying to do? Why do you need arbitrary precision (as opposed to 64-bit floating point)?

AhmetAParker commented 5 months ago

I am writing a finite element program which has arbitrary precision capabilities. I was looking for solid modeller. I do not know what I will do with such a 3d program but I thought if I do analysis, I should have a 3d cad program with similar properties. Thank you...

brlcad commented 5 months ago

BRL-CAD does leverage more precision than all other CAD kernels that I'm aware of due to care taken on representation encoding and ray tracing. Numerical accuracy defaults to tolerances of less than 0.0005 millimeters over hundreds of kilometer distances. That said, extending support to arbitrary precision is not likely helpful for your purpose unless you intend to leverage BRL-CAD ray tracing as part of some sort of advanced Isogeometric analysis method. You'll query geometry and get results as precise as the original representation, with or without BRL-CAD using arbitrary precision under the hood (there is no on-disk format for arbitrary precision in any CAD system).