Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Trying to get SVG of a sketch
mark_nahabedian
Member Posts: 31 ✭
I'm a novice user of OnShape.
I created this model in OnShape to illustrate and share an idea that I have for making rigid but temporary wooden joints
From the "side view" sketch of that model I exported a DXF file with the intent of generating an SVG file for some web documentation. DXF doesn't seem to me to be the most appropriate format for a planar drawing, but choices are limited.
For my documentation I'd like SVG.
I fed the exported DXF file to varioous web based conversion utilities.
https://convertio.co/dxf-svg/ produced an SVG file with only three lines (each a path element with one M and one L step) in it.
https://cloudconvert.com/dxf-to-svg produced an SVG file containing a single polyline element with only two points.
I write my own utility, all--be-it incomplete, for parsing DXF files and it only finds three lines in the ENTITIES section of the DXF file.
I believe the sketch itself has eight line segments and three more guide lines. Where are the rest of them?
Thanks.
Tagged:
0
Best Answer
-
tim_hess427 Member Posts: 648 ✭✭✭✭Your side view sketch only has three solid lines and two construction lines. The three solid lines all of which show up for me in inkscape. The construction lines don't seem to make it over. So, maybe try converting your construction lines to regular lines. Then they should export, and you can change the line style to whatever you like in another program.
You should look into creating a drawing in onshape from the model, then exporting the drawing. You can create views of the model (or an assembly) and you can right-click on a drawing view, then there's an option to make sketches visible as well.
Once you have a drawing, you can export the whole thing as SVG, DXF, PDF, and other formats as well.0
Answers
DXF is a 3d format that can still support 2d drawing by having every Z coordinate be zero, but given that a sketch is 2d, DXF is overkill.
I can understand OnShape not thinking it worth the effort to export sketches in SVG. What I don't understand is why so much of my sketch seems to be missing from the DXF file and why the file has so much irrelevant crap.
I'm very frustrated because it took me much longer to enter the model in OnShape (perhaps by a factor of 10) than to build the physical object out of wood. Now I find that I can't get the drawings I want from OnShape.
I would try inkscape. You should be able to open the DXF and export as SVG.
You should look into creating a drawing in onshape from the model, then exporting the drawing. You can create views of the model (or an assembly) and you can right-click on a drawing view, then there's an option to make sketches visible as well.
Once you have a drawing, you can export the whole thing as SVG, DXF, PDF, and other formats as well.
I spent so much time making the expolded view that I forgot how I described the part. I should have paid more attention to this history.
It was easy to make a four view drawing of my part with no borders or title block. That drawing could be directly exported as SVG. I'd like less whitespace, but I can edit the SVG directly to get the layout I want.
https://github.com/MarkNahabedian/crafts/blob/main/TrapezoidalLapJoint/README.md
If you want to reduce the whitespace, you can change the scale of the drawing views in onshape so that they're bigger compared to the size of the sheet. You can right click on a view and change it there directly, or you can change the scale for the entire sheet all at once.
https://cad.onshape.com/help/Content/drawing_view_properties.htm?tocpath=Drawings%7CDrawing%20Basics%7C_____3
Maybe you could help with one more thing? I created an exploded view and don't see a way to export it. I'd like to add the exploded view to my web page. If I were to just take a screenshot, the image woud be cluttered by the various OnShape controls.