mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0025090: Visualization - drop Graphic3d_Group::MyIsEmpty flag
Small correction for issue CR25090
This commit is contained in:
parent
0e330c8cf5
commit
9cc773b5ad
@ -29,7 +29,6 @@
|
|||||||
#include <Graphic3d_CStructure.hxx>
|
#include <Graphic3d_CStructure.hxx>
|
||||||
#include <Graphic3d_Structure.pxx>
|
#include <Graphic3d_Structure.pxx>
|
||||||
|
|
||||||
#define MyIsEmpty myCBitFields.bool1
|
|
||||||
#define MyContainsFacet myCBitFields.bool2
|
#define MyContainsFacet myCBitFields.bool2
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
@ -52,8 +51,7 @@ Graphic3d_Group::Graphic3d_Group (const Handle(Graphic3d_Structure)& theStruct)
|
|||||||
|
|
||||||
myStructure = theStruct.operator->();
|
myStructure = theStruct.operator->();
|
||||||
|
|
||||||
MyContainsFacet = Standard_False,
|
MyContainsFacet = Standard_False,
|
||||||
MyIsEmpty = Standard_True;
|
|
||||||
|
|
||||||
ContextLine.IsDef = 0;
|
ContextLine.IsDef = 0;
|
||||||
ContextText.IsDef = 0;
|
ContextText.IsDef = 0;
|
||||||
@ -94,7 +92,6 @@ void Graphic3d_Group::Clear (Standard_Boolean theUpdateStructureMgr)
|
|||||||
myStructure->GroupsWithFacet (-1);
|
myStructure->GroupsWithFacet (-1);
|
||||||
MyContainsFacet = Standard_False;
|
MyContainsFacet = Standard_False;
|
||||||
}
|
}
|
||||||
MyIsEmpty = Standard_True;
|
|
||||||
|
|
||||||
// clear method could be used on Graphic3d_Structure destruction,
|
// clear method could be used on Graphic3d_Structure destruction,
|
||||||
// and its structure manager could be already destroyed, in that
|
// and its structure manager could be already destroyed, in that
|
||||||
@ -136,8 +133,6 @@ void Graphic3d_Group::Remove()
|
|||||||
Update();
|
Update();
|
||||||
|
|
||||||
myBounds.Clear();
|
myBounds.Clear();
|
||||||
|
|
||||||
MyIsEmpty = Standard_True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
@ -170,12 +165,8 @@ Standard_Boolean Graphic3d_Group::IsEmpty() const
|
|||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Standard_Boolean isEmpty = myStructure->IsInfinite() ? Standard_False : !myBounds.IsValid();
|
return !myStructure->IsInfinite()
|
||||||
if (isEmpty != MyIsEmpty)
|
&& !myBounds.IsValid();
|
||||||
{
|
|
||||||
::Message::DefaultMessenger()->Send ("Graphic3d_Group: MyIsEmpty != IsEmpty()", Message_Trace);
|
|
||||||
}
|
|
||||||
return isEmpty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
@ -1007,7 +998,6 @@ void Graphic3d_Group::AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray th
|
|||||||
MyContainsFacet = Standard_True;
|
MyContainsFacet = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
MyIsEmpty = Standard_False;
|
|
||||||
if (theToEvalMinMax)
|
if (theToEvalMinMax)
|
||||||
{
|
{
|
||||||
const Standard_Integer aNbVerts = theAttribs->NbElements;
|
const Standard_Integer aNbVerts = theAttribs->NbElements;
|
||||||
@ -1083,7 +1073,6 @@ void Graphic3d_Group::UserDraw (const Standard_Address /*theObject*/,
|
|||||||
MyContainsFacet = Standard_True;
|
MyContainsFacet = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
MyIsEmpty = Standard_False;
|
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1105,7 +1094,6 @@ void Graphic3d_Group::Text (const Standard_CString /*theText*/,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MyIsEmpty = Standard_False;
|
|
||||||
if (theToEvalMinMax)
|
if (theToEvalMinMax)
|
||||||
{
|
{
|
||||||
Standard_ShortReal x, y, z;
|
Standard_ShortReal x, y, z;
|
||||||
|
@ -47,7 +47,7 @@ regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time
|
|||||||
if { [regexp {Debug mode} [dversion]] } {
|
if { [regexp {Debug mode} [dversion]] } {
|
||||||
set check_time 25
|
set check_time 25
|
||||||
} else {
|
} else {
|
||||||
set check_time 10
|
set check_time 15
|
||||||
}
|
}
|
||||||
if { $tps_time > $check_time } {
|
if { $tps_time > $check_time } {
|
||||||
puts "Error: low performance"
|
puts "Error: low performance"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user