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

Sending ACS parameters when requesting render to PNG and SVG #5362

Closed
AnnaKosol opened this issue Aug 27, 2024 · 1 comment · Fixed by #5549 · May be fixed by #5601
Closed

Sending ACS parameters when requesting render to PNG and SVG #5362

AnnaKosol opened this issue Aug 27, 2024 · 1 comment · Fixed by #5549 · May be fixed by #5601

Comments

@AnnaKosol
Copy link
Contributor

AnnaKosol commented Aug 27, 2024

Background
Related issue: #5152, epam/Indigo#2246 and epam/Indigo#2175

Solution
the following parameters should be sent when requesting render function (save as PNG, SVG):

render-coloring (send atomColoring)
render-font-size
render-font-size-unit
render-font-size-sub
render-font-size-sub-unit
image-resolution (int number, default 72 )
bond-length-unit
bond-length
render-bond-thickness
render-bond-thickness-unit

render-bond-spacing (default = 0.18 i.e. bondLength * 0.18)
render-stereo-bond-width
render-stereo-bond-width-unit
render-hash-spacing
render-hash-spacing-unit

Send the following parameters only if image-resolution = high
render-output-sheet-width (default value: Letter format width = 11 inches)
render-output-sheet-height (default value: Letter format height = 8.5 inches)

@AlexanderSavelyev AlexanderSavelyev changed the title Adding New Parameters When Requesting Layout Sending ACS parameters when requesting rendering to PNG and SVG Aug 27, 2024
@AlexanderSavelyev AlexanderSavelyev changed the title Sending ACS parameters when requesting rendering to PNG and SVG Sending ACS parameters when requesting render to PNG and SVG Aug 27, 2024
accmeboot pushed a commit that referenced this issue Sep 27, 2024
rrodionov91 pushed a commit that referenced this issue Oct 2, 2024
@rrodionov91 rrodionov91 linked a pull request Oct 3, 2024 that will close this issue
9 tasks
rrodionov91 added a commit that referenced this issue Oct 4, 2024
* #5351 - Changed the default size of arrows to be 1 bond length
* #5153 - Large unbalanced arrow fix
* #5362 - Updates remote & standalone structs to send appropriate parameters for certain requests
* #5584 - Update indigo to 1.25.0-rc.1 in browser module

---------

Co-authored-by: Mikhail Vialov <[email protected]>
Co-authored-by: Roman Rodionov <[email protected]>
Co-authored-by: Alexey Girin <[email protected]>
Co-authored-by: Zhirnoff <[email protected]>
@AnnaKosol
Copy link
Contributor Author

Verified

Image

for high resolution
{ "dearomatize-on-load": false, "smart-layout": true, "ignore-stereochemistry-errors": true, "mass-skip-error-on-pseudoatoms": false, "gross-formula-add-rsites": true, "gross-formula-add-isotopes": true, "ignore-no-chiral-flag": false, "aromatize-skip-superatoms": true, "render-label-mode": "terminal-hetero", "render-coloring": false, "render-font-size": 10, "render-font-size-unit": "pt", "render-font-size-sub": 10, "render-font-size-sub-unit": "pt", "image-resolution": 600, "bond-length-unit": "pt", "bond-length": 14.4, "render-bond-thickness": 0.6, "render-bond-thickness-unit": "pt", "render-bond-spacing": 0.18, "render-stereo-bond-width": 2, "render-stereo-bond-width-unit": "pt", "render-hash-spacing": 2.5, "render-hash-spacing-unit": "pt", "render-output-sheet-width": 11, "render-output-sheet-height": 8.5 }

for low resolution
{ "dearomatize-on-load": false, "smart-layout": true, "ignore-stereochemistry-errors": true, "mass-skip-error-on-pseudoatoms": false, "gross-formula-add-rsites": true, "gross-formula-add-isotopes": true, "ignore-no-chiral-flag": false, "aromatize-skip-superatoms": true, "render-label-mode": "terminal-hetero", "render-coloring": false, "render-font-size": 10, "render-font-size-unit": "pt", "render-font-size-sub": 10, "render-font-size-sub-unit": "pt", "image-resolution": 72, "bond-length-unit": "pt", "bond-length": 14.4, "render-bond-thickness": 0.6, "render-bond-thickness-unit": "pt", "render-bond-spacing": 0.18, "render-stereo-bond-width": 2, "render-stereo-bond-width-unit": "pt", "render-hash-spacing": 2.5, "render-hash-spacing-unit": "pt" }

Environment
https://rc.test.lifescience.opensource.epam.com/KetcherDemoSA/index.html
Ketcher Version 2.26.0-rc.1 Build at 2024-10-04; 18:45:04
Indigo Version 1.25.0-rc.1.0-g704673fcb-wasm32-wasm-clang-19.0.0
MacOs
Chrome 129.0.6668.71 (Official Build) (arm64)

Guch1g0v pushed a commit that referenced this issue Oct 17, 2024
* #5351 - Changed the default size of arrows to be 1 bond length
* #5153 - Large unbalanced arrow fix
* #5362 - Updates remote & standalone structs to send appropriate parameters for certain requests
* #5584 - Update indigo to 1.25.0-rc.1 in browser module

---------

Co-authored-by: Mikhail Vialov <[email protected]>
Co-authored-by: Roman Rodionov <[email protected]>
Co-authored-by: Alexey Girin <[email protected]>
Co-authored-by: Zhirnoff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment