Can't flip normals in C2M-Distance

Feel free to ask any question here
Post Reply
michaeladamsen
Posts: 5
Joined: Sun Nov 15, 2020 6:07 pm

Can't flip normals in C2M-Distance

Post by michaeladamsen »

I am having some problems with flipping the normals in the C2M-distance menu. It is not possible to check the checkbox saying "flip normals". Do any of you have an idea why this happens? I am calculating distances between a point cloud and a fitted plane.
michaeladamsen
Posts: 5
Joined: Sun Nov 15, 2020 6:07 pm

Re: Can't flip normals in C2M-Distance

Post by michaeladamsen »

Here is some additional info: I tried to use the tool next to C2M, called "Calculate Distance to primitive". I thougt it was appropriate since I was dealing with a fitted plane between 4 points. In this menu it was possible to check the "Flip normals" option, and afterwards I compared the results with the C2M-results.

If i did not check the "Treat planes as bound" option I found a difference of 7 mm between the mean values in Stat Param. The standard deviation however, was not affected.

If i did check the "Treat planes as bound" option, I got the same result as the C2M-distance tool, which is great, because that was what I was looking for.

However, I am still curios what the difference is between the C2M-distance tool and the "Calculate Distance to Primitive"-tool, and I havent been able to find information on this topic on the wiki. Do they use the same method to calculate the distance to the pointcloud? And what does the "treat planes as bound"-option actually do? In which situation would you prefer not to check that option?
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Can't flip normals in C2M-Distance

Post by daniel »

So for the C2M dialog, it was a bug (the code to activate the 'flip normals' checkobx disappeared apparently?!)

Normally, the 'Compute distance to primitive' tool uses the underlying primitive equation to compute the distance, and not the mesh (triangles) that are used to represent the primitive. This will give you a slightly more accurate result, especially for curved primitives (sphere, cylinder, etc.). Without requiring you to increase the number of triangles (= primitive resolution).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Can't flip normals in C2M-Distance

Post by daniel »

I updated the 2.12.alpha version online to fix the 'flip normals' bug.
Daniel, CloudCompare admin
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Can't flip normals in C2M-Distance

Post by WargodHernandez »

just for your awareness the "Treat planes as bound" checkbox will make the calculations to the plane primitive either work based on the visible bound plane (bound by the width and height specified on the plane) or it will treat the plane as an infinite plane

Here is the same cloud and plane measured both ways, the plane was created by fitting a plane and then reducing the width and height to be smaller than the overall cloud. in the unbound version you will get the same result as the original plane before its size was reduced.
Image

in other words when bounded the distance is to the rectangle defined by the plane and the width/height, where the unbounded it directly calculates directly against the plane equation

Code: Select all

plane equation: [a,b,c,d] as 'ax+by+cz=d' with norm(a,bc)==1
Post Reply