3drepo / 3drepo.io

3D Repo web server
http://www.3drepo.io
GNU Affero General Public License v3.0
95 stars 38 forks source link

Clipping planes are stored twice within the same view #5231

Open Amantini1997 opened 1 day ago

Amantini1997 commented 1 day ago

Description

The view object contains the same clipping planes twice. One at top level, the second as a viewpoint property:

view = {
    ...,
    clippingPlanes: [...],
    viewpoint: {
        ...
        clippingPlanes: [...],
    },
};

Suggested solution

Either of the two clipping planes should be removed as it could lead to errors. It seems that the clippingPlanes property inside the viewpoint is what is used most (if not all) of the times, so the other one should probably be removed and any code relying on it should rely on the oter one instead

Goal

Tasks

sanmont3drepo commented 4 hours ago

I guess this is temporal? if you re-load the viewer the data is alright (at least in the endpoint) ? I have a suspicion that this is because we might be using v4 viewpoints for one thing and v5 viewpoints for another.