That's quite interesting, Guan. In case you haven't already noticed it, the extra step of including an instance of the 3D-Effect is not necessary at all to get this workaround to work. So, just to repeat the basic idea:
- Place any raster image, draw a rectangle above it, select both and create a clipping mask
- While the resulting group is still selected, go to the Graphic Style Palette, create a new graphic style and call it "Show_Visible_Part_of_Mask" or "Default_Appearance" for example
- Select the group that contains the masked raster image, then apply the Outline Object effect (Effect > Path > Outline Object)
- In the Appearance Palette drag the Outline Object row below the Contents row (the visibility of the raster image will now be turned off)
- Create a new graphic style out of this appearance set and call it "Align_Mode" for example
Now draw any shape, select it plus the Clipping Mask object (that has the style "Align_Mode" applied to it), then click any of the Align buttons in the Align Palette. See that the aligning operation recognized the visible part of the clipping mask object, not its content (contrary to AI's default behaviour that recognizes the boundaries of the whole masked object).
Now, to turn on the visibility of the masked object, just apply the "Default Appearance" graphic style you've created in step 2.
When dealing with masked vector shapes, one could go a similar route by including an instance of the Rasterize Effect followed by the Outline Object effect, but that's definitely such an unefficient way that it is not worth to describe it more detailed here.
Nevertheless, your idea is a good one, Guan.
But all in all another example for the "wonderful" workarounds you're often forced to go in Illustrator in order to get very basic functionality.