return myElements.empty();
}
-bool CompareColors( const SALOMEDS::Color& theColor, const SALOMEDS::Color& theRefColor )
+bool CompareColors( const Quantity_Color& theColor, const Quantity_Color& theRefColor )
{
- if( fabs( theColor.R - theRefColor.R ) < 0.01 &&
- fabs( theColor.G - theRefColor.G ) < 0.01 &&
- fabs( theColor.B - theRefColor.B ) < 0.01 )
+ float aTolerance = 0.01;
+ if( fabs( theColor.Red() - theRefColor.Red() ) < aTolerance &&
+ fabs( theColor.Green() - theRefColor.Green() ) < aTolerance &&
+ fabs( theColor.Blue() - theRefColor.Blue() ) < aTolerance )
return true;
return false;
ColorMap aColorMap;
for (aGroupsIter = theGroups.begin(); aGroupsIter != theGroups.end(); aGroupsIter++)
{
- Quantity_Color aQColor = (*aGroupsIter)->GetColor();
- SALOMEDS::Color aColor;
- aColor.R = aQColor.Red();
- aColor.G = aQColor.Green();
- aColor.B = aQColor.Blue();
+ Quantity_Color aColor = (*aGroupsIter)->GetColor();
bool isFound = false;
for (ColorMap::iterator aColorIter = aColorMap.begin(); aColorIter != aColorMap.end(); aColorIter++)
{
- SALOMEDS::Color aRefColor = aColorIter->second;
+ Quantity_Color aRefColor = aColorIter->second;
if( CompareColors( aColor, aRefColor ) )
{
isFound = true;
ColorMap::const_iterator aColorIter = theColorMap.begin();
for (; aColorIter != theColorMap.end(); aColorIter++)
{
- Quantity_Color aGroupQColor = theGroup->GetColor();
- SALOMEDS::Color aGroupColor;
- aGroupColor.R = aGroupQColor.Red();
- aGroupColor.G = aGroupQColor.Green();
- aGroupColor.B = aGroupQColor.Blue();
-
- SALOMEDS::Color aColor = aColorIter->second;
- if( CompareColors( aGroupColor, aColor ) )
+ if( CompareColors( theGroup->GetColor(), aColorIter->second ) )
{
myGroupAttributVal = aColorIter->first;
break;
#include <boost/shared_ptr.hpp>
#include <set>
-#include "SALOMEconfig.h"
-#include CORBA_SERVER_HEADER(SALOMEDS)
-#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
-
-#define REST_NODES_FAMILY 1
+define REST_NODES_FAMILY 1
#define REST_EDGES_FAMILY -1
#define REST_FACES_FAMILY -2
#define REST_VOLUMES_FAMILY -3
typedef std::map<int,SMESHDS_SubMesh*> SMESHDS_SubMeshPtrMap;
typedef std::list<SMESHDS_GroupBase*> SMESHDS_GroupBasePtrList;
typedef std::set<const SMDS_MeshElement*> ElementsSet;
-typedef std::map<int,SALOMEDS::Color> ColorMap;
+typedef std::map<int,Quantity_Color> ColorMap;
class MESHDRIVERMED_EXPORT DriverMED_Family
{