mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-16 14:45:07 +08:00
- Renamed grid terminology and command/API surface from `inf`/“infinite” to `gpu`/“GPU”, plus `viewAdaptive` for camera-relative sizing. - Updated OpenGl grid rendering to compute adaptive bounds from the visible region and to fix axis coloring for rotated rectangular grids. - Refreshed Draw tests, help text, and API comments to match the new behavior.
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
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
|