Work in progress: Native Altium Importer

Merge Request !177 was merged.

Bugfixes:

  • Set correct linewidth for polygons
  • Apply correct text rotation
  • Use case insensitive parsing for things like .Designator

Improvements:

  • Add STEP model import
  • Support Hole offset
  • Support non-copper pads
  • Assign layer type in Board Settings
3 Likes

Hi Thomas,
I tried replacing the convert function with the one below so it would match the floating point version of the same function. It did improve the rounding, but didn’t fix it completely. The 0.15mm and 0.2mm tracks are ok now, but 0.3mm (and larger) tracks are reporting as 0.299999 etc. Looking at the output file, accuracy has improved, but it looks like multiple calculations can still introduce errors. Have you got an ideas how these might be caused?

static int32_t ConvertToKicadUnit( const int32_t aValue )
{
int64_t tmp_aValue,rnd_aValue;

    tmp_aValue = ((int64_t) aValue ) * 254L;
    rnd_aValue = (tmp_aValue < 0) ? (tmp_aValue - 50) : (tmp_aValue + 50);
    return ( (int32_t)(rnd_aValue/100) );
}

I added some bugfixes for the board importer. Now, the Altium Schematic importer is the next target:

If some of the main devs could explain to me how to handle libraries (currenty, KiCad thinks I have a legacy library attached) I would be glad.

4 Likes

Thank you for all your efforts in this task pointhi and the others helping. I, for one, am desperate to leave Protel. (To be honest it isn’t just Protel … its Windows in general … Protel is one of the programs I have and do use that keeps me needing Windows … ) I would LOVE to see an importer of the schematic library files, the pcb footprint library files and my various projects of more than 20 years.

Can I buy you a beer ?

1 Like

This is a quite long thread. Skipping the middle section and reading about the schematic import in a thread from 2019, it sounds like while the board layout import is working pretty well, the schematic import is still in the throws of development. Is that a fair summary?

I am working with a team that has used Altium for both schematic and board layout. Another thread suggested PCAD as an exchange medium. I didn’t realize until I read the last few posts here that schematics are not included as part of this discussion and are being handled separately. It is mostly the schematics I am interested in at this time.

Yes, schematic is currently in work, but development stalled right now. I hope to continue with with it soon.

I assume you are talking about Altium schematic import. What about PCAD schematic import? Is that available? The 2019 thread on this is not clear. Or maybe I should ask how import is done? I checked the menus and found project import for Eagle, but nothing else. I suppose there is a tutorial about this. I’ll dig around a bit with Google.

Likely P-CAD would be handled separately, even though Altium and P-CAD have some common history. I don’t know if anyone working on this has access to P-CAD for testing purposes.

1 Like

Thank you for the reminder. There was some work done by a few developers to implement this but it never progressed to the merge request stage. I’ve reached out to them to see if they are still interested in this feature.

No response to your queries?

I’ve contacted them and they are amenable to our updating the plugin to current KiCad. Hopefully this will be feasible for KiCad v6

Great. This is good.

I attempted to test this feature using the latest nightly but for some reason I do not see the list box that shows the file types in the bottom right corner. So, I cannot select a PCBDOC Altium file. I have attached a screenshot.

The version info is:

Application: Pcbnew

Version: (5.99.0-2621-g42b8aaa8f), release build

Libraries:
	wxWidgets 3.0.4
	libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1

Platform: macOS Mojave Version 10.14.6 (Build 18G5033), 64 bit, Little endian, wxMac

Build Info:
	Date: Aug  9 2020 04:32:51
	wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
	Boost: 1.73.0
	OCE: 6.9.1
	Curl: 7.54.0
	ngspice: 31
	Compiler: Clang 10.0.1 with C++ ABI 1002

Build settings:
	KICAD_SCRIPTING=ON
	KICAD_SCRIPTING_MODULES=ON
	KICAD_SCRIPTING_PYTHON3=OFF
	KICAD_SCRIPTING_WXPYTHON=ON
	KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
	KICAD_SCRIPTING_ACTION_MENU=ON
	BUILD_GITHUB_PLUGIN=ON
	KICAD_USE_OCE=ON
	KICAD_SPICE=ON

I am pretty sure that on OSX the filter selector to choose the Altium file types is visible if you click "options. "

1 Like

@imcinerney Thank you, that did the trick!

I attempted to load the Altium board here:

but it failed with a couple errors:

Vias6 stream was not parsed correctly

and

10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Arc on Altium layer 74 has no KiCad equivalent. Put it on Eco1_User instead
10:33:19: Pad ' ' of Footprint P5 uses a complex pad stack (kind 1), which is not supported yet
10:33:19: Pad ' ' of Footprint P5 uses a complex pad stack (kind 1), which is not supported yet

My altium convertor at [https://github.com/stevegrn/AtoK] extracts STEP models from PCBDOC files.

My altium convertor utility at [https://github.com/stevegrn/AtoK] converts this file ok

Thanks for mentioning that. I will have a look.

You’re welcome to get whatever you may out of it.