Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brl-Cad and Arbitrary Precision Arithmetic #123

Open
AhmetAParker opened this issue Apr 3, 2024 · 3 comments
Open

Brl-Cad and Arbitrary Precision Arithmetic #123

AhmetAParker opened this issue Apr 3, 2024 · 3 comments

Comments

@AhmetAParker
Copy link

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
Copy link
Member

brlcad commented Apr 3, 2024

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
Copy link
Author

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
Copy link
Member

brlcad commented Apr 4, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants