Replies: 3 comments 12 replies
-
Yeah, this is a good point. Perhaps precision as it currently stands should not even be exposed in our public API at all anymore? I think we need a different name than resolution though. People are used to resolution being pixels, where higher means more quality - in meters this will be the opposite. Precision actually has the same problem (high precision is small meters). How about tolerance? That's pretty standard in the CAD world for this. How about |
Beta Was this translation helpful? Give feedback.
-
And another weird idea: Instead of number of faces/angle/segment length, can circle/sphere constructor take a tolerance parameter and calculate the number of faces required to meet the tolerance? |
Beta Was this translation helpful? Give feedback.
-
Can I just add something, as a user: I'd like to see a public method on Manifold that lets me decimate to some certain unit resolution, regardless of whether that Manifold was created from an input mesh or not. If this already exists, then the way to call it has eluded me. I think this is something that is done internally and automatically in some cases, possibly as the SimplifyTopology step, but I'd like to, for example, be able to say "simplify/decimate this manifold to a lower precision/resolution" on purpose. Specifically, I've been working with large scenes in which I don't want any tiny triangles to exist if possible. And so I'd love to be able to decimate/simplify any Manifold to a low resolution of 1 mm, and take advantage of the double precision to be able to support extremely large scenes, rather than extremely precise ones. So I do hope that, rather than remove precision controls from the API, there might be more exposed, in fact... |
Beta Was this translation helpful? Give feedback.
-
Related to the performance of offset due to less simplification...
I think even though precision is a key concept in manifold, most of our users are nof very aware of it, and our APIs are not helping this. There are two kinds of precision: One that user wants, and one that we can guarantee to keep.
For example, if users are working on some 3D printing models, they may say they want the precision to be around 0.05mm, transformations should not change this. In our library, the precision value does not work like this, it depends on the transformations applied because it is about the maximum floating point error that may accumulate in our operations. Our existing API allows the user to set the (second kind of) precision valud when they import a mesh, but I doubt if users know when they should be setting it. Most of the time they probably shouldn't be touching that, unless they want this to be scaled according to transformations... And users do want to control the (first kind of) precision, we should probably allow that, so more simplification can be done and things can work faster.
Proposal:
Rename precision into uncertainty, error or imprecision.Hide precision from public APIs.resolutiontolerance field, which is independent of transformations and will become theminmaxresolutiontolerance when performing boolean operations. Automatically set to maximum of itself and fp error in 1.SetTolerance
that immediately performsSimplifyTopology
when the tolerance is greater than the previous value.Beta Was this translation helpful? Give feedback.
All reactions