Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

GERBER to ONSHAPE feature

nir_naronnir_naron Member Posts: 26 EDU
I recently got into the world of PCB design. It’s going well, just had my first PCB made and it’s working great. I’m working on KiCAD, though that’s not really relevant to the issue I’m about to surface.

I want to develop a FeatureScript that bridges the worlds of PCB design and 3D Modeling. Such features already exist outside of OnShape, I myself defiled myself with FreeCAD just because there is an add-on available to import KiCAD projects to the software. From there I was able to export it as a STEP file and import it to OnShape, but it’s easy to see how that process is less than ideal. 

The usefulness of such feature is also up for discussion. I do believe having a 3D model of one’s board is cool at the very least and could even be useful. It would be a fun project, useful or not. 

My initial course of thinking was similar to the FreeCAD add-on, to accept a KiCAD as the input. I have since understood that a feature that can work with GERBER files instead would be much more useful to the community. 

GEREBER files are the industry standard for PCB manufacturering. What STLs are for 3D modeling, that is GERBERS for PCB design. Every PCB manufacturer accepts a ZIP file containing a GERBER file for every layer of the PCB (a layer could be anything from The copper traces inside the board to the text printed on top of it). 

The ideal way the users could interact with this feature would be for it to accept the ZIP file and output a complete board. I could not find a way for a Feature to pop up the good-old file select window, so I moved on to the next best thing - have the users open each GERBER file in notepad, copy all text, and paste it to the feature as a String-input. That also means the user would have to separate manually each layer (that’s not so bad, there could be a blue text box for each layer with the corresponding title). This approach has promise, though decrypting the GERBER files myself gave me a headache and is for sure too big of a challenge for me right now. 

My current approach is to have the user open a designated sketch for each layer, manually import the layer into the sketch as a *DXF FILE*, and specify in the inputs menu of my feature which sketch is which (among other things like PCB width, color, rescaling). Converting between GERBER and DXF is not complicated, and most PCB design softwares even have it as a native export option.

so that’s where I’m at, conceptually. Far from The ideal way this feature would work but still useful nevertheless. 

Any thoughts about my thoughts? The presses? Tips? Ideas?

How do I have the input be a sketch? Is a sketch a Query? If nothing else I could have the users hide all other sketches and select all that’s on screen for each input layer field. 

Is there a way for the users to input the imported DXF files to my FeatureScript without them already being in the Part Studio? I tried to find the code for OnShape’s “insert DXF” tool and didn’t manage. 
Tagged:

Comments

  • nick_papageorge_dayjobnick_papageorge_dayjob Member, csevp Posts: 843 PRO
    I'm not following the purpose of this. The PCB CAD packages already have STEP export, that can be used just fine in OS. Mechanical CAD users don't need layer by layer geometry. That slows down mechanical CAD system to a crawl.

  • nir_naronnir_naron Member Posts: 26 EDU
    nick_papageorge073 As far as I’m aware, there’s no easy way to export the PCB from KiCAD as a STEP file
  • nick_papageorge_dayjobnick_papageorge_dayjob Member, csevp Posts: 843 PRO
    edited May 20
    nir_naron said:
    nick_papageorge073 As far as I’m aware, there’s no easy way to export the PCB from KiCAD as a STEP file
    I've worked with EE's at various dayjobs for 20 years. All the commercial pcb packages we've used export as STEP. IDK is the one you are using for hobby and maybe lacking that feature?

    I just think you are wasting time thinking about something that already exists. Maybe look for another pcb software instead?

    Also for commercial use, onshape has PCB Studio, for a more direct link between the pcb cad software.
  • nir_naronnir_naron Member Posts: 26 EDU
    nick_papageorge073 Yeah KiCAD is definitely a hobbyists program. I trust you about this not being a useful feature, though I’m probably gonna give it a go anyways. I’m trying to get a better understanding of Featurescript and this sounds interesting. 

    What’s OnShape’s PCB Studio? Can’t find a mention of it online. 
  • robert_morrisrobert_morris OS Professional, Developers Posts: 169 PRO
    KiCad should be able to export a STEP file.
    I'm using version 6.0 on the Mac, and you can export a STEP file from the PCB editor (File->Export->STEP).

  • nir_naronnir_naron Member Posts: 26 EDU
    S1mon said:
    AWESOME Is it available to free-version users? Can’t find this option on my Part Studios
  • nir_naronnir_naron Member Posts: 26 EDU
    robert_morris thanks! I’ll check it out 
  • S1monS1mon Member Posts: 3,039 PRO
    PCB studio is only available on the paid Professional and Enterprise levels. 
Sign In or Register to comment.