Page 1 of 1

How can I segment with more than one polyline?

Posted: Sat Jun 30, 2018 4:51 am
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 6381 times

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

Posted: Sun Jul 01, 2018 2:01 pm
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.

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

Posted: Mon Jul 02, 2018 6:56 am
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.

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

Posted: Tue Jul 24, 2018 1:22 pm
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.

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

Posted: Thu Jul 26, 2018 6:54 pm
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).

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

Posted: Mon Sep 13, 2021 10:48 am
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

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

Posted: Tue Sep 14, 2021 10:00 am
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.

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

Posted: Sun Oct 24, 2021 1:19 pm
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

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

Posted: Wed Aug 28, 2024 9:19 pm
by pttpx2
Tommy5577 wrote: Sat Jun 30, 2018 4:51 am 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
Hi, I have exactly the same question as Tommy5577. I checked the link above to the command line mode in CC Wiki but it's not clear to me how can I go from lots of polylines to vertices. I mean do I have to somehow extract those vertices from polylines prior to using the command line mode? Is there a quick method to do this?

Best regards,
pttpx2