Page 1 of 1

CROP2D for X, Y planes?

Posted: Wed Jul 06, 2016 7:32 pm
by AlexE
Dear Daniel, Dear CC users,

Does cloud compare has properly support CROP2D along X or Y planes?
I trying to crop point cloud inside a polygonal selection by executing:
CloudCompare -O my_cloud.ply -CROP2D Y 4 X1 Z1 X2 Z2 X3 Z3 X4 Z4
But CC says: "No point of cloud 'my_cloud.ply' falls inside the input box"
Cropping along X plane with correct Yn Zn give the same result.

At the same time when I trying to crop along Z plane it works just fine
CloudCompare -O my_cloud.ply -CROP2D Z 4 x1 y1 x2 y2 x3 y3 x4 y4 // x corrdinates are different to X from above and are related to Z plane

Am I miss something? I think I've correctly picked up coordinates by "Point Picking" for a particular plane

Thanks in advance.

Re: CROP2D for X, Y planes?

Posted: Thu Jul 07, 2016 8:18 am
by daniel
Looking at the code, it seems that it's okay.

However we apply 'circular shifting' to deduce the horizontal dimensions:
  • if vertDim = 2 = Z, then horizDim1 = X and horizDim2 = Y
  • if vertDim = 0 = X, then horizDim1 = Y and horizDim2 = Z
  • if vertDim = 1 = Y, then horizDim1 = Z and horizDim2 = X
Therefore I believe you should swap X and Z in your command.

Re: CROP2D for X, Y planes?

Posted: Thu Jul 07, 2016 8:43 pm
by AlexE
Thanks for quick reply.

Unforunatelly swap X and Z doesn't help. Making x or z or x z negative doesn't help either ((
Suppose I want to cut stanford bunny and want to keep back part of the bunny
http://graphics.stanford.edu/pub/3Dscanrep/bunny.tar.gz
bunny/data/bun000.ply

I use following:

CloudCompare -O bun000.ply -CROP2D Y 3 0.02 0 0.015 0.059 0.055 0

But no luck (

Re: CROP2D for X, Y planes?

Posted: Fri Jul 08, 2016 1:58 pm
by daniel
Okay I understand now. We were indeed changing the dimensions of both the cloud and the polyline! (but at two different places).

I fixed this. And I've updated the 2.8.beta version online: http://www.cloudcompare.org/release/.

Thanks for the feedback (and the patience ;).

Re: CROP2D for X, Y planes?

Posted: Fri Jul 08, 2016 2:35 pm
by daniel
it's getting late ... After multiple attempts, now the upload is really finished!

Re: CROP2D for X, Y planes?

Posted: Fri Jul 08, 2016 3:54 pm
by AlexE
Thanks a lot!! ))
Now it works well!