Controlling scaling and line widths #1206
Closed
sonicsmooth
started this conversation in
General
Replies: 1 comment
-
I was able to get the results I wanted by playing around with stuff I found here: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Cross posted to SO before I found this forum:
https://stackoverflow.com/questions/79209814/controlling-line-width-in-ezdxf-output-to-pdf
I'm trying to draw some basic circles and squares in ezdxf, then write to pdf.
Things look fine when I draw just a few units.
But when I draw many, the line gets thicker.
No amount of messing around with dfxattribs={'lineweight':0} does the trick.
I think ezdxf or the pdf converter is somehow scaling stuff.
It seems to fix the size of the PDF, then scale things down to fit, but the line width is stuck to some other scaling, and the net result is thick lines.
Here are some examples.
The output here looks fine. pdf is 6.5x4.8 [in]:
If I do 50 units across:
I think the lines are getting thicker but it looks fine. pdf is 16x2 [in]:
If I do 500 units across:
The lines are visibly thicker. pdf is 16x2 [in]:
If we go crazy with 5000 units across:
The lines are so thick it's just a block of white. pdf is 16x2 [in]:
So I think this has something to do with the pdf sheet size staying the same even with more and more blocks being placed. How do I get the some thickness lines for all versions of this test? Is it possible to scale the size of the PDF output manually, or set some better automatic parameters?
I saw some stuff in here about dealing with matplotlib configs, but since I'm new to this tool, I'm not sure if that's the standard way or the advanced way to deal with this stuff. Is matplotlib the main way to do pdf outputs?
Beta Was this translation helpful? Give feedback.
All reactions