kbwbe / A2plus

Another assembly workbench for FreeCAD, following and extending Hamish's Assembly 2 workbench
GNU Lesser General Public License v2.1
168 stars 69 forks source link

Issue importing step files wrt:colors #606

Open timiskander opened 1 year ago

timiskander commented 1 year ago

I was having a pretty consistent issue trying to import a step file (PCB model generated by Altium). The error was coming from TopoMapper.createTopoNames(). Specifically trying to access DiffuseColor (exception thrown saying object has no attibute "DiffuseColor". I ended up working around it by adding if hasattr(ob.ViewObject,"ShapeColor"): around the "manage colors of faces" block. a2p_import_color.patch I have very little insight into the inner workings of freecad, nevermind the a2plus code base, but the patch is here for your consideration. cheers and thanks for providing this tool! /Tim

luzpaz commented 9 months ago

@kbwbe can you review the patch ?

jhn98032 commented 3 months ago

The problem with that patch is that everything is gray when importing color step files. My fix #629 fixes the crash but without transforming the step file to gray.