Hole Features not Shown (Mesh Comparison)

Feel free to ask any question here
Post Reply
jcampbell9000
Posts: 4
Joined: Mon Jan 22, 2024 4:34 pm

Hole Features not Shown (Mesh Comparison)

Post by jcampbell9000 »

When comparing two aligned .STL files (made from solid bodies in SolidWorks), a 2mm thru hole I added in one part does not show up as a difference after using the "Compute cloud/mesh distance" command. Is there another way to highlight these areas where material is completely removed? I have tried swapping the reference and compared but this does not work either.

Ultimately, I am trying to use CloudCompare as a tool to compare CT scans of this plastic part with the original CAD file to identify significant differences (differences >0.003in). For the first step of this project, I must prove that CloudCompare can identify and highlight all differences between the two .STL files. With my simple changes made to the base model for my validation/proof of concept protocol, CloudCompare is not currently highlighting the thru hole I added as a difference from the base CAD file. The part I am hoping to use this on is very complex so being able to highlight all differences between the two STL meshes would be very valuable.
Attachments
Original mesh, same location as other image but showing that no hole visible.
Original mesh, same location as other image but showing that no hole visible.
No Hole.PNG (4.78 KiB) Viewed 4173 times
This is after the mesh comparison is run and the original mesh is hidden.  Difference at this area is considered 0 even though there is a complete removal of material.
This is after the mesh comparison is run and the original mesh is hidden. Difference at this area is considered 0 even though there is a complete removal of material.
2mmHole Compute Mesh Distance.PNG (5.12 KiB) Viewed 4173 times
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Hole Features not Shown (Mesh Comparison)

Post by daniel »

Are you maybe using the 2 STL files directly with the C2M (Cloud-to-Mesh) distances computation tool? In this case, as the compared mesh is replaced by its vertices, if they are too sparse, then you might miss the hole as no vertex is present in this area.

One solution would be to sample a lot of points on the compared mesh (Edit > Mesh > Sample points') and then use the resulting cloud with the C2M tool.
Daniel, CloudCompare admin
jcampbell9000
Posts: 4
Joined: Mon Jan 22, 2024 4:34 pm

Re: Hole Features not Shown (Mesh Comparison)

Post by jcampbell9000 »

Thank you Daniel! This does show the hole now at the cost of making the mesh a little slower to manipulate (I had to go up to 10,000,000 points to get a good resolution). I think I will update my procedure to use both methods of 1) comparing the two aligned .STLs and 2) converting sample A (base CAD) to a point mesh and comparing with the sample B (CT Scan .STL).
Attachments
2mmHole VISIBLE.PNG
2mmHole VISIBLE.PNG (15.27 KiB) Viewed 4160 times
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Hole Features not Shown (Mesh Comparison)

Post by daniel »

You may want to use the 'density' parameter instead of a fixed number of points if you want your process to be robust and work with any object size (hopefully the size won't get that large that it would generate billions of points ;).
Daniel, CloudCompare admin
jcampbell9000
Posts: 4
Joined: Mon Jan 22, 2024 4:34 pm

Re: Hole Features not Shown (Mesh Comparison)

Post by jcampbell9000 »

Hey Daniel, another question. What does the point density mean exactly in this case? Is it the number of points generated per a specific volume of the .STL I'm creating the sample mesh from, if so would you be able to tell me what that volume is?
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Hole Features not Shown (Mesh Comparison)

Post by daniel »

So it's a number of points per unit surface (considering the mesh is a set of triangles, so the total surface is the sum of each triangle surface).
Daniel, CloudCompare admin
jcampbell9000
Posts: 4
Joined: Mon Jan 22, 2024 4:34 pm

Re: Hole Features not Shown (Mesh Comparison)

Post by jcampbell9000 »

Thanks again Daniel, last question I have is how do I prevent the sample mesh from re-building/re-processing when I rotate the camera around the part? The sample mesh comparison is working great at picking up small differences, but everytime I have to change views it re-builds and takes close to 10mins (very large CT scan .STL). Is there a way to prevent this re-build and pan around the part freely?
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Hole Features not Shown (Mesh Comparison)

Post by daniel »

Ah ok. So you can try to disable the option 'When moved, decimate meshes over XXX triangles' in the 'Display > Display settings' dialog.

But sadly CC is bad with meshes, so it might still take a lot of time to interact with the 3D view...
Daniel, CloudCompare admin
Post Reply