Forum archiveIssue archiveVisualization and 3D Viewer

Archived discussion

AIS_InteractiveContext - selection mechanism - slow

Visualization and 3D ViewerFri, 08/30/2024 - 11:162 replies

Browse this forum
QuestionAuthor

Hello forum,
I generated a fully tetrahedral mesh of a simple model: see Fig. 1.
Now I would interactively select a certain number of elements,
using a box selection: see Fig. 2.
The mechanism is working perfectly: see Fig. 3 (here the selection
are wirefrane highlighted) and Fig. 4 (here the selected elements
are made hidden).

The relevant code is:

//! --------------------------------------------------
//! The global selection mode is "multiple selection"
//! a non zero selection area exists
//! --------------------------------------------------
if(abs(m_Xmin-m_Xmax)>ValZWMin && abs(m_Ymin-m_Ymax)>ValZWMin)
{
//! actually selects the shapes within the box
PS = occMeshContext->Select(m_Xmin, m_Ymin, m_Xmax, m_Ymax, occView, true);

//! emit selection changed
emit selectionChanged();
}

the box selection, according to the documentation, is performed by
the line AIS_InteractiveContext::Select(...).

In case of "several" elements (here about 3.3 x 10^5) the selection
mechanism is very slow: several tens of seconds for performing selection
and highlight.

How to make this faster?
Thanks for your help.

Author

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

Which interactive object is used for the mesh? Do you implement pickinghighlighting on your own, or using standard implantation from some basic AIS class?

02Author

Hello, thanks for your reply.
MeshVS_Mesh Is the interactive object.
The "box selection" is from AIS_InteractiveContext
Regards
Author