mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +03:00
Added new flag Graphic3d_AspectFillArea3d::ToDrawSilhouette() activating silhouette (outline) rendering. The new feature can simulate fake HLR look-n-feel, when combined with Aspect_IS_HIDDENLINE interior style (filling object with background color), face boundary edges (with most continuity flag set to c2 or lower). Silhouette GLSL program is very simple - it displaces model alongside vertex normal, so that it is applicable only to smooth surfaces and closed volumes, and produces visual artifacts at sharp corners, especially when face boundary is disabled. OpenGl_SetOfShaderPrograms has been modified so that to reduce dimensions of the grid of static size based on amount of program combinations. OpenGl_PrimitiveArray no more allocates VBO resources if primitive array is marked to be not drawn via interior style / line type / marker type.
26 lines
752 B
Plaintext
26 lines
752 B
Plaintext
puts "========"
|
|
puts "0024437: Visualization - silhouette edges based on OpenGL"
|
|
puts "Draw box and sphere primitives"
|
|
puts "========"
|
|
puts ""
|
|
|
|
pload MODELING VISUALIZATION
|
|
|
|
vclear
|
|
vinit View1
|
|
vsetcolorbg 220 220 220
|
|
#vsetgradientbg 180 200 255 180 180 180 2
|
|
vaxo
|
|
|
|
psphere s 1.0
|
|
box b 2 -2 -2 1 2 3
|
|
|
|
vdisplay -dispMode 1 b s
|
|
vfit
|
|
|
|
vaspects b s -setDrawSilhouette 1 -setEdgeColor RED -setEdgeWidth 4 -setFaceBoundaryDraw 1 -setFaceBoundaryColor BLUE1 -setFaceBoundaryWidth 1 -setInteriorStyle HIDDENLINE
|
|
vdump $::imagedir/${::casename}_0.png
|
|
|
|
vaspects b s -setDrawSilhouette 1 -setEdgeColor RED -setEdgeWidth 4 -setFaceBoundaryDraw 1 -setFaceBoundaryColor RED -setFaceBoundaryWidth 4 -setInteriorStyle HIDDENLINE
|
|
vdump $::imagedir/${::casename}_1.png
|