mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-22 04:37:23 +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.
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
puts "=================================================================="
|
|
puts "Toggle between CPU grid and GPU shader grid in the same view"
|
|
puts "=================================================================="
|
|
# Verifies that the two grid backends do not corrupt each other when toggled:
|
|
# 1) CPU grid active -> classical bounded grid visible
|
|
# 2) switch to shader (-type gpu) -> shader grid only on this view
|
|
# 3) switch back to CPU -> CPU grid visible again, shader gone
|
|
# Regression for the per-view shader / viewer-wide CPU coexistence policy.
|
|
|
|
pload MODELING VISUALIZATION
|
|
|
|
vclear
|
|
vinit View1 w=400 h=400
|
|
vaxo
|
|
|
|
box b 1 2 3
|
|
vdisplay b -dispMode 1
|
|
vfit
|
|
vzoom 0.2
|
|
|
|
# (1) Legacy CPU rectangular grid.
|
|
vgrid -type rect -step 0.5 0.5
|
|
vdump $imagedir/${casename}_cpu.png
|
|
|
|
# (2) Switch the same view to the shader grid. vgrid -type gpu calls
|
|
# V3d_View::GridDisplay which erases the viewer-wide CPU grid rendering
|
|
# (snap geometry on Aspect_*Grid is preserved) and enables the shader.
|
|
vgrid -type gpu -step 0.5 0.5
|
|
vdump $imagedir/${casename}_shader.png
|
|
|
|
# (3) Re-activate the classical CPU grid; SetGrid path must erase the shader
|
|
# grid first via the myShaderGridActive guard.
|
|
vgrid -type rect -step 0.5 0.5
|
|
vdump $imagedir/${casename}_cpu_again.png
|
|
|
|
vgrid off
|