Clipping with polygon list

Feel free to ask any question here
tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Clipping with polygon list

Post by tsch_kl »

Hello Daniel,
is it or would it be possible to implement a combination of the two tools?
3.png
3.png (1.19 MiB) Viewed 6013 times
I want to clip a point cloud based on a given surface (list of coordinates or polygon). If no, do you have an idea, how it could do that manually?
Regards
Thomas
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Clipping with polygon list

Post by daniel »

You mean you want to clip all the points along one direction that fall within a polygon defined in a plane orthogonal to this direction?

Then your only friend might be the '-CROP2D' command line option (see https://www.cloudcompare.org/doc/wiki/i ... _line_mode). You'll have first to reorient the cloud so that the polygon can be described only in 2D).
Daniel, CloudCompare admin
tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Re: Clipping with polygon list

Post by tsch_kl »

Exactly, I want to cut out all points in a certain polygon considering a normal vector in the orthogonal direction (e.g. 10cm). That is, in a volume of interest = polygon * normal vector.
So yes.

Stupdi question, could not find the answer, but how do I start the command line mode? Unfortunately, I cannot make any entries in the console.
tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Re: Clipping with polygon list

Post by tsch_kl »

tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Re: Clipping with polygon list

Post by tsch_kl »

Hi Daniel,

the function -CROP2D {ortho_dim} {n:number of vertices} X1 Y1 X2 Y2 ... Xn Yn is explained as follows:

Crops all loaded clouds inside or outisde a given 2D polyline. Cropping is done in a plane defined by its orthogonal dimension: X, Y or Z (i.e. coordinates along this dimension will be ignored).
Optional settings are:
  • OUTSIDE: if defined only the points falling outside the input polyline will be kept (instead of inside by default).
Note:
  • result is automatically saved by default (see the AUTO_SAVE command to change this)
    each
  • cloud will be replaced in memory by its cropped version
Am I able to define the length of the cropped direction? For example 0.1m?
tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Re: Clipping with polygon list

Post by tsch_kl »

Would it be possible to import a polyline into CloudCompare GUI? Then I also could use the scissors tool. I'd only need to define the orthogonal direction.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Clipping with polygon list

Post by daniel »

So, no, you can't define the depth with CROP2D, it's an 'infinite' crop.

And yes, you can easily import a polyline as .poly file (it's a text file, with the X Y Z coordinates of each vertex per line).
Daniel, CloudCompare admin
tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Re: Clipping with polygon list

Post by tsch_kl »

Is it possible to import the poly file with the GUI?
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Clipping with polygon list

Post by daniel »

Yes, .poly files can be imported in the GUI version.
Daniel, CloudCompare admin
tsch_kl
Posts: 22
Joined: Tue Apr 25, 2023 8:39 am

Re: Clipping with polygon list

Post by tsch_kl »

Thanks. Did work!
Post Reply