Open Wiredhome opened 1 week ago
Hi, I see a few errors/issues in the PCB module in FreeCAD v1, but overall the PCBs load.
My original post was poor - sorry about that. On that PC, I had installed FC 1.0.0RC2 over top of FC 0.21.2. I don't know if that contributed to what I saw - which was a rendered PCB, but no parts.
I moved to another PC, which I verified works fine with 0.21.2, and then installed FC 1.0.0RC2 into a separate path and tested it. Now I have results that match marmni.
FC 0.21.2
FC 1.0.0RC2
Here's the top lines followed by a break and then the bottom lines of the report view
`09:20:37 The file was created in Eagle 7.7.0.
09:20:37 Read database
09:20:44
Initializing
Generate board: done
Generate holes: Part::FeaturePython: Link(s) to object(s) 'PCB_Holes' go out of the allowed scope 'Board'. Instead, the linked object(s) reside within 'N/A'.
09:20:46 done
Importing parts: Package 'B12H1UYG-20D000134U1930' will be used for the element D1 (instead of 2-SMD_RA_LED).
09:20:46 Package 'B12H1USD-20D000234U1930' will be used for the element D3 (instead of 2-SMD_RA_LED).
09:20:46 Package 'B12H1UYG-20D000134U1930' will be used for the element D2 (instead of 2-SMD_RA_LED).
09:20:46 Package 'TP-Yellow' will be used for the element TP5 (instead of TP).
09:20:46 Package 'TP-Black' will be used for the element TP6 (instead of TP).
09:20:46 Package 'TP-Black' will be used for the element TP4 (instead of TP).
09:20:46 Package 'TP-Red' will be used for the element TP7 (instead of TP).
09:20:46 Package 'B12H1USD-20D000234U1930' will be used for the element D4 (instead of 2-SMD_RA_LED).
09:20:46 Package 'TP-Violet' will be used for the element MDC (instead of TP).
09:20:46 Package 'TP-White' will be used for the element MDIO (instead of TP).
09:20:46
C3 (C0402): pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:20:46 pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:20:46 pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:20:46 pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:20:46 pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:20:46 done
C37 (C0603): pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:22:16 pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:22:16 pyException: Traceback (most recent call last):
File "C:\Users\David\AppData\Roaming\FreeCAD\Mod\pcb.\PCBobjects.py", line 363, in onChanged
vp.setEditorMode("ShapeColor", 2)
<class 'AttributeError'>: Property container has no property 'ShapeColor'
09:22:16 done**
09:22:16 Object not found: b'R5' RES 10K0 1% [Package: R0603, Library: USBtoT1]
09:22:16 Object not found: b'TP2' TPTP06R [Package: TP06R, Library: USBtoT1]
09:22:16 Object not found: b'TP3' TPTP06R [Package: TP06R, Library: USBtoT1]
09:22:16 Object not found: b'T1' [Package: FIDUCIAL, Library: USBtoT1]
09:22:16 Object not found: b'T2' [Package: FIDUCIAL, Library: USBtoT1]
09:22:16 Object not found: b'T3' [Package: FIDUCIAL, Library: USBtoT1]
09:22:16 Object not found: b'R33' RES 200R 1% [Package: R0603, Library: USBtoT1]
09:22:16 **
09:22:16
Importing layer 'Annotations':
done
Importing layer 'Top':
done
// and from here on it is fine
`
As a simple test, I simply commented out PCBobjects.py", line 363, and then PCBobjects.py", line 464 and tested again with each FC version. I'm assuming that both FC version use the same FreeCAD-PCB version in the AppData folder.
After commenting those two lines, restarting each version of FC, the presentation appears identical to me. Meaning - I saw no change that could obviously trace to the vp.setEditorMode("ShapeColor", 2) statements.
I tried to hunt down the 'setEditorMode' API to see what is allowed and what isn't, but I guess this goes deep into FC itself. I tried searching the FC documentation and the wiki, but came up empty - is there a site where I can learn enough to maybe try to understand what is happening? Then maybe I could attempt to help with a change request.
thanks!
I just came across a report of what looks like this same issue: https://forum.freecad.org/viewtopic.php?style=3&t=86778
Hi, ShapeColor/DiffuseColor is not supported in FC_v1. From this version FC uses Material() - that's why there are so many errors (most of them). Previously, to set the surface color, it was necessary to create a tuple with R/G/B values and save it in ViewObject.DiffuseColor. Since FC_1, it is necessary to create a Material object (one material per surface or one for the entire object) -> ViewObject.ShapeAppearance parameter.
vp.setEditorMode("ShapeColor", 2) -this simply hides the parameter/attribute in the 3D window (value 2). In FC_v1 it will be vp.setEditorMode("ShapeAppearance", 2).
Many changes will be necessary to make the module fully functional. However, there is light at the end of the tunnel ;)
That's a very positive looking note!
I don't have an idea of how much changed in this new release candidate, so I don't have an idea of how much it takes to get FreeCAD working in it.
When I loaded an Eagle .BRD file, this is the last lines of the report view:
Any chance this is easily resolvable?