}
SALOMEDS::Color aColor = obj->GetColor();
- if ( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 )
+ if ( aColor.R >= 0 && aColor.G >= 0 && aColor.B >= 0 )
{
TCollection_AsciiString aCommand( "\n\t" );
aCommand += aName + ".SetColor(SALOMEDS.Color(" + aColor.R + "," + aColor.G + "," + aColor.B + "))";
bool isFound = _label.FindChild(COLOR_LABEL).FindAttribute(TDataStd_RealArray::GetID(), anArray);
SALOMEDS::Color aColor;
- aColor.R = isFound ? anArray->Value( 1 ) : 0.f;
- aColor.G = isFound ? anArray->Value( 2 ) : 0.f;
- aColor.B = isFound ? anArray->Value( 3 ) : 0.f;
+ aColor.R = isFound ? anArray->Value( 1 ) : -1;
+ aColor.G = isFound ? anArray->Value( 2 ) : -1;
+ aColor.B = isFound ? anArray->Value( 3 ) : -1;
return aColor;
}
if ( !aGeomObject->_is_nil() )
{
SALOMEDS::Color aSColor = aGeomObject->GetColor();
- bool hasColor = aSColor.R > 0 || aSColor.G > 0 || aSColor.B > 0;
+ bool hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0;
if( !hasColor && aGeomObject->GetType() == GEOM_GROUP ) // auto color for group
{
GEOM::GEOM_Gen_var aGeomGen = GeometryGUI::GetGeomGen();
Quantity_Color aQuanColor( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
AISShape->SetColor( aQuanColor );
AISShape->SetShadingColor( aQuanColor );
+ if ( myShape.ShapeType() == TopAbs_VERTEX ) {
+ Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect();
+ anAspect->SetColor( aQuanColor );
+ anAspect->SetScale( myScaleOfMarker );
+ anAspect->SetTypeOfMarker( myTypeOfMarker );
+ AISShape->Attributes()->SetPointAspect( anAspect );
+ }
}
}
}