kicad StepUp: ECAD MCAD bidirectional collaboration

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
antoniovazquezblanco
Posts: 48
Joined: Sun Apr 06, 2014 12:42 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by antoniovazquezblanco »

easyw-fc wrote: Tue Oct 23, 2018 4:28 pm I can load the fp you tested without any issue...
The problem is when I add a STEP model after opening the FP.
antoniovazquezblanco
Posts: 48
Joined: Sun Apr 06, 2014 12:42 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by antoniovazquezblanco »

I have just tested this with an older FC version:

Code: Select all

⇢ freecad
FreeCAD 0.17, Libs: 0.17R13543 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

A3 not available
ksuWB.Activated(v 7.8.1)
PoM not present
FC Version 017-13543
no Links support
kicad StepUp version 8.1.0.9
tolerance on vertex applied
applying Materials to Shapes
your home path is /home/anton
export to STEP False
Tabified done !
done!
KISYS3DMOD=/
module_3D_dir=//../
FC Version 017
VBO status False
FootPrint Loader /home/anton/Projects/KiCad/kicad-footprints/Button_Switch_SMD.pretty/SW_SPST_Panasonic_EVQPL_3PL_5PL_PT_A08.kicad_mod
SW_SPST_Panasonic_EVQPL_3PL_5PL_PT_A08_fp
import3DModel

ReadShapeCompoundMode status False
Running the Python command 'ksuToolsImport3DStep' failed:
Traceback (most recent call last):
  File "/home/anton/.FreeCAD/Mod/kicadStepUpMod/kicadStepUpCMD.py", line 359, in Activated
    kicadStepUptools.Import3DModelF()
  File "/home/anton/.FreeCAD/Mod/kicadStepUpMod/kicadStepUptools.py", line 14923, in Import3DModelF
    ImportGui.insert(name, doc.Name)

cannot read STEP file
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

antoniovazquezblanco wrote: Tue Oct 23, 2018 4:43 pm
easyw-fc wrote: Tue Oct 23, 2018 4:28 pm I can load the fp you tested without any issue...
The problem is when I add a STEP model after opening the FP.
No issue on my side ... which is the operation/button you are using to add the STEP file?
Can you open your STEP file without using StepUp?
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

antoniovazquezblanco wrote: Tue Oct 23, 2018 3:45 pm How can I improve the logging I have provided? Thanks!
I managed to replicate your 'issue'...
If you have downloaded a STEP file from github, you probably have downloaded not the raw file (the real step file) but its links to the GH page...
in this case you get an HTML page containing the STEP file and not the step file itself... then if you try to load in FreeCAD this 'html' step file you get your error log...
for example this:
https://github.com/KiCad/kicad-packages3D/blob/master/Button_Switch_THT.3dshapes/SW_Tactile_SPST_Angled_PTS645Vx31-2LFS.step
and this:
https://github.com/KiCad/kicad-packages3D/raw/master/Button_Switch_THT.3dshapes/SW_Tactile_SPST_Angled_PTS645Vx31-2LFS.step

Then the final error log message make sense:

Code: Select all

cannot read STEP file
because you are trying to import a step file parsing an HTML file.
antoniovazquezblanco
Posts: 48
Joined: Sun Apr 06, 2014 12:42 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by antoniovazquezblanco »

easyw-fc wrote: Tue Oct 23, 2018 9:25 pm
I managed to replicate your 'issue'...
If you have downloaded a STEP file from github, you probably have downloaded not the raw file (the real step file) but its links to the GH page...
in this case you get an HTML page containing the STEP file and not the step file itself... then if you try to load in FreeCAD this 'html' step file you get your error log...
for example this:
https://github.com/KiCad/kicad-packages3D/blob/master/Button_Switch_THT.3dshapes/SW_Tactile_SPST_Angled_PTS645Vx31-2LFS.step
and this:
https://github.com/KiCad/kicad-packages3D/raw/master/Button_Switch_THT.3dshapes/SW_Tactile_SPST_Angled_PTS645Vx31-2LFS.step

Then the final error log message make sense:

Code: Select all

cannot read STEP file
because you are trying to import a step file parsing an HTML file.
Good catch! I was not using a GH downloaded file but git was doing weird things with LFS files. My file was not generated using the LFS hook in that machine and I don't know why.

It works for me now. Thank you very much!!

BTW your WB is the one I find most useful. I collaborate with KiCad from time to time and I think it will help my workflow.

I have a feature that I would love to see in your WB. My usual workflow is to import a fp to make a step file sit on it. After that I want to export the step + wrl file. If KSU picked up the name of the FP when exporting I wouldn't have to rename it. I am just extremely lazy :roll:
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

antoniovazquezblanco wrote: Wed Oct 24, 2018 9:21 am I have a feature that I would love to see in your WB. My usual workflow is to import a fp to make a step file sit on it. After that I want to export the step + wrl file. If KSU picked up the name of the FP when exporting I wouldn't have to rename it. I am just extremely lazy :roll:
simply copy the FP Label to your STEP Label (removing '_fp') and then export it.
You may check if there are '-' characters inside the Label, because in FP importing those are remapped to '_'
antoniovazquezblanco
Posts: 48
Joined: Sun Apr 06, 2014 12:42 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by antoniovazquezblanco »

easyw-fc wrote: Wed Oct 24, 2018 10:06 am simply copy the FP Label to your STEP Label (removing '_fp') and then export it.
You may check if there are '-' characters inside the Label, because in FP importing those are remapped to '_'
I will do. Thank you!
Szymix13
Posts: 5
Joined: Mon Jan 07, 2019 10:41 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by Szymix13 »

Hi!
I am new here, started working with FC lately, those free mods are totaly awesome guys, thanks :)
Tried to copy project from Kicad using StepUp. When i pick file, the pop up message shows up:
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.kicad_mod
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.conf.kicad_pcb
What should i do?
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

Szymix13 wrote: Mon Jan 07, 2019 10:46 am Tried to copy project from Kicad using StepUp. When i pick file, the pop up message shows up:
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.kicad_mod
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.conf.kicad_pcb
What should i do?
Hi @Szymix13, what do you mean with 'Tried to copy project from Kicad using StepUp'?
And 'When i pick file, the pop up message shows up:' wich kind of file are you 'picking'?
and what do you mean with 'pick'? You mean 'Open' or 'Import' or whatever?
Szymix13
Posts: 5
Joined: Mon Jan 07, 2019 10:41 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by Szymix13 »

Image
easyw-fc wrote: Mon Jan 07, 2019 4:47 pm
Szymix13 wrote: Mon Jan 07, 2019 10:46 am Tried to copy project from Kicad using StepUp. When i pick file, the pop up message shows up:
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.kicad_mod
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.conf.kicad_pcb
What should i do?
Hi @Szymix13, what do you mean with 'Tried to copy project from Kicad using StepUp'?
And 'When i pick file, the pop up message shows up:' wich kind of file are you 'picking'?
and what do you mean with 'pick'? You mean 'Open' or 'Import' or whatever?
Ok, more detalis, sorry :)
I have added Kicad Stepup Workbench to my FreeCAD. I am trying to open a .kicad_pcb file, which is project created entirely in Kicad. After i hit open, first message i see is the one i quoted:
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.kicad_mod
... missing
/home/*****/.var/app/org.freecadweb.FreeCAD/config/FreeCAD/user.conf.kicad_pcb
I press ok, and i can see a board model, the main body, but nothing else, no detalis, no connector etc.

https://ibb.co/Mn8ZXGh

https://ibb.co/1TR3M1p
Post Reply