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 / Manage selection and hilight of each node from shape's decomposition

Manage selection and hilight of each node from shape's decomposition

Manage selection and hilight of each node from shape's decomposition
Dmitry Kidyaev 2012/09/15 21:03
Is it possible to manage selection and hilight of shape's decomposited nodes (from parent shape) without create specific AIS objects?
I mean the folowing issue.
Here some code.
AISCtx()->InitDetected();
while (AISCtx()->MoreDetected())
{
const TopoDS_Shape &shp = AISCtx()->DetectedShape(); // posible to get decomposed topo object
// AISCtx()->DetectedInteractive(); - this returns hole shape (not decomposed object)
// here I want to hilight or not the node of decomposition (due to my rules).
AISCtx()->NextDetected();
}

Also I want to manage selection like detection how I described above.
Dmitry Kidyaev 2012/09/16 18:27
Ohhhhhhhhhhhhhhhhhhh.
Solved the hilight case.
Here is the sample.

AISCtx()->InitDetected();
while (AISCtx()->MoreDetected())
{
          Handle(AIS_InteractiveObject) aisobj = AISCtx()->DetectedInteractive();
          Handle(SelectMgr_EntityOwner) own = AISCtx()->DetectedOwner();
// deside to hilight or not
          own->Hilight(AISCtx()->MainPrsMgr());
          AISCtx()->RecomputePrsOnly(aisobj);
          const TopoDS_Shape &shp = AISCtx()->DetectedShape();
          _onDetectShape(shp);
          AISCtx()->NextDetected();
}
I do not sure that it the prober solution but it seems that it works.

 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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