diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index f3607e52f..cc399462c 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -1360,7 +1360,7 @@ void AddObjectColors (int theDocID, theScript += aCommand.ToCString(); } - SALOMEDS::Color aColor = obj->GetColor(); + GEOM_Object::Color aColor = obj->GetColor(); if ( aColor.R >= 0 && aColor.G >= 0 && aColor.B >= 0 ) { TCollection_AsciiString aCommand( "\n\t" ); diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx index cbbce1eeb..a7f48da56 100644 --- a/src/GEOM/GEOM_Object.cxx +++ b/src/GEOM/GEOM_Object.cxx @@ -328,7 +328,7 @@ char* GEOM_Object::GetName() * SetColor */ //============================================================================= -void GEOM_Object::SetColor(const SALOMEDS::Color& theColor) +void GEOM_Object::SetColor(const GEOM_Object::Color& theColor) { Handle(TDataStd_RealArray) anArray = new TDataStd_RealArray(); anArray->Init( 1, 3 ); @@ -346,12 +346,12 @@ void GEOM_Object::SetColor(const SALOMEDS::Color& theColor) * GetColor */ //============================================================================= -SALOMEDS::Color GEOM_Object::GetColor() +GEOM_Object::Color GEOM_Object::GetColor() { Handle(TDataStd_RealArray) anArray; bool isFound = _label.FindChild(COLOR_LABEL).FindAttribute(TDataStd_RealArray::GetID(), anArray); - SALOMEDS::Color aColor; + GEOM_Object::Color aColor; aColor.R = isFound ? anArray->Value( 1 ) : -1; aColor.G = isFound ? anArray->Value( 2 ) : -1; aColor.B = isFound ? anArray->Value( 3 ) : -1; @@ -364,7 +364,7 @@ SALOMEDS::Color GEOM_Object::GetColor() * SetAutoColor */ //============================================================================= -void GEOM_Object::SetAutoColor(CORBA::Boolean theAutoColor) +void GEOM_Object::SetAutoColor(bool theAutoColor) { TDataStd_Integer::Set(_label.FindChild(AUTO_COLOR_LABEL), (int)theAutoColor); } @@ -374,12 +374,12 @@ void GEOM_Object::SetAutoColor(CORBA::Boolean theAutoColor) * GetAutoColor */ //============================================================================= -CORBA::Boolean GEOM_Object::GetAutoColor() +bool GEOM_Object::GetAutoColor() { Handle(TDataStd_Integer) anAutoColor; if(!_label.FindChild(AUTO_COLOR_LABEL).FindAttribute(TDataStd_Integer::GetID(), anAutoColor)) return false; - return anAutoColor->Get(); + return bool(anAutoColor->Get()); } //============================================================================= diff --git a/src/GEOM/GEOM_Object.hxx b/src/GEOM/GEOM_Object.hxx index f0b8adc1d..b9fe2e28e 100644 --- a/src/GEOM/GEOM_Object.hxx +++ b/src/GEOM/GEOM_Object.hxx @@ -60,9 +60,6 @@ #include #endif -#include "SALOMEconfig.h" -#include CORBA_SERVER_HEADER(SALOMEDS) -#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) class Handle_TColStd_HSequenceOfTransient; class Standard_Transient; @@ -133,6 +130,16 @@ class Handle(GEOM_Object) : public Handle(MMgt_TShared) { class GEOM_Object : public MMgt_TShared { friend class GEOM_Engine; + + public: + struct Color { + //! Red component of the color + double R; + //! Green component of the color + double G; + //! Blue component of the color + double B; + }; public: inline void* operator new(size_t,void* anAddress) @@ -208,16 +215,16 @@ class GEOM_Object : public MMgt_TShared Standard_EXPORT char* GetName(); //Sets a color of this GEOM_Object - Standard_EXPORT void SetColor(const SALOMEDS::Color& theColor); + Standard_EXPORT void SetColor(const Color& theColor); //Returns a color of this GEOM_Object - Standard_EXPORT SALOMEDS::Color GetColor(); + Standard_EXPORT Color GetColor(); //Toggles an auto color mode on this GEOM_Object - Standard_EXPORT void SetAutoColor(CORBA::Boolean theAutoColor); + Standard_EXPORT void SetAutoColor(bool theAutoColor); //Returns a flag of auto color mode of this GEOM_Object - Standard_EXPORT CORBA::Boolean GetAutoColor(); + Standard_EXPORT bool GetAutoColor(); //Sets predefined point marker texture Standard_EXPORT void SetMarkerStd(const Aspect_TypeOfMarker theType, double theSize); @@ -302,6 +309,8 @@ class GEOM_Object : public MMgt_TShared TCollection_AsciiString _ior; TCollection_AsciiString _parameters; int _docID; + + }; #endif diff --git a/src/GEOM/Makefile.am b/src/GEOM/Makefile.am index 03a5db3c5..a915c6a82 100644 --- a/src/GEOM/Makefile.am +++ b/src/GEOM/Makefile.am @@ -54,7 +54,7 @@ salomeinclude_HEADERS = \ GEOM_SubShapeDriver.hxx \ GEOM_IOperations.hxx \ GEOM_ISubShape.hxx \ - GEOM_Solver.hxx \ + GEOM_Solver.hxx \ GEOM_PythonDump.hxx \ GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx \ GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx \ @@ -64,15 +64,12 @@ salomeinclude_HEADERS = \ # additional information to compile and link file libGEOMbasic_la_CPPFLAGS = \ - $(CORBA_CXXFLAGS) \ - $(CORBA_INCLUDES) \ $(CAS_CPPFLAGS) \ $(KERNEL_CXXFLAGS) \ $(BOOST_CPPFLAGS) \ -I$(top_builddir)/idl libGEOMbasic_la_LDFLAGS = \ - $(CORBA_LIBS) \ $(KERNEL_LDFLAGS) -lSALOMELocalTrace -lSALOMEBasics \ $(STDLIB) \ $(CAS_LDPATH) -lTKXSBase \ diff --git a/src/GEOM_I/GEOM_Object_i.cc b/src/GEOM_I/GEOM_Object_i.cc index 849f2cce1..1c9437e88 100644 --- a/src/GEOM_I/GEOM_Object_i.cc +++ b/src/GEOM_I/GEOM_Object_i.cc @@ -216,7 +216,11 @@ char* GEOM_Object_i::GetName() //============================================================================= void GEOM_Object_i::SetColor(const SALOMEDS::Color& theColor) { - _impl->SetColor(theColor); + ::GEOM_Object::Color aColor; + aColor.R = theColor.R; + aColor.G = theColor.G; + aColor.B = theColor.B; + _impl->SetColor(aColor); } @@ -227,7 +231,11 @@ void GEOM_Object_i::SetColor(const SALOMEDS::Color& theColor) //============================================================================= SALOMEDS::Color GEOM_Object_i::GetColor() { - return _impl->GetColor(); + SALOMEDS::Color aColor; + aColor.R = _impl->GetColor().R; + aColor.G = _impl->GetColor().G; + aColor.B = _impl->GetColor().B; + return aColor; }