Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forum / massive graphics bug | curve display differs in wireframe / shaded mode

Forum

massive graphics bug | curve display differs in wireframe / shaded mode
jelle2009/06/30 16:22
Today I wasted quite some time due to a particular trecherous bug.
A bunch of edges showed up entirely different in shaded mode than in wireframe mode.
It is correct in wireframe mode, and false in

The fact that one is looking at the wrong data is just a *HUGE* error.
Its a very uncomfortable idea that you might be doing the right thing but seeing another.

Correct ( wireframe ):
http://jelleferinga.com/files/wireframe.png
False ( shaded ):
http://jelleferinga.com/files/shaded.png

OCC, please look into this! I'm really surprised that this bug hasn't surfaced earlier...
Frankly I'm *really* dissapointed about this. The kind of bug that makes you consider giving up on OCC.

-jelle

Pawel2009/06/30 20:34
Hi jelle,

just an observation: I guess in the wireframe mode the 3D curves of the model are used and the shaded mode uses the surface in parametric space in order to generate triangulations. So I wonder how your model was created. Maybe there is an explanation for the discrepancy between the shaded and the wireframe modes...

Pawel
Andrey BETENEV2009/07/01 05:38
Hello Jelle,

In fact, your pictures do not look like different display of the same curves, but more resemble display of two different curves, perhaps built on the same points (e.g. with interpolation using different degree of BSpline).

I would suggest you to double check your data and possibly share your shape with others, so that other people could check this problem.
Trying to reproduce it in one of OCCT samples could be also good idea.

Andrey
jelle2009/07/01 11:40
Hi Andrey, Pavel,

The following snippet introduces the difference in rendering in wireframe/shaded mode:

======= difference between wireframe/shaded mode =======

if debug:
display.DisplayColoredShape(make_edge(hp.GetHandle()), "YELLOW")
display.DisplayColoredShape(make_edge(hp_offset.GetHandle()), "GREEN")

hp.SetWeight(2, weight_apex)
hp_offset.SetWeight(2, weight_apex)

======= difference between wireframe/shaded mode =======

======= NO difference between wireframe/shaded mode =======

hp.SetWeight(2, weight_apex)
hp_offset.SetWeight(2, weight_apex)

if debug:
display.DisplayColoredShape(make_edge(hp.GetHandle()), "YELLOW")
display.DisplayColoredShape(make_edge(hp_offset.GetHandle()), "GREEN")

======= NO difference between wireframe/shaded mode =======

Where hp/hp_offset is a Geom_Bezier of 3 poles.

So, it seems to me that wireframe mode does show the bezier's correctly after their weights were updated, where shaded mode does not.
This is pretty inconsistent, though not as dramatic as I thought, since I was altering the curves after sending the edges to the display ( 'duh ).
Nevertheless, it might be interesting for you to know that this does introduce an inconsistent display of the curves.

Cheers,

-jelle
 
 
Latest news
  • FAQ section updated
  • OPEN CASCADE Uses Intel ® Parallel Studio XE to Introduce Parallelism into SALOME SMESH Module
  • Open CASCADE Technology 6.5.2 is available for download!

  • © OPEN CASCADE 2000 - 2012  |  Search  |  Contacts   |  Site map