How to extract cloud points perimeter?

Feel free to ask any question here
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: How to extract cloud points perimeter?

Post by WargodHernandez »

This may be worth adding as a standard option to contour extraction maybe "3d contour" or "in place envelope"... not sure on the name, but I can see the use of this.
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: How to extract cloud points perimeter?

Post by DA523 »

Dear WargodHernandez, thank you for your help

I did these steps :
1- Select points clouds you want to extract its perimeter
2- Edit > Scalar filed > Export coordinates to SF (choose z)
3- Select points clouds Edit > Multiyply/Scale > z=0 (to flatten points clouds in xy plane )
4- Click Cross section tools
5- Click Contour
with parameters (check extract envelope > full) (check extract contours --play with 2 numerical parameters for better matching in xy view))
6- You will get new polyline (whithc it is perimeter line but only in xy plane z=0)
7= Select flattened points clouds and new polyline together > Tools > Distances > Cloud/primitive Dist
8- Now flattened points clouds SF is distance from polyline
....
.......
.........
12- Edit > Scalar filed > filer by value ( 0 to 2)

What are missing steps?
I did not understand SF interpolation?

However I simply use librieCalc to finish the job successfully by pasting original z value instead of zeros in column no3 while I keep column no4 as it is (distance)
then I use SF filer by value in CC
and I am satisfied with result
.
13.png
13.png (28.37 KiB) Viewed 10045 times
122.png
122.png (99.8 KiB) Viewed 10045 times
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: How to extract cloud points perimeter?

Post by WargodHernandez »

Capture1.JPG
Capture1.JPG (216.96 KiB) Viewed 10042 times
Capture2.JPG
Capture2.JPG (139.13 KiB) Viewed 10042 times
Capture3.JPG
Capture3.JPG (140.34 KiB) Viewed 10042 times
Capture4.JPG
Capture4.JPG (127.38 KiB) Viewed 10042 times
Capture5.JPG
Capture5.JPG (142.28 KiB) Viewed 10042 times
Capture6A.JPG
Capture6A.JPG (207.23 KiB) Viewed 10042 times
Capture6B.JPG
Capture6B.JPG (175.79 KiB) Viewed 10042 times
Capture7.JPG
Capture7.JPG (205.48 KiB) Viewed 10042 times
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: How to extract cloud points perimeter?

Post by DA523 »

error msg
[02:13:38] [InterpolateScalarFieldsFrom] Clouds are too far from each other! Can't proceed.

.
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: How to extract cloud points perimeter?

Post by WargodHernandez »

You would want to do it when both the cloud and the polyline vertices are flat with z=0.
So immediately after creating the contour polylines that's when you should copy the z coordinate SF from the original cloud
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: How to extract cloud points perimeter?

Post by DA523 »

Thank you
I did it successfully

Required steps as per WargodHernandez great help:
1- Select cloud you want to extract its perimeter
2- Clone it into new cloud then select new cloud
3- Edit > Scalar filed > Export coordinates to SF (choose z)
4- Select cloud > Edit > Multiyply/Scale > z=0 (to flatten cloud in xy plane )
5- Click Cross section tools
6- Click Contour
parameters (check extract envelope > full) (check extract contours --play with 2 numerical parameters for better matching in xy view))
7- You will get new polyline (perimeter line but only in xy plane z=0)
8= Select flattened cloud + (polyline cloud vertices) > Edit > Scalar filed > Interpolate from another entity
9- When child window appears, click coord. Z
10- (polyline cloud vertices) r > Edit > Scalar filed > Set SF as coordinates
11- when child window appears choose Z
12- Select (polyline cloud vertices) > Edit > Scalar filed > Set SF as coordinate(s)
13- Now you have new perimeter cloud matching original cloud perimeter in xyz

Extra Remarks:
a- Interpolate from another entity copies SF from cloud which has SF to non-SF cloud using nearest vertex SF value etc ..
b- Always you can generate SF fro z values of non-SF cloud so you turn it to SF cloud
c- Always you can copy SF to z values so you have new elevation

d- There is another approach which has ability to choose some original cloud vertices as perimeter and can choose thick perimeter depending on your SF filtering
Steps of this approach include
(Cross section tools > Contour)
(z scaling)
(Tools > Distances > Cloud/primitive Dist)
(Edit > Scalar filed > filer by value )
(pasting z value in librieCalc or Excel )
.
aa.png
aa.png (18.79 KiB) Viewed 9992 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to extract cloud points perimeter?

Post by daniel »

And normally, the 'Tools > Fit > Facet' function does exactly the same thing... (for the 'contour' extraction part)
Daniel, CloudCompare admin
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: How to extract cloud points perimeter?

Post by DA523 »

daniel wrote: Tue Jul 27, 2021 11:25 am And normally, the 'Tools > Fit > Facet' function does exactly the same thing
You wright, it is easier to use.
just have to scale cloud to z=0 and and recover again from SF
Also change Max Edge lengh between ( 0.1 to 20) depending on your cloud shape
Really this feature is very useful to build an irregular roof (cover) of any shape prior to volume tools

.
max edge length.png
max edge length.png (25.12 KiB) Viewed 9920 times
Post Reply