Work In Progress: Native CADSTAR Importer

@Qbort Importing both designs works now with the latest nightly. I couldn’t find any errors for the routed tracks. However it seems the planes layers are not imported.


I don’t know if that is a bug or just because KiCAD doesn’t support it. Also some text information aren’t properly converted and the dimensioning is not completely correct.
KiCAD:

CadSTAR viewer:

KiCAD:


CadSTAR viewer:

Overall I’m very impressed with your work.

Ralf

They are imported the only annoying thing at the moment is the importer doesn’t automatically fill the zones after import. Just go to Edit -> Fill All (or press “B” on the keyboard)

You might want to “thumbs up” this request on gitlab: https://gitlab.com/kicad/code/kicad/-/issues/5301

Yes those are bugs. I haven’t been focusing too much on text and dimension but I’ll tackle those next. Did you notice any nets being incorrectly named or any tracks/pads wrongly shaped?

I think I’ve fixed all issues related to copper import but if you do find anything please let me know!

The best thing might be to export gerber files from KiCad and compare the gerbers against those generated in CADSTAR (which your contractor might have provided you with).

Hey thanks! :slight_smile:

1 Like

Hi,

I just installed Kicad and I am testing the Cadstar file import tool.
Once imported, I see that the orientation is not the same 90 ° in cadstar and 0.900 ° in Kicad.
Did I forget a setting ?

Please write your KiCAD version (Help->About->Copy KiCAd version) and let know if all the footprints have the error or only some of them, is it the only error that you see ?

Hi,

Except those which have a rotation of 0 °, all the import elements (pads, outlines, texts …) have this problem of rotation (example 2.7° instead of 270°).
My version of cadstar is v6

Application: KiCad

Version: (5.99.0-7063-gc89676e39d), release build

Libraries:
wxWidgets 3.0.5
libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0

Platform: Windows 10 (build 19042), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Nov 17 2020 22:01:37
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.73.0
OCE: 6.9.1
Curl: 7.71.0
ngspice: 32
Compiler: GCC 10.2.0 with C++ ABI 1014

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
KICAD_USE_OCE=ON
KICAD_SPICE=ON

Hi @Christian

That is definitely very strange. I see you are using version 6 of CADSTAR. I wonder if older versions of CADSTAR might specify angles in a different unit.

Would you be able to share the test board you made above?

Also, if you wouldn’t mind, could you create an issue in Gitlab about this? https://gitlab.com/kicad/code/kicad/-/issues

The list of bugs is getting a bit big to manage in my head.

Thanks

Roberto

I tested Kicad with this board
Essais.cpa (26.8 KB)

Thanks a lot for the file.

It confirms my suspicions. Earlier versions of CADSTAR used tenth degree (0.1°) as the unit for angles instead of thousandth degree (0.001°) in newer versions. What I won’t be able to know is in which version of CADSTAR this was switched around.

Could I ask that you create an issue in Gitlab for this? That way you’ll get notified when the fix is implemented (I’ll probably get time this weekend at some point to work on this).

Thanks!

For info, rotation to 1/1000 of a degree arrived with v7.
I will create a issu in GitLab for this.
Thanks

3 Likes

@Christian

While I am fixing the issue, would you mind generating a similar file but for a schematic? I’m trying to figure out what version of the cadstar schematic archive format used 1/10 degree. I think the format might be version 6 but not too sure since the PCB format is version 8.

@Qbort
I tried to do the same with the schema but i got an error.
Erreur import Eeschema
Here is the csa file.Essais Schema.csa (33.2 KB)

Thanks for testing @Christian! I’ll add that to the list of things to fix. If you could create a new issue in Gitlab with the above error message it would be good just to keep track of all the problems with the importer. I can create the issue also but it might be nice to know that you spotted it :slight_smile:

I didn’t even realize you could scale normal symbols (I thought you could only scale documentation symbols) but there you go. The above might take a little while to fix as I’d need to ensure all elements of the symbol are re-scaled properly

I created an issue in GitLab for this.
Thanks

2 Likes

Hi, First thanks so much for doing this! CadStar has been driving me nuts for years now and it seems finally there may be a way out. I have a six layer PCB and 12 or so page hierarchical schematic. The PCB imports successfully into Kicad but the schematic doesnt quite make it. All the wires appear in the schematic as do the hierarchical labels but there are no symbols. Does the importer only need the .csa and .cpa? Is there another file containing the symbols? My CadStar version is 15. I can send you my csa and cpa in a private communication if you want them as examples.
Again, thank you! I can imagine the challenges you’ve faced trying to import an undocumented file format. Really amazing.
Richard

@Richard_Hirsch One thing to make sure is that when exporting your files in CADSTAR that you export the parts library as well. I’m not sure if this is an option in CADSTAR 15 but here is a screenshot of the export dialog in CADSTAR 2018.0:


image

If the above still doesn’t work, please do send me your design as I’d like to fix this.

Thanks for your appreciation! There are still some challenges left to solve. I am working on fixing import of dimension objects and text variables (CADTAR fields) which should be complete in the next few days (MR 565).

After that, I’ll need to tackle the problem of CADSTAR’s “route offset” - an very strange operation that CADSTAR applies to the design before generating gerbers. Some details can be found in this GitLab issue: https://gitlab.com/kicad/code/kicad/-/issues/6648 I’m going to have to write a routine that offsets all tracks after import.

Hi Qbort, I made sure the Parts Library is being included and regenerated the csa. I’m receiving the error in loading schematic error "Unknown node ‘SIGLOC’ in ‘JPT’ " when importing. I’m new to the forum… could you let me know how to privately send you the CSA?
Thanks again!

1 Like

Hi Qbort, I’ve exported individual sheets in the schematic to try to narrow down the problem. It appears to be related to net labels, possibly where the label is located in relation to the net but I’m not sure of that. In the example below the “+12V” next to pin 3 of U28 seems to have been causing the SIGLOC/JPT error. I’ve exported each page and attempted importing each one. This narrowed the problem down to just two pages and reading the csa’s narrowed it down to the problem labels. I’ve fixed those labels by deleting them and then recreating them and can now import the entire schematic with symbols! Again, thanks! You are saving me from having to toil away in misery with CADStar for all eternity.
Richard

@Richard_Hirsch thanks for the information.

I’ve been able to reproduce the SIGLOC issue with one of my designs, so I’ll fix it in a few days. I didn’t realise that junction points could have signal labels until now. In the meantime, you could work around it by removing the signal label from the junction point before exporting. In your screenshot that is the label shown in the junction point between pins 3 and 6 (but there could be others in your design).

If you’d like send me the design, I can make sure there are no other issues that would prevent it being imported correctly. You should be able to click on my name and then press “message” to send me a private message.

@Richard_Hirsch just a ping to let you know the issue with SIGLOC/JPT is now fixed in nightly as of MR 565 . If you are on windows, please download the latest nightly version and try again (you will need version r19811 or later)

@rrascher I have made some major improvements to text and dimension objects with MR 565. Now the importer loads all CADSTAR fields as KiCad text variables and also handles correctly all the supported dimension types. The only dimension types not supported in KiCad are the angular dimension (which is not imported) and “external” linear dimensions, where two single sided arrows are drawn outside the measurand - these are imported as “internal” linear dimensions (one double sided arrow drawn inside the measurand).

If you’d be so kind to try again with your design, I’d be interested to know if you can spot any other graphical issues - hopefully the design will look very close to the original!

Thanks Qbort! I’ll give it a try.