| puts "==================================================================" | |
| puts "0030979: Bounded rectangular GPU grid (-size X Y clips the area)" | |
| puts "==================================================================" | |
| # -gpu routes through the shader path so that -size truly clips the | |
| # rendered grid (Size on Aspect_RectangularGrid bounds the CPU graphic too, | |
| # but the shader path is the one this PR's bounding pipeline targets). | |
| pload MODELING VISUALIZATION | |
| vclear | |
| vinit View1 w=400 h=400 | |
| vaxo | |
| box b 3 3 0.1 | |
| vdisplay b -dispMode 1 | |
| vfit | |
| vzoom 0.5 | |
| # Full square bound: 4x4 world-unit patch centered at plane origin. | |
| vgrid -gpu -type rect -step 0.5 0.5 -size 4 4 | |
| vdump $imagedir/${casename}_full_square.png | |
| # Rectangular bound with different extents in X/Y. | |
| # NOTE: vgrid -size expects strictly positive X and Y values. | |
| vgrid -gpu -type rect -step 0.5 0.5 -size 4 8 | |
| vdump $imagedir/${casename}_strip_x.png | |
| # Same width but with a slight z-offset so the grid sinks below the box's | |
| # top face - used to avoid z-fighting in dense-coplanar scenes. | |
| vgrid -gpu -type rect -step 0.5 0.5 -size 4 4 -zoffset -0.01 | |
| vdump $imagedir/${casename}_zoffset.png | |
| vgrid off |