Fri, 08/30/2024 - 11:16
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.
Giovanni
Fri, 08/30/2024 - 15:18
Which interactive object is used for the mesh? Do you implement pickinghighlighting on your own, or using standard implantation from some basic AIS class?
Fri, 08/30/2024 - 16:00
Hello, thanks for your reply.
MeshVS_Mesh Is the interactive object.
The "box selection" is from AIS_InteractiveContext
Regards
Giovanni