intersection of lines and point clouds

To post any request/idea for new functionalities
Post Reply
gonzalezpij
Posts: 18
Joined: Tue Jun 15, 2021 1:49 pm

intersection of lines and point clouds

Post by gonzalezpij »

Hi,

I'm really searching for an algorithm to calculate the intersection between lines (more than one) and one point cloud, the result could be the lines but cut until the point cloud "intersection".

it will be so useful for civil engineering, sometimes it is needed to calculate the length of the installations of bolts (segments) towards a tunnel section (point cloud), some cases are several thousands of them


At market, I just could find some software that needs a mesh to do that, but the problem is coming when it needed to decrease the density of the mesh and the time consuming.


thanks Dani
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: intersection of lines and point clouds

Post by daniel »

I'm not sure to fully understand what the 'intersection' between a line a point cloud is... can you share a picture with us maybe?
Daniel, CloudCompare admin
gonzalezpij
Posts: 18
Joined: Tue Jun 15, 2021 1:49 pm

Re: intersection of lines and point clouds

Post by gonzalezpij »

i dont know if i will be able to show in a picture, but I will try.

The input will be several lines, coming from dxf for example, and a point cloud.
The idea is to find the intersection as shows the attached picture


Image
Attachments
Untitled.jpg
Untitled.jpg (45.52 KiB) Viewed 7525 times
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: intersection of lines and point clouds

Post by daniel »

Ah! Then maybe one option would be to sample points on the (poly)lines (Edit > Polyline > Sample points) and then compute the distances between the resulting cloud and the real point cloud. Hopefully the point with the smallest distance should be the closest to the real intersection point...
Daniel, CloudCompare admin
gonzalezpij
Posts: 18
Joined: Tue Jun 15, 2021 1:49 pm

Re: intersection of lines and point clouds

Post by gonzalezpij »

yep, can be an option, but I'm talking about hundreds of thousands of lines, if I need to subsample all of them and later recognize the intersection it will be so time-consuming

it is useful for civil engineering, especially tunnel construction
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

Re: intersection of lines and point clouds

Post by DA523 »

I think a correct meshing of the tunnel is a necessary step unless you have very dense pointscloud of the tunnel.
Remember that meshing in CC is sometimes used to generate dense pointscloud from non-dense pointscloud
using EDIT >> MESH >> SAMPLEPOINTS

I attached here a BIN file as an example of your question just to illustrate the problem ....

.
nails to tunnel.zip
(43.12 KiB) Downloaded 592 times
gonzalezpij
Posts: 18
Joined: Tue Jun 15, 2021 1:49 pm

Re: intersection of lines and point clouds

Post by gonzalezpij »

Hi,

i found the way to do it, actually I was busy, but yesterday it comes back to my mind, and the solution its easy to do it.
M3C2 distances its key, just need to use the "tunnel" cloud and the lines import as a cloud.
The cloud of the lines (bolts) needs to be import in ASCII format with XYZ of the start point and the vector direction like normal.

After in M3C2 plugin, it can be calculate using the normal direction towards the tunnel cloud
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: intersection of lines and point clouds

Post by daniel »

Nice!
Daniel, CloudCompare admin
Post Reply