Considerations about modelling huge and micro objects both present in a scene at same time.

 From:  Michael Gibson
7920.2 In reply to 7920.1 
Hi Marco, it kind of fundamentally does not work very well with the computer's floating point math calculations to work on much larger sized objects, or on objects far away from the origin. The way the math functions is when you have a larger number, the numbers are using more of their bits for the larger scale and you lose numeric precision in the lower range.

So really I would generally recommend not making scenes like you've done here with an object that has large numeric values in it, either for size or location really in any CAD program unless they are designed to use special custom math functions to deal with that (which will have a huge performance loss and so only done for special cases). Try to limit things to maybe less than 10,000 units or so instead of in the millions.

Some of the more heavy duty geometry kernels like Parasolid for example actually limit sizes to less than something like 1000 units as a maximum coordinate value in order to enforce this.

But MoI does actually try to accommodate a varying range of sizes by adapting the tolerance used for calculations to be a fraction of the bounding box size of the object (or to the smallest feature on an object depending on the particular operation). So for example if you fillet your large million-sized object by a radius of 10000, the fillet tolerance will be something like 10 units, while if you fillet an object that's between 1 and 50 units in bounding box diagonal size it will use a tolerance of 0.001 units. Basically the tolerance automatically adjusts to the particular objects being worked on. If you have an operation where 2 objects are interacting with each other generally the smaller of the 2 tolerances will be used.

There are various different problems that can happen if the calculation tolerance is either too tight or too loose, so it's not a great idea to try and combine objects of hugely different scale with each other. But the "relative tolerance" size-relative mechanism that I've set MoI up with now seems to work a lot better for general use than just having a single fixed value which tends to be a big problem in Rhino. Originally MoI did use just a fixed tolerance of 0.001 but to solve various bugs I started to use the relative tolerance mechanism in some areas in MoI version 2, and moved more things over to use it in v3. I think there are still a few areas that aren't switched over yet though, I have mostly switched things when fixing specific bug cases.


> As you can see, there's something strange that happens to the magnified objects.

That's a display artifact where you're ending up seeing the near clipping plane in the perspective view. That's a limitation of 3D display hardware that's hard to avoid, every perspective view must have a near clipping plane that chops off things close to the eye point, and MoI tries to place it only a small distance in front of the eye so under regular circumstances with normal sized objects you won't see it. You will probably get better results for your case here if you switch the 3D view to a parallel projection instead of perspective projection.

Hope this was some of the information you were looking for.

- Michael

EDITED: 14 Apr 2016 by MICHAEL GIBSON