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 to SVG #290

Closed
ghutchis opened this issue Jul 4, 2018 · 2 comments
Closed

Export to SVG #290

ghutchis opened this issue Jul 4, 2018 · 2 comments
Labels
enhancement feature changes / API changes help wanted rendering

Comments

@ghutchis
Copy link
Member

ghutchis commented Jul 4, 2018

Open Babel supports an SVG "ball and stick" rendering style, which works well for 2D depiction of molecules.

https://pqr.pitt.edu/static/data/svg/IE/IEDVJHCEMCRBQM-UHFFFAOYSA-N.svg
screen shot 2018-07-04 at 5 36 29 pm

For Avogadro, we can directly map to 2D using the camera.

One tricky thing would be working out z-depth mapping (i.e., write out the back atoms first) and scaling the radii of the atoms, but that shouldn't be too hard.

@serk12
Copy link
Collaborator

serk12 commented Apr 12, 2021

Hi I've done a first template here. But I'm missing something, how the glwidget does the culling. I think this is because the m_camera->width() and m_camera->height() returns the pixel size but not the projection position? For the moment this is with a magic number. Any idea?

@ghutchis
Copy link
Member Author

I know that @cryos did that part of the code, so I'm tagging him. I think for a first PR, I'd be okay without culling.

@ghutchis ghutchis added the enhancement feature changes / API changes label May 14, 2021
@ghutchis ghutchis closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature changes / API changes help wanted rendering
Projects
None yet
Development

No branches or pull requests

2 participants