Color of the Model

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to access the color of each face of body in Autodesk Fusion 360 . Following procedure I have tried
for (int faceLoopCnt = 0; faceLoopCnt < facesCount; faceLoopCnt++)
{
Ptr<BRepFace> faceCurr = bfaces->item(faceLoopCnt);
Face faceData;
Ptr<Appearance> appearance = faceCurr->appearance();
int appearanceCount =(int) appearance->appearanceProperties()->count();
string appearancePropertyName[100];
for (int i = 0; i < appearanceCount; i++)
{
appearancePropertyName[i] = appearance->appearanceProperties()->item(i)->name();
if(appearancePropertyName[i]=="Color")
{
short red1,green1,blue1;
Ptr<ColorProperty> colorProperty = appearance->appearanceProperties()->item(i);
red1= colorProperty->value()->red();
green1 = colorProperty->value()->green();
blue1 = colorProperty->value()->blue();
}
}
}
find attachments below,
Which color property to use,
It is not giving proper output. (In both cases, values are not correct).
But (205,46,46) RGB color is expected.