PointCloud previews is moved to 0,0,0

Hi

I have this issue where a pointcloud is being shown to be at 0,0,0 even throw it can be selected in its correct position. If I explode the clods the points will appear in the correct position.

notes this only happens when the cloud is more the 150m away from the origin.
the files contain several point clouds, not one large cloud.

I’m splitting the cloud in a script component in grasshopper:

pts = full_cloud.GetPoints()
pts_XYZ = np.array([[p[0],p[1],p[2]] for p in pts])

r = np.array([r for r in range(len(pts))])

c_cloud = []

for i,c in enumerate(pts_center):
    if not c:
        continue
    inside_box = (pts_XYZ[:, 0] < c.X + x[i] ) & (pts_XYZ[:, 0] >= c.X - x[i]) & (pts_XYZ[:, 1] < c.Y + y[i]) & (pts_XYZ[:, 1] >= c.Y - y[i])
    
    outside_box = np.invert(inside_box)
    remove_index = r[outside_box].tolist()
    
    new_cloud = full_cloud.Duplicate()
    new_cloud.RemoveRange(remove_index)
    c_cloud.append(new_cloud)

a = th.list_to_tree(c_cloud)

Rhino8 version : 8.5.24072.13002, 2024-03-12

Can you help me out?

Hello and welcome to the forum,

Would it be possible to send a few cloud point examples so I can test the script and the cloud points together?

Hi @eirannejad
Thank you.

Yes, of course.
the gh file creates 2 clouds and export to file. one close to the origin and one 300m away from the origin. it looks ok I grasshopper but when I open the exported file the one 300m for the origin is previewed at the center of the file. If I explode the point cloud the points appear in their right position.

pointcloud_export.3dm (49.7 KB)


and the gh file
poincloud_export.gh (12.2 KB)

Hi Johan,

In a quick test i’m not seeing the preview in the incorrect location.

8.7.24092.02001

Hi @Japhy
Thank you for getting back to me.
I have the same behaviour when previewing in Grasshopper. But when I open up the export file. (pointcloud_export.3dm). It looks like this.

image

my version is 8.5.24072.13002, 2024-03-12

Let’s try a newer version if possible. Thanks

Hi @Japhy

I updated to 8.6.24086.11002, 2024-03-26
I still have the same issue.
Also using the point cloud component like below produces the same result.

Are you not able to reproduce the error?
I have attached the exported point cloud that I am getting.

pointcloud_export.3dm (9.8 KB)

Not able to repeat, I might be misunderstanding the issue.

The exported points clouds are showing the proper preview.

Hi @Japhy

Did you try to open the exported 3dm file? Not loading it via Grasshopper.

Correct, the screenshot above was with the pointcloud_export.3dm file open.

Hi Japhy

Thank you for given this issue some time.
Here is what i experience.

Hi @Japhy

I just opened the exported file on a Windows machine. Here there is no issue. This seems to be linked to Rhino on Mac. Also, I don’t think that it has anything to do with Grasshopper as the issue also occurs when creating a cloud in Rhino. The video above was recorded on an iMac M1, could this be about Metal? Are you able to produce the error in Rhino on Mac?

-Johan

Thanks, my bad, didn’t notice this was mac.

You’re file opened up as you see it, i’ll get a you track going.

1 Like

Perfect. Thank you!