-
Notifications
You must be signed in to change notification settings - Fork 225
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
[feature] Export technical drawing to PDF, with frame, title block, BOM #32
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If anyone proficient in HTML/CSS wants to help me improve the output of the technical drawing, please check out the Main issues:
Here's a preview of the two demos, in A4 and A3 respectively: |
Ideally, this should be rendered as a PDF/E type of document, the engineering subset. I think it supports inserting blocks, and may even have title block classes but I am not sure. |
I also fiddled with pandoc a bit to see how the direct HTML conversion to PDF would look and it looks good enough for most purposes. Doesn't have the nice sign-off blocks, but it is easy.
I suspect that a very nice drawing is not a version 0.2.0 type of hold up. The ability to export the PDF satisfies most users' needs and is appropriate for a v0.2.0 release. I only bring this up b/c it seems like the feature appears to be a significant barrier to the next release. Edited to add: Changed the html image to the generated |
It is by no means a hold up, the only thing I'm waiting for is the multicolor wires. |
Great. Looking forward to next release! |
Update on the PDF/E thing/suggestion/note: The main reason to consider PDF/E, or additional features rather than direct HTML (granted, I haven't yet looked at the code) would be to use the different layers. Ideally, the wires, tables, BOM, and title block would all be on separate layers to allow for easier engineering management, if someone were to, for example, import the PDF into autocad, to generate a pegboard manually. I will try to look through the code soon, and the pdfkit documentation, to see if there is any easy way to specify layers for the images/bits. |
While this is a good idea in principle, I am unsure about the immediate usefulness. See my comment in #61, proper pegboard output would be a MASSIVE undertaking that I don't see happening anytime soon. I'd rather focus on getting something pragmatic and good looking in the short term. |
@formatc1702 This is awesome! I was about to hack together something similar and then found this issue -- I've merged your changes from https://github.com/formatc1702/WireViz/tree/feature/technical-drw into my own https://github.com/stevegt/WireViz/tree/drawing, which is otherwise current dev + #171. That should give anyone a starting point if they want to bring this feature into 0.3 or even sooner -- I'd start by applying the diff from stevegt@a48b5b9. The merge wasn't too ugly -- ignore the html deltas; the important deltas are in Harness.py, template.html, and wireviz.py. Example usage is in the new metadata section at the top of a couple of the example .yml files. The results are working for my use case so far. About the only thing I would change is the way the template.html is handled -- there's an older note in Harness.py about finding it from yaml or cmdline, and I also think we should continue the legacy hardcoding of a default html string to handle the case of no template file at all. |
If anyone needs a simplified title block, no BOM, US letter landscape, and only one revision row, here's a stripped-down version of template.html that does all that: https://gist.github.com/stevegt/cfd67d2df424e1b5a1ea4e0619b3f90e |
It would be pretty cool if you could specify git hashes to become changelog entries in the block as well as other pieces. I'm not sure git integration was on your roadmap, but here are some ideas. The nice thing about wireviz yaml is it's version able, and git is a great versioning tool. Here's a way:
proposed syntax:
|
No description provided.
The text was updated successfully, but these errors were encountered: