Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export assembly drawing #110

Closed
Munken opened this issue Sep 10, 2019 · 10 comments
Closed

Export assembly drawing #110

Munken opened this issue Sep 10, 2019 · 10 comments
Labels
wishlist Good to have features

Comments

@Munken
Copy link

Munken commented Sep 10, 2019

Hi

Is it possible to export the generated assembly figures to png, pdf or svg?
Either from the generated html page or as a commandline option.

Regards

@qu1ck
Copy link
Member

qu1ck commented Sep 10, 2019

Are you looking for image with or without highlights of component groups? If with highlights, then separate images for all of them?
Have you looked at plotting in pcbnew, it can produce svg, or pdf of any layer or combination of layers. It's not exactly the same drawing as what this plugin generates but it might fit your needs.

@Munken
Copy link
Author

Munken commented Sep 11, 2019

I've tried pcbnew.
However, I'm missing a way to show the PTH without cluttering the drawing with traces.

Comparison:

InteractiveHtmlBom:
assembly

PCBnew:
kicad

@qu1ck
Copy link
Member

qu1ck commented Sep 11, 2019

I see, so you want copper items but not tracks/zones.

I can offer 2 workarounds:

  1. In pcbnew select all, then rightclick -> select... -> filter selection... and select only tracks and zones. Delete them. Plot to svg including appropriate layers. After plotting undo the deletion.
  2. In InteractiveHtmlBom switch to single layer view (F or B buttons) and make the drawing as large as possible by dragging the delimiter bar. Take a screenshot using OS utilities (Win+Shift+S works on windows 10, I think cmd+shift+4 on macos).

It is not trivial to add download functionality in ibom itself. Currently the board is rendered on 4 separate canvases, I would have to rerender them on one combined canvas and then somehow trigger a download or "save as" action. I will look into this further and see if it's possible on file:/// url.

@qu1ck
Copy link
Member

qu1ck commented Sep 11, 2019

This seems to work at least in chrome:
https://stackoverflow.com/a/30393357
I still have to test this in other browsers but it seems technically doable.
Not sure about UI for this...

@qu1ck qu1ck added the wishlist Good to have features label Sep 11, 2019
@Munken
Copy link
Author

Munken commented Sep 16, 2019

Thanks for the workarounds. I used option 2 for this.
However, rendering directly as svg or pdf would be nice.

How about right click -> save as? That would be sufficient UI for me.

@qu1ck
Copy link
Member

qu1ck commented Sep 16, 2019

Right click on image is already mapped to reset view.

@Munken
Copy link
Author

Munken commented Oct 23, 2019

How about just adding a button?

@qu1ck
Copy link
Member

qu1ck commented Oct 23, 2019

That's doable but I can only generate raster image (png, not svg or pdf).

@Munken
Copy link
Author

Munken commented Oct 23, 2019

As long as the resolution can be adjusted, then this is fine.

@qu1ck qu1ck closed this as completed in bcc1063 Nov 25, 2019
@qu1ck
Copy link
Member

qu1ck commented Nov 25, 2019

You can export images up to 16000x16000 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlist Good to have features
Projects
None yet
Development

No branches or pull requests

2 participants