Simple display problem; some edges do not show up

Hi,

I have a simple reproducible problem: some of the edges are not displayed, when I execute this code:

---snip---
for (int i = 0; i {
gp_Pnt p1(i * 10, 0, 0);
gp_Vec v1(0, 100, 0);
context->Display(new AIS_Shape(BRepBuilderAPI_MakeEdge(p1, p1.Translated(v1))), false);
}
---snap---

If I put the edges in a TopoDS_Compound and display the compound, all edges are visible.

Windows 7 Pro
VS 2013 Pro
OCCT 6.8.0 64 bit

What may be the reason? Where should I search? Does anybody meet the same problems? Can anybody reproduce this error?

Regards
Thorsten

Thorsten H's picture

Another effect I recently noticed: if I rectangle-select some edges before and behind the "missing ones" an export them to a file, reimport them, the missing edged are visible!

Thorsten H's picture

Another one: if I select some edges (e.g. on the left side) and delete them, other previously invisible edges (on the right side) are suddenly visible. Some other previously visible edged were hidden.

Thorsten H's picture

I attached a video with the edges displayed one by one. After some time with every newly displayed edge some previously shown edges were hidden or previously hidden edges were shown again.

Attachments: 
Thorsten H's picture

My Draw Test Harness (DRAWEXE.EXE) shows the same behaviour.
Can anybody reproduce this?

---snip---
# Display a large number of lines

#Category: Visualization BUG "invisible lines"
#Title: Display a large number of lines

pload ALL

vinit View1 w=1024 h=1024
vsetdispmode View1 1
vtrihedron trihedron1
vsize trihedron1 400
vclear

#vtop
set scale 0.1
set vpprojx 0.0
set vpprojy 0.0
set vpprojz 1.0
set vpupx 0.0
set vpupy 1.0
set vpupz 0.0
set vpatx 4995
set vpaty 500
set vpatz 0
set vpeyex 4995
set vpeyey 500
set vpeyez 0.0001
vviewparams -scale $scale -eye $vpeyex $vpeyey $vpeyez -at $vpatx $vpaty $vpatz -up $vpupx $vpupy $vpupz -proj $vpprojx $vpprojy $vpprojz

set NB 1000

proc draw_lines {{distance 10.0}} {
# set colors to corner spheres
for {set i 0} {$i < $::NB} {incr i} {
set x [expr $i * $distance]
set ya 0.0
set yb 1000.0
set z 0.0
vertex v1 $x $ya $z
vertex v2 $x $yb $z
edge e$i v1 v2
vdisplay -update e$i
puts "$i: $x $ya $yb $z"
}
}

puts "Start test lines"
draw_lines 10.0
vfit
---snap---

Forum supervisor's picture

Dear Thorsten,
This is a known issue (ID = 25679), fixed after 6.8.0.
A workaround is to disable view frustum culling using V3d_View::SetFrustumCulling(Standard_False).

Best regards
FSR

Thorsten H's picture

Thank you very much! This solved the problem.

Thorsten H's picture

Now I am using OCCT 6.9.0 64 bit and set V3d_View::SetFrustumCulling(Standard_True). It looks like the new Version passes the "missing edges test".

But in my program I sporadically encountered missing edges again. Unfortunately I cannot reproduce this effect.

After "V3d_View::SetFrustumCulling(Standard_False)" all edges are always visible again.

Forum supervisor's picture

Dear Thorsten,
We have got no recent complaints regarding the frustum culling in OCCT 6.9.0. So, we would be interested to have a test case that breaks this algorithm.
Could you try to provide a reproducer (if possible) either in a form of a DRAW script or as a standalone application?
Thank you in advance!
FSR