Kicad StepUp: a new UPDATE


#2

Thanks for the update of this invaluable tool! I assume this is related to the recent changes/fixes made to the offsets etc. for the 3D models defined in the footprint dialog.

Not directly related to the update as it also occurred before that , but a note: When loading some of the official Kicad footprints (check out for instance the angled 2x3 pin socket) there is a message about only z-rotation allowed. When loading the footprint, the orientation differs from that seen in KiCad, and if aligned in StepUp the orientation and sometimes offsets are incorrect when loaded into KiCad. Of course this may be due to a bad footprint and not the fault of StepUp, but perhaps worth looking into.


#3

That’s probably because your footprints are outdated :slight_smile: when using stepup the footprint should ideally be placed on 000 with no rotation. Otherwise stepup will rotate the component to match the footprint…

Maui could you add a “reset footprint 3D settings” button when importing a footprint?


#4

:smiley:

yes :wink:

StepUp has two main functions:

  1. footprint aligner
  2. kicad_pcb to STEP converter

The first one will load the footprint library file (kicad_mod) and in case of wrong scale (not 1,1,1) or not allowed offset (not 0,0,0) or not allowed rotation (not 0,0,z) the tools will warn the user to reset those not allowed/suggested values…
NB the tools don’t change in any way the footprint library file nor the pcbnew board file… this has to be done manually by the user.

The second feature is the Kicad board to STEP converter… this feature will warn the user in case of wrong scale (not 1,1,1) but will manage all the other offset and rotation data… so if the user don’t update these footprint data inside the footprint and inside the board, the 3D model will result dis-aligned, compared to the alignment done in FreeCAD.

All the new library models are defined with the settings that StepUp is suggesting, but old ones may have different values.
StepUp board importer (STEP exporter) is taking in care of all offset and rotation values, to be able to manage whatever board is going to play with…
Moreover it is useful in some case to add inside the board some rotation or offset to the 3D models…
for example in case of a M3 spacer, you may want to have it on both side of the mounting hole… then your top spacer would have all values to standard values (0), but the one on the opposite side will have i.e. rot y angle = 180°, z offset = -1.6mm (board thickness)
Then you don’t need to have two different 3D models to manage mechanical assemblies


#5

If the format within kicad somehow has changed, will it update automatically as I open old designs?
Will I be able to run a script to update footprints / 3d libraries?


#6

Maui and Shack, thanks, although I believe the footprints were from a fairly recent download (and looked KLC compliant), you might be right that those were old footprints as there was no step model associated with them and the original wrl model had offsets and rotation defined. On top of that the STEP model I imported were from a manufacturer, so there is also a possibility for problems there, although geometric checks were fine. I do not notice any rotation defined in the footprint itself though, where would that show up? However when I examined the reason why the final result was a misalignment, OOPS it appears that I forgot to delete the old 3D model, just changed the link, thus the offsets etc. predefined for the old wrl model carried over causing the misalignment. :blush: So case seems solved, and notice to self is to always delete the old 3D model before linking the new one from StepUp.


#7

OOPS, not so fast, after realigning the 3D model in StepUp, deleting the old reference to the 3D model in the footprint and adding the new one, it is still misaligned and rotated. So there were two problems, first lack of nulling out the 3D settings in the footprint (last post), but second, a problem with the pin-socket footprint that makes StepUP rotate it to zero rotation, resulting in final misalignment of the 3D model. Screenshots and the footprint used as starting point are attached; other footprints in the same folder seems to have the same problem.

Socket_Strip_Angled_2x03_Pitch2.54mm.kicad_mod (6.9 KB)


#8

A few days ago there were made some new models and footprints :slight_smile: did you reimport the footprint in Freecad after changing settings?

@maui couldnt you add a button in the warning of the footprint settings which would reset the settings? :slight_smile:


#9

What footprint is this? It does not seem to be a pin header footprint. Also the footprint name (value field) seems strange to me. (angled is normally further back. and 3 and 2 are in the wrong order.) Is it possible that this fp is either very old or from your personal lib?

If you have footprints placed on a pcb they are not updated from the lib. At least not without user interaction.

We still add wrl files in the footprint properties. The file ending is then replaced by kicad stepup and lately also by the internal step exporter.


#10

But only in the v5 repo. I would not suggest anybody downloads that repo until we are finished with our data transfer.


#11

Hi,
the Socket_Strip_Angled_2x03_Pitch2.54mm.kicad_mod has offset x and y !=0 and z rotation angle = 270 deg

(model ${KISYS3DMOD}/Socket_Strips.3dshapes/Socket_Strip_Angled_2x03_Pitch2.54mm.wrl
(at (xyz -0.05 -0.1 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 270))
)

when opening this footprint in StepUp you will get a warning message:

this message is suggesting the user to fix the footprint and after the fix re-open it back in StepUp
Moreover the image @otoien uploaded shows offset and rotation to zero… then

  1. the user aligned the model to footprint BEFORE fix the footprint and used the WRONG aligned model against a fixed footprint
    or
  2. the user has fixed the footprint BUT NOT the kicad_pcb board file in which the WRONG footprint is embedded.

Both options require a user action that cannot be done by the StepUp tools… I would suggest to follow the suggested workflow and do the alignment only on revised footprint and boards…
Maurice


Kicad StepUp New exporter for 3D MCAD (feedbacks are welcome)
#12

A few days ago there were made some new models and footprints :slight_smile: did you reimport the footprint in Freecad after changing settings?

Yes, I re-imported the footprint and the Step model and aligned them again. The model I used can be found on Digikey’s pages by searching for SSW-103-02-G-D-RA (a Samtec part). However if these footprints have already been replaced, that should hopefully have fixed it. I still wonder if there is a way to detect if a footprint (not 3D model reference) does not have the zero rotation and zero offsets set, other than importing into StepUp.

[Btw, I also aligned the same 3D model to one of Walter Lain’s old footprints that I have used in the past, and there were no problems with that. So it points to a problem with the attached footprint, not the 3D model.]


#13

use a text editor :wink:


#14

You are right. I assumed all these have been fixed a long time a go by @Shack. Seems they will only be fixed in the new v5 repos. Sorry for adding to the confusion. (I should have checked the current master branch before writing my last post.)


#15

or run the klc check scripts found under https://github.com/KiCad/kicad-library-utils/tree/master/pcb


#16

Thanks MAUI and Rene for information on how to inspect the footprint. It looks like I will have to revisit and correct this once the v. 5 libraries have settled. I am very impressed with the work being put into improving the official KiCad libraries, particularly after seeing how much work it was to reorganize my own custom libraries with “molecular” parts.


#17

Only fixed Pin_Headers.pretty not Pin_Sockets.pretty :slight_smile: but sockets are fixed now


#18

Thanks Shack, I got my custom “molecular” 2x3 pin socket fixed and correctly aligned to the 3D model with STEPUP now.


#19

Reviewing what I was doing and some more experimenting, I realized what was going on (did not fully understand it in my replies above). The rotation angle mentioned applies to the 3D model and not the footprint orientation and is of course available in the tab for the 3D model. What was did not appear to me was that the rotation angle of the 3D model affects the way the footprint is oriented when imported into StepUp, as after I corrected the angle I only thought it would affect the angle in KiCad, thus I did not save after resetting the angle before importing into StepUp.

Although I understand why it doing this, quite frankly I am not sure StepUp is working optimally by changing orientation of the footprint at import based on this angle. It would be safer to always stay with the orientation of the footprint seen in KiCad so that the 3D model can be aligned to the actual footprint orientation, forcing one to always use angle 0, scale 1 and offset 1 for all axis in the KiCad 3D model setup. At least this is how I assumed it was working from when I started to use StepUp until this post. It is not a problem though now that I understand how it is working, I must just make sure that these values are reset before the footprint is imported into FreeCad with StepUp.

I had some fun getting my custom library updated with Step models in addition to the wrl models during my recent reorganisation. While the project below is is the very first project I did in KiCad as a learning experience - it is a signal generator I built on a development board/breadboard to learn how to use DSP functions of the dsPIC30 microcontroller and the components were basically just transferred from the breadboard to the PCB, so not a showpiece from a design perspective, I think the through hole components look very good in 3D and made it worth updating this project just for showing off. (And this is where I used the angled 3x2 pinsocket. :relaxed: Later projects use mostly SMD though).

The boards with the buttons and the rotary encoder were separate projects exported as STEP to FreeCad, and the aligned to a footprint as step and wrl models using StepUp. The SparkFun enclosure was also associated with a footprint. Here is the view in KiCad using the WRL models; the MCU is on the other side of the board under the display

Same project imported into FreeCad with Stepup based on the step models, here in orthographic projection (and edited to get transparency of the enclosure back).[ KiCad native export gives very similar result.]

A couple of views without the enclosure in FreeCad:

So, yes, I am making very good use of StepUp!


Feature Request: Add Opacity property for 3D models / enclosures
#20

Well back to the main topic. @maui your tool is invaluable to me as a lib maintainer. Thanks to you we can check footprints against datasheets a lot easier than without your tool.

But now the part where i ask for yet another feature.
Is support for rounded rectangle pads planned? (I could look into this after the v5 release.)


#21

the footprint parser in StepUp is based on a very old code … it doesn’t share the new semantic parser used for the board…
Anyway this is not the main issue… the difficulty is that a rounded pad needs to be build as edges with arcs and lines to be calculated from the round ratio found at the footprint description…
I would have a look at if you need this feature for the library during holidays