thesourcerer8 / altium2kicad

Altium to KiCad converter for PCB and schematics
https://www2.futureware.at/KiCad/
GNU General Public License v2.0
837 stars 153 forks source link

Broken .kicad_pcb created - Broken/Empty Zones added #83

Open FifoIronton opened 4 years ago

FifoIronton commented 4 years ago

I have been trying to convert this open source project to KiCad from Altium. When converting, it appears that the Schematics come out alright (each sheet has obvious errors, but nothing that can't be handled in a few hours), but the PCB is unable to be opened.
Kicad gives the following error:

Expecting "(" in input/source 'C:\Users\Owner\Downloads\hw-slave-18\Sources\slave-PcbDoc.kicad_pcb'
line 38953
offset 17

When running convertpcb.pl I see many errors that look like this:

Error: substring out of range: length:1524 pos:312812 wantedsize:8 field:Y19550 (main,/mnt/e/Software/altium2kicad/convertpcb.pl:2951 - main::msubstr)
Use of uninitialized value in unpack at /mnt/e/altium2kicad/convertpcb.pl line 2951.
Use of uninitialized value in division (/) at /mnt/e/altium2kicad/convertpcb.pl line 2951.

Broken zones in the resulting .kicad_pcb file look like this:

# Verts:                                                   
(zone  (layer ) (tstamp 547BA6E6) (hatch edge 0.508)       
    (connect_pads thru_hole_only (clearance 0.09144))      
    (fill (mode segment) (arc_segments 32) )               
    (polygon                                               
      (pts                                                 
      )                                                    
    )                                                      
  )                                                        

Manually removing these zones from the .kicad_pcb allows me to open the file, which appears to have some very strange zones and some broken silkscreen.

Outputs from each script: unpack.pl convertschema.pl convertpcb.pl

spiccinini commented 4 years ago

The problem seems to be related to the detection of the layers for the zones

rusefillc commented 3 years ago

is this related to https://github.com/thesourcerer8/altium2kicad/commit/b330c5086880e629593b4201aca85920395aafe4? is this related to #86?