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

Search the Forums
See All Topics
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
Forums
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 / Forums / Usage issues / CUSTOM DISPALY MODE

CUSTOM DISPALY MODE

CUSTOM DISPALY MODE
Saneesh Kumar 2011/11/03 05:53
how can we write custom displaymode.

i need a dispaly mode which is a mix of shaded mode and wireframe like we see in cad exchanger..

I need to see the flat lines also when we are showing shaded mode.

Can anybody help me

Thanks in advance
EricThompson 2011/11/07 15:43
The trick is to derive your own class from AIS_Shape, and override its Compute( const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode ) method.

Within your Compute method make the following two calls:

// Draw the wireframe
StdPrs_WFDeflectionShape::Add(aPresentation,Shape(),myDrawer);
// Draw the solid surfaces
StdPrs_ShadedShape::Add(aPresentation,Shape(),Attributes());
Timo 2012/07/25 12:56
Dear Forum supervisor,

wouldn't it be good to add this combination of wireframe and shaded mode as a separate display mode to AIS_Shape?
Then it wouldn't be necessary to derive an own subclass from AIS_Shape for this purpose. As this mode is available in many CAD applications today, many OCC-based applications would benefit from it.
In our application we simulated this mode until now by using shaded mode together with colored highlighting.

Regards,
Timo
Arjan Schouten 2012/07/25 15:00
+1     
Forum supervisor 2012/07/26 16:51
Hi Timo,

You are always welcome to improve Open CASCADE Technology and make a contribution via the Collaborative portal -
http://dev.opencascade.org/index.php?q=home/get_involved

Regards,
Forum Supervisor
Timo 2012/07/26 18:24
I added a feature request in the bug tracker:
http://tracker.dev.opencascade.org/view.php?id=23359

Unfortunately, I'm not very familiar with the internals of AIS_Shape. Maybe someone else did already the corresponding modifications and would be ready to contribute the code?

Regards,
Timo
Pawel 2012/09/26 19:21
The change introduced in branch 23407 does the job!
Very nice!

Pawel
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

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