Force use of PRESENTATION_STYLE_ASSIGNMENT

I am trying to read a step file by colouring some faces and saving the coloured file. However, I have noticed that very often the colours are handled with PRESENTATION_STYLE_BY_CONTEXT generating compatibility problems with some software (e.g. FreeCAD, Fusion - using CAD Assistant works). Trying to replace that with PRESENTATION_STYLE_ASSIGNMENT also causes other software to show the colours. Is there any way to force it to be used when writing the output file?

Dmitrii Pasukhin's picture

Hello. The logic was defined to use StepVisual_PresentationStyleByContext in case of component and StepVisual_PresentationStyleAssignment in other cases.

It means that you assigne color to component(part of assembly, but not for face.

There are no direct way to determinte the type. For sure you can modify source code, but there are no direct way, please check: OCCT/src/STEPConstruct/STEPConstruct_Styles.cxx at master · Open-Cascade-SAS/OCCT

It is interesting, why FreeCAD have problem... they using OCCT for reading STEP.

Best regards, Dmitrii