Graphic3d_StructureManager::ReComputeStructures() method was corrected to consider all child (connected) structures.
Corrected remarks: added image dump in test case; corrected method name.
---Purpose: Suppress the highlighting on the structure <AStructure>.
---Category: Private methods
- ReComputeStructures (me: mutable);
+ RecomputeStructures (me: mutable);
-- Purpose: Recomputes all displayed structures. Used to recompute GL
-- resources after the last view has been closed without removing objects.
+ RecomputeStructures (me: mutable;
+ theStructures : MapOfStructure from Graphic3d)
+ is private;
+ ---Purpose: Recomputes all structures from theStructures.
+
--\f
fields
}
-void Graphic3d_StructureManager::ReComputeStructures()
+void Graphic3d_StructureManager::RecomputeStructures()
{
+ // Go through all unique structures including child (connected) ones and ensure that they are computed.
+ Graphic3d_MapOfStructure aStructNetwork;
+
for (Graphic3d_MapIteratorOfMapOfStructure anIter(MyDisplayedStructure); anIter.More(); anIter.Next())
{
Handle(Graphic3d_Structure) aStructure = anIter.Key();
+ anIter.Key()->Network (anIter.Key(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
+ }
+
+ RecomputeStructures (aStructNetwork);
+}
- aStructure->Clear();
- aStructure->Compute();
+void Graphic3d_StructureManager::RecomputeStructures (const Graphic3d_MapOfStructure& theStructures)
+{
+ for (Graphic3d_MapIteratorOfMapOfStructure anIter (theStructures); anIter.More(); anIter.Next())
+ {
+ Handle(Graphic3d_Structure) aStruct = anIter.Key();
+ aStruct->Clear();
+ aStruct->Compute();
}
}
if (MyGraphicDriver->IsDeviceLost())
{
- MyViewManager->ReComputeStructures();
+ MyViewManager->RecomputeStructures();
MyGraphicDriver->ResetDeviceLostFlag();
}
--- /dev/null
+puts "==========="
+puts "OCC24358"
+puts "==========="
+puts ""
+###########################################################################
+# 0024358: TKV3d - connected structures are not re-computed on device lost
+###########################################################################
+
+set Image1 $imagedir/${casename}_1.png
+set Image2 $imagedir/${casename}_2.png
+
+pload MODELING
+pload VISUALIZATION
+box b1 0 0 0 1 2 3
+box b2 3 0 0 3 2 1
+vinit View1
+vclear
+vaxo
+vsetdispmode 1
+vconnectsh b1c -3 0 0 1 0 0 0 0 1 b1 b2
+vfit
+
+vdump $Image1
+
+vclose View1 1
+vinit View1
+vdisplay b1c
+vfit
+
+vdump $Image2