Open Eneroth3 opened 4 years ago
Is this Windows or Mac?
I ran the two first export examples, and Adobe Acrobar indicates matching document heights...
How are you verifying the sizes?
Logged as: SU-46985
I am extremely confused. It works today. Not sure why it didn't the other day. Must have had the files locked or some other error. Closing this issue.
I'm not mad! I've been able to successfully reproduce this with the exact code above, but only in parallel projection.
It appears to also be an issue in SketchUp 2019, but with a slightly different behavior.
When running the script in 2019 I get this result when opening one of the resulting PDFs in Adobe Reader. Weird warning and icon not centered in the image.
When running the same code in 2020, I get this result. The icon is now centered as it should be.
In both 2020 and 2019, the image height value is completely ignored and all 4 PDFs get the same height (although this value differs between the two versions).
For now I can probably use a perspective with a tiny fov and get something that mimics a parallel projection well enough not to be noticed, but in the long run it'd be nice to have this fixed.
I'd expect the image height parameter to set the scale for the generated 2d view, regardless of it being a perspective or parallel projection. In addition to my little icon pipeline, this would be highly useful to output scale drawings.
It appears to be a separate set of parameters used in parallel projection. With no proper error messages it is hard to figure this out, especially with no access to the code and no ability to read when what parameters are actually referenced.
More code examples would be very useful, but ideally there should also be a Ruby warning (or possibly an exception but it could break old extensions) when passing image_height for a parallel projection view, length_in_model and length_in_drawing when in perspective etc.
Seconding Eneroth3's request. Fixing this would be useful.
It would enable e.g. a Sketchup extension for dependably turning Sketchup models into vector icons for use in Sketchup extensions - doogfooding at its finest.
In both SketchUp 2018 and 2019 this code snippet generates PDFs at various sizes. In SU 2020 they are all identical.
Have the keywords changed recently? I've also tried image_height, imageHeight and any other keyword I can think of but to no avail.