This problem has been bugging me for days. We have built a pipeline converting an assembly from TopoDS to VTK polydata. Where we use the recursive method proposed by @Quaoar in the youtube video about assembly's to read the assembly before converting. Using XCAFDoc_ColorTool::GetColor() to get colors from the step-file, then we write the colors to a vtkColorTransferFunction lookUpTable - and further use this to set the colors to the vtkMapper based on IDs. For reasons I cannot understand, some sub-shapes get the wrong color. Is someone able to spot our error, or have an explanation for this?
Color bug:
Correct colors from FreeCad:
This is the function generating the colormap:
The input to createColorMap comes from this iterator going through all shapes:
DisplayShape:
Color bug:
Correct colors from FreeCad:
This is the function generating the colormap:
The input to createColorMap comes from this iterator going through all shapes:
DisplayShape:
Attachments
Last edited: