Kicad StepUp STEP to MCAD exporter: Latest version, Faster! support for Env_Var and Alias

@Shack
I updated the kicad StepUp tools
Now you can assign two searching path prefix in your .ini file
i.e.
[prefix3D] prefix3d_1 = c:\cad\3dpkg\ prefix3d_2 = c:\extra3d\ ;; put here your kisys3dmod path or 3d model prefix path or 3d alias ;; only two prefixs are allowed; must finish with slash or backslash ;prefix3d_1 = c:\program files\kicad\share\kicad\modules\packages3d\ ;prefix3d_1 = kicad/share/modules/packages3d/ ;prefix3d_2 = c:\extra_packages3d\ prefix3d_1 = c:\cad\3dpkg\ prefix3d_2 = c:\extra3d\
typically you can specify your path assigned to
KISYS3DMOD
or a to an ALIAS
:MY3DPATH:
in
prefix3d_1
and a second path assigned to an extra environment var (i.e.)
MYEXTRA3DMODELS
in
prefix3d_2

KIPRJMOD
(design folder) is resolved as before

hoping that would help and not will generate a confusion in retrieving 3D model probs

Maurice

2 Likes

Any chance of a test and warning that a model is duplicated across paths?
Even in a single path for that matter

it is a bit out of scope… not even KiCAD makes this kind of test for schematic libraries… it just takes the first found…
It is a quite delicate process to create a reliable library… but this process has to be made by users themselves or just one has to rely on pre build libraries
You can always make a script to recurse your 3D model paths and search for duplicates…

2 Likes

Adding a second path increases the chance of accidental duplicate names. I have had errors when I copy a project directory containing a local .pretty footprint library and find that I have modified the wrong copy as the path included both versions

so just stay simple as I suggested… don’t use the second prefix… it is on your choice
having a right library is like “building foundation” … you need good foundation to grow up well

Hi @maui
SRR6040A.STP (492.5 KB)

Sometimes (much to often) Freecad can not make a union

You can rotate and translate the individual parts but you cannot export them.

Maybe a save would be enough ?

example step file attached

Hi @nicholas
this is a problem related to the way the model is made… It is a mix of solid and shells

Anyway there are 3 different solution approaches:

  1. make a SOLID model starting from the one you have i.e. projecting the shapes and extrude them etc…
  2. make a fusion (Part Union) of the only SOLID parts of the model … for a best way to have a union when there are co-planar faces it simply easy to slightly move a solid (i.e. 0.01mm) to obtain a small overlap and then fuse
  3. simply use Part Make Compound and export this… it will be a compound of many objects, but it is loadable by the recent release of StepUp

Latest Enhancements: STEP multi-part allowed (creating compound)

The Compound solution is easier but will give you a more complex model, slower in loading and unnecessarily complex
This is why we have started a 3D MCAD library aligned to KiCad footprints here


Hoping that day by day the repo will cover most of models (ATM inductors are not implemented)

Maurice

I was able to export the step parts with freecad native export after a “translate z” of each individual part.

it worked in kicad to import.

seems i use version 4.0.2.6 of your tool.

this is fine for multi-parts objects

then you are using a multi-part (or a compound) of the model…
It easier to just make a compound and then align it to its footprint…
Anyway this is a simplier solution that is not the best when using a lot of parts… The resulting model will be bigger and unnecessarily complex…
Text engraving (as the one on top of the inductor) is producing a bigger model (in file size), so I would suggest not to use it in general…
Anyway I’m glad you solved your issue :smiley:
Maurice

1 Like

I was unable to remove the engraving as it was part of a part.
possibly i could have edited that sub-part with freecad to remove the text.
i did not want the text.

i have noticed that text is normally a problem when making a union of sub-parts.

I assume you downloaded the 3d model from somewhere. Did you check if the license of the model permits what you want to do? Especially redistribution. (You uploaded the model here. I think this technically counts as redistribution.)
With the exception of the text the model looks quite basic. You could easily create it yourself in freecad. Then you would solve all your problems at once.

probably from here
http://www.bourns.com/engineering/SRR6040A/SRR6040A.STP

it should not be a problem because the model is unchanged AFAICS and the link is public (I found it with G)…
Anyway the problems of the model are related to the pipes of the coil wires that are loaded as shells and not solid in MCAD…
Also DS shows errors in the Pipes

The model is in a nice and huge repo of Bourns
http://www.bourns.com/resources/design-tools/design-files
The strange is that normally Bourns gives SOLID models… But I see that this model is coming from
ZW3D STEP Interface translator and not from PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION as many others in this repo are…
But as @Rene_Poschl said the model is quite basic and can be done in MCAD quite easily just getting its bounding boxes…
It would be nice if we could have a script generated Inductor SMD family to fit the KiCad/Inductors_SMD.pretty
in our GitHub repo
:smiley:

3 Likes

how useful are generic inductors ?

if i use a bourns it shold look like a bourns.

am i missing something here ?

I learnt to like libraries organized with manufacturer and part-no as key
at first it may look like a lot of duplicate work, and it is, but saves you more time in having to look for a generic counterpart that match all parameters, the human error will make me fail for sure with that.

but i am very much open for comments about how that library is supposed to work with exact part-numbers
how will i find a good model in a generic library ?

1 Like

if you look at the KiCad/Inductors_SMD.pretty you will see that there are generic inductors (L-0201->L_1812) as well as specific Manufacturer’s PN (L_Vishay_IHSM-7382, L_Taiyo-Yuden_NR-30xx, etc) so I wouldn’t say so generic at all! :smiley: Most users would be satisfied with this list…
As @Andy_P already pointed out

For connectors and switches it is useful to have a specific Manufacturer 3D model, but for internal parts most of the time is just easier associate a model with the right dimensions (i.e. L_6.3x6.3_H3)
3D models are less strict than footprint models… in many cases just bounding box models are enough…

Moreover, if you need to share your 3D artwork and your are not using it only for internal use, you must leave manufacturers 3D libraries because of their restrictive license, and start to learn MCAD :wink:
And again, if you want to use the 3D models for the enclosure design, you have to be comfortable with a MCAD sw.

you always need to associate a specific 3D model to a footprint, so the error can arrive both if you associate a manufacturer original 3D model (that sometimes is wrong too) or a generic model with dimensions as per the specific Part…
I normally order a PN and check its real dimensions compared to the one in the DS or 3D CAD model before archive a footprint with its 3d model in my personal repo.

Anyway, I think that having a quite big 3D repo filled with most used 3D models is a must for letting users having a smooth approach to KiCad.
Maurice

2 Likes

Yes

I think a mix between generic and specific be a good compromise.

where do i find a 1206 capacitor 1.25mm high ?

i will search the library and see

https://github.com/KiCad/packages3D/blob/master/Capacitors_SMD.3dshapes/C_1206.step

this one should come in some variants of height
then it would be perfect

KiCad has mainly a basic 3D library … it is a sort of impossible to have all variants … at the same time it is possible to easily generate your 3D model using the scripts here

simply go into the Capacitors_SMD subfolder and edit cq_parameters.py adding the parameters for 1206_h125 model starting from 1206 data (you just need to change name and height) and launch the batch with the model name… then you will have your cap and perfection :wink:

1 Like

ok

will do

i find the height of the generics to be very high

/nicholas

Most SMD ceramic capacitors have a square cross section

were do you get your model?
the generic 1206 3D model is

    T = 0.78,  # package height

so less than 1.25 …

1 Like

hmmm, hehe

so i found it somewhere else

i will get them correct, one day…