Export STEP

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
leoheck
Veteran
Posts: 1225
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Export STEP

Post by leoheck »

Hello guys,

I am trying to export a step file of a PCB generated in Kicad and Imported back in Freecad using the KicadSetpUp workbench.

I would like to have a step file with the whole board as a single piece.

The step being exported right now it something modular. I would like to avoid that. Also, preserving colors would be a good thing to have too.

Do you know if this is achievable? If yes, how?
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: Export STEP

Post by fc_tofu »

leoheck wrote: Wed May 20, 2020 5:50 pm The step being exported right now it something modular.
What's meaning of "modular"?
Have your tried new STEP exporter in 0.19? (pref > im-exporter >step >legacy exporter, checked off.)
leoheck
Veteran
Posts: 1225
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Export STEP

Post by leoheck »

No, I didn't do that, thanks in advance.
fc_tofu wrote: Wed May 20, 2020 6:35 pm Have your tried new STEP exporter in 0.19? (pref > im-exporter >step >legacy exporter, checked off.)
By modular I mean, when importing back the .step file in the Freecad I want to see only one object and not a compound of objects.

Also, when using some external tools like GrabCad I would like to avoid explode this object. It should be shown as a single object.

Contrary to that, I would also like to create a project that imports other step files, being able to export a single file with all the objects separated. So during the visualization, it is possible to explode the items, also and show/hide parts to make the inspection easy.

Does it make sense?
User avatar
Roy_043
Veteran
Posts: 8550
Joined: Thu Dec 27, 2018 12:28 pm

Re: Export STEP

Post by Roy_043 »

Have you tried changing the 'Enable STEP Compound merge' setting? See here: Import_Export_Preferences.
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: Export STEP

Post by fc_tofu »

leoheck wrote: Wed May 20, 2020 7:21 pm By modular I mean, when importing back the .step file in the Freecad I want to see only one object and not a compound of objects.
You donnot like all objects been exported as a whole compound/block into STEP.
Then, you should check on: pref >im-exporter >step >legacy exporter.

Legacy STEP exporter creates separate objects into STEP.

The shortcoming is that legacy STEP exporter neglect Placement parameters of Part container object. Just now I replied in anther thread.
leoheck
Veteran
Posts: 1225
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Export STEP

Post by leoheck »

Guys, thank you some much for this info.

It is not intuitive for me to have to change settings in the program's preferenće menu. Why this is in the Preferences menu?

I was expecting some windows asking these settings after choosing the extension of the exported file. For instance, in GIMP, you chose the format to export, then it will ask anything about that kind of export.

For instance, I would like to be flexible if I am importing a compare merge or not, before the import process.
I also would like to be flexible to select these things when exporting something.

>> One thing that may be an issue with. I can't change the Product field in the Header.

Also, the "Enable STEP Compound merge" didn't work.

The original imported .step board looks like this
kicad_step.png
kicad_step.png (50.89 KiB) Viewed 3222 times
After exporting/importing the objects were replicated for some reason.
leoheck
Veteran
Posts: 1225
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Export STEP

Post by leoheck »

I got this testing this step export
It looks something pretty bad. Maybe one of the objects is not good to be exported. How do I debug this?

Code: Select all

created object
container changed from assembly1 to Part018
entering Part018
deleted Group. container chain: assembly1
C++ exception thrown (vector::_M_range_check: __n (which is 18446744073709551614) >= this->size() (which is 28))
C++ exception thrown (vector::_M_range_check: __n (which is 18446744073709551614) >= this->size() (which is 28))

I found the issue. I had one A2Plus imported objects with this (a2pLCS. container) I deleted and the export looks good.
I don't need these containers, I use A2Plus to import objects only. I don't know why it was using this container in the first place, maybe I made one mistake.

Code: Select all

deleted a2pLCS. container chain: assembly
deleted b_LCS_Collection_. container chain: assembly.Part008.Part010
deleted b_flower_leds_v0_2_001_. container chain: assembly.Part008.Part010
leoheck
Veteran
Posts: 1225
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Export STEP

Post by leoheck »

I am exporting better .step files now. Thanks, guys for the references you gave me.

However, my question is still open.
Maybe I made this thread a mess, sorry.

So, I have a board imported from Kicad with the KicadStepUp WB. It is just a model with many parts. This board will be used in another assembly.
I would like to export the assembly with the board and its enclosure.

I am using GrabCad to visualize the assembly.step exported from the Freecad

1. I want assembly.step modular, so the visualizer can hide/show parts and also, change its placement (explode it) too
2. I want to make the board behave like a single object when exported.

Right now, exploding the board or any step that contains it gives me this. (on GrabCad)
This does not make sense since the board should be treated as a single thing.


Screenshot-20200523205012-864x979.png
Screenshot-20200523205012-864x979.png (145.9 KiB) Viewed 3137 times

Is it possible to merge all objects into one single "solid" object?
How can I avoid that?
How can I make the board a single piece (keeping the colors as much as possible) when exporting the step file?
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Export STEP

Post by GeneFC »

leoheck wrote: Thu May 21, 2020 1:25 am
It is not intuitive for me to have to change settings in the program's preferenće menu. Why this is in the Preferences menu?
There is no data, of course, but I believe that most users will almost always use the same settings for Step export and import. That is why it makes sense to have a preference instead of nagging the user every time a Step operation occurs.

YMMV.

Gene
Post Reply