How clip the side of a 3D plot?

I tried to clip the top (z=0) and one side (y=-1) of a 3d plot using the following script:test.txt (548 Bytes)

#!/bin/bash
p=115/25
gmt begin test
gmt plot3d -pz$p/0 -R-2/2/-1/1/0/1 -Jx1c -Jz-1c -Bxa2f1 -Bya1f0.5 -Bza1f0.5 -BeWNsZ -Wthicker,black <<EOF
>
-2 -1 1
 2 -1 1
 2 -1 0
>
 2 -1 1
 2  1 1
 2  1 0
EOF
gmt clip -pz$p/0 -Jz -Wthin,red <<EOF
-2 -1 0
-2  1 0
 2  1 0
 2 -1 0
EOF
gmt plot3d -pz$p/0 -Jz -Gskyblue -L <<EOF
-2  0 0
 0  2 0
 2  0 0
 0 -2 0
EOF
gmt clip -C
gmt clip -py$p/-1 -Jz -Wthin,blue <<EOF
-2 -1 0
-2 -1 1
 2 -1 1
 2 -1 0
EOF
gmt plot3d -py$p/-1 -Jz -Gorange -L <<EOF
-2 -1  0.5
 0 -1  1.5
 2 -1  0.5
 0 -1 -0.5
EOF
gmt clip -C
gmt end

What I get was:test.pdf (5.0 KB)
The clip on the top worked as I expected, but the clip on the side y=-1 didn’t work.
Note that the blue line showing the clip path is in z=1,y=1, it is not what I expected.
If I remove the clip in y=-1, I get:testB.pdf (4.9 KB)
It is as I expected without the clip.
Is there a way to make the clip at y=-1?
(using gmt 6.2.0_2ea7528_2021.01.14)

Should I consider this a bug and open a new issue?

I don’t see anything in the docs about clipping outside of the x-y plane, which would mean this is more of a feature request than a bug. @pwessel, is this interpretation correct that clip cannot accept x,y,z pairs?

Yes, clip only reads points in the z-plane (lon,lat or x,y) and was never designed to deal with other planes. I suggest @MarceloBanik open a feature request that explains the benefit of allowing psclip to take a new option so that it can instead read and project (x,y,z) coordinates and use the resulting projected polygon as a clip path. Assuming all this would work.

Thank you for the clarification. I’ll open a feature request as suggested.