Dear community,
First of all, I would like to thank all the developers for this great open source software. You are doing a great job!
Now to my question:
The fit function "2D polygon" is an useful tool to create a surface for plane point clouds and to export the mesh file.
It really reminds me of the alphashape algorithm. Therefore, I would like to know what is behind this function "2D polygon", as I could not find a comparable function for Python. Alphashape unfortunately does not give the same results and certainly not for 3D. I would like to find a way to use a function with equal results in Python (if possible).
Thank you in advance!
HollowHeartNet
No cost too great ...
Fit function: 2D polygon (facet)
Re: Fit function: 2D polygon (facet)
Well, it's fairly simple:
- we fit a plane on the cloud
- we project the 3D points on this plane
- we compute the 2D (concave) contour of the projected 2D points, as well as the 2D Delaunay mesh
- we back project the contour polyline and the Delaunay mesh to their '2.5D' equivalents (simply by replacing the 2D projected points by the 3D original ones)
- we fit a plane on the cloud
- we project the 3D points on this plane
- we compute the 2D (concave) contour of the projected 2D points, as well as the 2D Delaunay mesh
- we back project the contour polyline and the Delaunay mesh to their '2.5D' equivalents (simply by replacing the 2D projected points by the 3D original ones)
Daniel, CloudCompare admin
-
- Posts: 7
- Joined: Wed Mar 17, 2021 11:39 pm
Re: Fit function: 2D polygon (facet)
Dear Daniel,
Thank you for the answer. Unfortunately, I'm not that talented when it comes to programming. Do you know if there is a comparable code / script for this function in Python or in another language that I can follow?
Thank you for the answer. Unfortunately, I'm not that talented when it comes to programming. Do you know if there is a comparable code / script for this function in Python or in another language that I can follow?
Re: Fit function: 2D polygon (facet)
Ah, no. We only have the C++ one (but it actually uses different parts of CCCoreLib).
Daniel, CloudCompare admin
-
- Posts: 7
- Joined: Wed Mar 17, 2021 11:39 pm
Re: Fit function: 2D polygon (facet)
Does anybody know how to automate the 2D polygon fit process of a point cloud using python subprocess of CC or anything else?
The whole process I would like to automate consists of three steps:
1.) import point cloud from hard disk
2.) use 2D polygon fit function
3.) export generated mesh in OBJ format
I would appreciate any help.
The whole process I would like to automate consists of three steps:
1.) import point cloud from hard disk
2.) use 2D polygon fit function
3.) export generated mesh in OBJ format
I would appreciate any help.
-
- Posts: 7
- Joined: Wed Mar 17, 2021 11:39 pm
Re: Fit function: 2D polygon (facet)
I guess you are referring to the "Fit facet" function?
https://github.com/CloudCompare/CloudCo ... t.cpp#L138
https://github.com/CloudCompare/CloudCo ... t.cpp#L138
Daniel, CloudCompare admin
-
- Posts: 7
- Joined: Wed Mar 17, 2021 11:39 pm
Re: Fit function: 2D polygon (facet)
Yes that's what I need. Thank you, Sir!