How can I segment with more than one polyline?

Feel free to ask any question here
Post Reply
Tommy5577
Posts: 2
Joined: Sat Jun 30, 2018 4:32 am

How can I segment with more than one polyline?

Post by Tommy5577 »

First of all,sorry for my poor English.

My question is I want to segment a pointcloud with more than one polyline,when I use segment tool,it only able to select one polyline at a time,but I have a lot of polylines . Is there any way to select many polyline at one time or any other way to solve my problem?

Thanks
1.png
1.png (8.5 KiB) Viewed 4291 times
daniel
Site Admin
Posts: 7467
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How can I segment with more than one polyline?

Post by daniel »

Are you speaking about a segmentation 'inside' the polygon? With the scissors tool? Then you may achieve this with the command line tool (see the CROP2D option: http://www.cloudcompare.org/doc/wiki/in ... _line_mode).

Otherwise if it's extracting a profile / contour along the polylines, then you have the 'Extract sections' tool.
Daniel, CloudCompare admin
Tommy5577
Posts: 2
Joined: Sat Jun 30, 2018 4:32 am

Re: How can I segment with more than one polyline?

Post by Tommy5577 »

Daniel,thank you for your responds.

Yes,I mean 'inside' a polyline with the scissors tool , I will try the command line tool.

Thank you very much.
kelc0a0813
Posts: 1
Joined: Mon Jan 16, 2017 11:42 am

Re: How can I segment with more than one polyline?

Post by kelc0a0813 »

Hi
I started to use crop 2d commandline mode, but i have some difficulties.
"
set "AllowExt=xyz"
set "AllowExt= %AllowExt%"
set "AllowExt=%AllowExt: = *.%"

for %%a in (%AllowExt%) do (
C:\Progra~1\CloudCompare\cloudcompare.exe -O -GLOBAL_SHIFT -651000 -242000 0 %%a -C_EXPORT_FMT LAS -CROP2D Z 6 509.190 352.952 522.178 351.140 514.399 344.843 505.736 348.102 507.986 353.033 509.190 352.952 -CLEAR_CLOUDS -O -GLOBAL_SHIFT -651000 -242000 0 %%a -CROP2D Z 9 505.736 348.102 506.109 346.679 504.687 342.654 500.528 341.724 496.461 345.448 498.605 354.507 506.783 353.115 507.986 353.033 505.736 348.102
)

pause
"
As you can see I had to clear the pointcloud after every crop command, because after the first poly the command didn't find any point inside the polygons. (I think its because of that the crop command runs on the cropped pointcloud, not the remaining one)
Any advice for this problem?

The other problem is the second step.
Is the a method for saving the cropped pointcloud to folders or with ID names what can connect the cropped pointcloud with the "cropper polygon"
If that could work, that would be great.
Thanks, for the answers.
daniel
Site Admin
Posts: 7467
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How can I segment with more than one polyline?

Post by daniel »

Well, the crop tools keeps the points inside the polygon by default, unless you set the opposite (with the 'OUTSIDE'). And it replaces the original point cloud by the points 'inside' (resp. 'outside'). It would be a bit misleading to do the opposite.

(Instead of calling the CLEAR_CLOUDS option, you could also call CloudCompare a second time ;)

To set a specific filename for the resulting cloud, you have to use the 'SAVE_CLOUDS' with the 'FILE' sub-option (since V2.10).
Daniel, CloudCompare admin
leceta
Posts: 3
Joined: Fri Aug 27, 2021 10:31 am

Re: How can I segment with more than one polyline?

Post by leceta »

So if have understood correctly, when 2Dcroping different parts of a point cloud, each with its corresponding polyline, we need to reload the whole point cloud for each crop? If so, wouldn't be more efficient to load one, and keep in memory the original for the next cropping? isn't it any method to make command line work this way?

I'm planning to crop with some hundreds of polygons the same pointcloud that takes several seconds to be loaded and ideally, load once, process "n" times would be convenient...
any advice would be welcomed.
thanks
daniel
Site Admin
Posts: 7467
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How can I segment with more than one polyline?

Post by daniel »

So you want to generate as many clouds as polylines? Each time starting from the origin cloud?

That's clearly not the default use case indeed. You would have to hack the code to prevent this automatic replacement.
Daniel, CloudCompare admin
cripcrop
Posts: 1
Joined: Sun Oct 24, 2021 1:16 pm

Re: How can I segment with more than one polyline?

Post by cripcrop »

leceta wrote: Mon Sep 13, 2021 10:48 am So if have understood correctly, when 2Dcroping different parts of a point cloud, each with its corresponding polyline, we need to reload the whole point cloud for each crop? If so, wouldn't be more efficient to load one, and keep in memory the original for the next cropping? isn't it any method to make command line work this way?

I'm planning to crop with some hundreds of polygons the same pointcloud that takes several seconds to be loaded and ideally, load once, process "n" times would be convenient...
any advice would be welcomed.
thanks




Have you found a solution for this by now? I want to do a similar thing (about 500 polygons) but am already struggling with the command line.. :S
Post Reply