Rhino3DM far away objects get scrambled

Hi,

Are there any known issues with 3dm library of objects which are far away from origo?
All the verts get slightly scrambled and it looses its original form definition.

My initial thought was that it was a visual representation problem like many dcc software have when objects are very far away so I have tried to correct its position by placing a negative vector to the objects vertices before its created but it didnt help.

Are there any workarounds for solving this except for opening rhino and reposition the objects which I would like to avoid?

In the image example you can see a red circle, which illustrates a perfect circle and the wireframe is the “perfect sphere” from rhino in its scrambled form due to to far away from origo.

Ball_Far.3dm (48.3 KB)

This is because mesh vertices are stored as single precision floating point numbers, and this shows as slight offsets like you see. You could create the object close to the origin, then make a block instance with the required translation transformation to far away from the origin.

looks like a floating point precision effect.
best practice is to avoid working very far from the origin

I see, If I was creating the rhino files then I would make sure to work closer to origin but the files are made by clients.

will UseDoublePrecision solve this issues or are there any other work around to get double precision on the mesh vertices?

If they are single precision when they come in converting them to double precision won’t increase the precision, just the amount of memory used to store them. The precision needs to be built in at the source when they are created.

You have the right idea, for sure, but that is what your client will need to do if they really need to be far from the origin. Or maybe you could get them to create them closer to the origin in the first place so single precision will be good enough.

1 Like

Thanks for the reply.

Just curious, how can rhino itself manage to display the meshes in viewport correctly even when they are very far away from origin but reading it with the 3dm library makes the meshes incorrect?

With that said If I move the mesh inside rhino after creation back to 0 then it doesnt have any issues.
Problem is that I would like to avoid using Rhino to do these corrections.

@menno ,

What would be a distance from origin that we should be mindful of? What is that threshold?