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

What are reasonable values for focal length? #9

Closed
svandenhaute opened this issue Jul 21, 2024 · 8 comments · Fixed by #10
Closed

What are reasonable values for focal length? #9

svandenhaute opened this issue Jul 21, 2024 · 8 comments · Fixed by #10
Assignees
Labels
bug Something isn't working

Comments

@svandenhaute
Copy link

I can't succeed in rendering .svg's with perspective. Any time I try to set the focal length to anything except None, he ends up creating an invalid SVG, or if it is valid, something which looks completely off. I've installed the latest cinemol master.
See below for an example SDF molecule

     RDKit          3D

  7  6  0  0  0  0  0  0  0  0999 V2000
    1.1219    1.1718   -0.7086 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.6238    0.1250   -0.5602 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.4183   -0.1429    0.4164 C   0  0  1  0  0  0  0  0  0  0  0  0
    0.9436   -0.7026   -1.2411 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.1615   -0.1105    1.4799 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.1255    0.7045    0.3051 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.9839   -1.0453    0.3085 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0
  2  3  1  0
  2  4  1  0
  3  5  1  1
  3  6  1  0
  3  7  1  0
M  END
@svandenhaute svandenhaute changed the title What are reasonable value for focal length? What are reasonable values for focal length? Jul 21, 2024
@davidmeijer
Copy link
Collaborator

Thank you for trying out CineMol! I'm out today but I'll look into your issue tomorrow.

@svandenhaute
Copy link
Author

Any updates ? :)

@davidmeijer
Copy link
Collaborator

Sorry for the communication silence! I had a look and it seems to be an implementation error. I'll need to release a new major version, but I won't be able to work on it now because I'm on holiday. I'll be back August 12 and roll out a new version.

@svandenhaute
Copy link
Author

Thanks, looking forward!

@svandenhaute
Copy link
Author

@davidmeijer any updates?

@davidmeijer
Copy link
Collaborator

Sorry, work caught up on me. I will be implementing changes on this branch, if you want to follow along. I will let you know when the branch gets merged.

@davidmeijer davidmeijer self-assigned this Jan 24, 2025
@davidmeijer davidmeijer added the bug Something isn't working label Jan 24, 2025
@davidmeijer davidmeijer linked a pull request Jan 24, 2025 that will close this issue
@davidmeijer
Copy link
Collaborator

Sorry this took so long @svandenhaute! I have created a draft reimplementation of the focal length.

Drawing without focal length:
cinemol mol.sdf mol_without_focal_length.svg -hs -r 100 -sc 4
Image

Drawing with focal length:
cinemol mol.sdf mol_without_with_focal_length.svg -hs -r 100 -sc 4 -fl 20.0
Image

Does this look right to you?

@davidmeijer
Copy link
Collaborator

Fix implemented in version 1.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants