What is best for documentation when: SVG, DXF, DWG

I feel like we're talking about the benefits of SVG but I don't feel like i have a sharp grip on when SVG is the best solution for documentation. Clearly SVG is more powerful for graphical presentation, but I think DXF must be best for technical documentation - especially because it is so widely supported. Am I wrong?

Comments

  • You are able to display svg in any modern web browser where dxf require dedicated software.

  • I've seen @Moult presenting how SVG export from blenderbim works and how BIM data can be contained inside the SVG file. That is clearly a strength of SVG - I don't know if DXF can do this in any sensible way. This starts looking like DWF functionality (I like DWF)

  • edited August 2020

    DWG and DXF are really not good for delivering contractual or construction documentation, because they can have different representations depending on layer visibility, plot table, zoom level, etc.. - Unless you are specifically only transferring geometry: survey points, 3d models etc..
    This is why PDF is still used as a 1:1 analogue of paper drawings.

    SVG was devised as a web-friendly version of PDF, but for screens rather than paper, though we have this peculiarity that Inkscape uses SVG as the default working file format, so (for us) it isn't just a delivery format like PDF. I wouldn't try and draw a house plan in Inkscape, though it is a good tool for fixing up an existing drawing for presentation purposes.

    DXF is ridiculously easy to write, anyone can do it with a simple script. If you just want to transfer points, lines, faces, etc.. between tools, then this is always going to work. Though there is no concept of units, when you receive a DXF file you have to figure out if it is meters, millimetres, feet or inches (DWG has the same problem).
    DXF is the default file format for librecad (qcad), so if you want to draw a house plan using free software, then this is a valid way to go.

    elschilling
  • Who has a good example of construction documentation developed in the SVG format? @yorik what format were the wikilab drawings in? I have only found PDFs in the repository. @theoryshaw got a link to something in one of your projects you can share?
    https://github.com/uncreatednet/wikilab-ufabc

  • edited August 2020

    @stephen_l when it comes to Web-based solutions, we have four native technologies, and some sub ones:
    1. HTML
    2. CSS
    3. Javascript (and Typescript)
    4. WebAssembly (WASM)
    Then SVG, DOMs, and Canvas, ...
    I agree that SVG is better, IF it is part of a "hybrid" technology

  • @brunopostle said:
    Though there is no concept of units, when you receive a DXF file you have to figure out if it is meters, millimetres, feet or inches (DWG has the same problem).

    CAD files being unitless always seems crazy! The GIS solution is to include a sidecar .prj file with the units and the coordinate system of the geometry relative to the rest of the world. https://support.esri.com/en/technical-article/000007831

  • CAD files being unitless always seems crazy!

    A Martian probe took the brunt of it and crashed on landing...

    basweinduncanJesusbillengfernando
  • edited August 2020

    @theoryshaw got a link to something in one of your projects you can share?

    Not many examples yet, since most our our projects are from Revit, at this point.
    Here's a small one that @yorik did a number of years ago.
    Most likely this project, that we 'just' started will have documentation done in SVG from BlenderBIM or FreeCAD.... or both, if we can dial into IFC annotation translation! :)

  • Does anyone know more about precision of svg? From what read about the format it is not defined and therefore lies on each software that generates it. My worry is, that when I edit a file, I want the parts I don't touch to stay exactly the same as in the original. However when every software reinterprets my svg based on its internal precision, I can never again be sure I don't get imprecisions somewhere down the road.

    baswein
  • @theoryshaw said: Here's a small one that @yorik did a number of years ago.

    I think Layout_2 might be a good example. @yorik could you just give me a bit about the software workflow. Just enough of an explanation that I can write a text in the wiki for the software that's relevant and use the drawing as an example. I can see that it's been through FreeCAD and Inkscape. @Moult has also shown a nice example I should try and find again.
    @theoryshaw how public is the Randolph_St project? Is there a public forum/thread where you're discussing how to make things work?

  • edited August 2020

    Pros of DXF:
    - Is designed to capture the same data that DWG can capture. So if DWG is your native format, DXF ensures a minimum of data loss.
    - 3D! Whoo!
    - Easy to read, easy to write, and a variety of data types of play with (blocks, polylines, polyfaces...)
    - Layers with styles baked into it
    - Model space. Paper space. Multiple paper spaces.

    Cons of DXF:
    - No unit :(
    - Requires a DXF viewer.
    - Is an "open" standard, but at the same time it's kinda like Autodesk's less favourite cousin that has to follow DWG but lacks some of the whizbang proprietary add-ons that DWG has. So my understanding is that it has progressed relatively little.

    Pros of SVG:
    - Supported everywhere!
    - Easy to read, easy to write, and a variety of data types to play with (paths, primitives, groups, defs...)
    - Classes (kinda like layers, but more flexible, which is both good and bad) with styles at run-time (in my opinion, better than baked)
    - Can be turned interactive, with HTML, CSS, and Javascript (animation, hyperlinking, style combo changes, LOD zoom in/out, drag/drop - annoying tag obscuring your drawing? Just flick it away! Real-time updates from RSS or API - no more outdated drawings at site! Etc...)
    - Can add properties and metadata relating it back to model space. And not just classes, but serious metadata - you could actually, believe it or not, include IFC-XML inside SVG using their "metadata" element.

    Cons of SVG:
    - CAD programs don't typically treat it as a CAD format. Modification is usually done in artsy programs like Inkscape which aren't designed for drafting. (but hey, Blender is an artsy program too, yet here we are!)
    - Only one paper space. No absolute units. You can have embedded SVGs (which mean multiple SVGs), but everything has to be bound within a single document at the end of the day, there isn't the concept of "pages". (well, not natively, but we can hack it)
    - 2D only. Unless you include IFC-XML.

    ReD_CoDEtim
  • This is why we should think about a hybrid solution, and I'm sure Dion and other friends like Thomas and Stephen will think about
    Both SVG and PDF become popular:
    https://forums.buildingsmart.org/t/3d-registration-between-ifc-model-and-2d-drawing-pdf/1612/4?u=red_code
    even I think there's an ISO standard for CAD representation in PDF

  • edited August 2020

    I've created/edited some pages and added @Moult 's list of advantages & disadvantages
    https://wiki.osarch.org/index.php?title=Scalable_Vector_Graphics_(SVG)
    https://wiki.osarch.org/index.php?title=Drawing_Exchange_Format_(DXF)
    If you have additions to that list please consider making them on the wiki instead of here. Forums are great - but they're almost useless as reference documentation. (especially as we have no subject tags and no discipline about keeping subjects in one thread [insert emogi of Duncan pulling out his hair])
    @ReD_CoDE yes there are CAD aspects defined in PDF, Dion mentioned where in the ISO specs on the PDF editor discussion. Sadly they're not very well known, I guess Bluebeam uses them.
    eidt: so annoying that the URL parser in this forum doesn't like brackets! I will not be converting them manually, sorry.

    CGRmagicalcloud_75
  • edited June 2022

    Started a small discussion on twitter and was asked about precision as @JanF mentioned & SVG units which led me to this interesting article:
    https://www.sarasoueidan.com/blog/svg-coordinate-systems/

    There's were some comments in a n earlier thread about how to work in fixed units with for example Inkscape. I didn't understand a word of it as it seemed to be about how to write SVG file rather than how to use any specific software.

    Sooo, how do I start a 1:100 drawing on A3 in Inkscape - or is it better to draw 1:1 in a 'model' file and link into a different 'drawing' file ... etc ?

    If we had an example setup described on our wiki that would be superb.

  • edited June 2022

    @duncan said:
    Sooo, how do I start a 1:100 drawing on A3 in Inkscape - or is it better to draw 1:1 in a 'model' file and link into a different 'drawing' file ... etc ?

    Well I tried ti describe some of it in the blenderbim wiki:
    https://wiki.osarch.org/index.php?title=BlenderBIM_Add-on_exporting_2D_documentation#2D_Construction_Documentation
    (You have a 1:1 drawing with properties and plans that link scaled parts of this drawing and style it with css) I think the main problem right now is basically zero support for this anywhere and the lack of traditional 2d cad drawing aids in inkscape.
    Anyway in my opinion the best way would be to just use ifc, in theory you could basically create only 2d representations of elements and annotate them. Obviously the support for this is probably even worse than svg cad. Even though I think it should be possible with blenderbim, I have to try it when I find the time.

  • Hi @duncan ,
    in my workflow every 3D blender object is represented, scaled, in a dedicated svg file. Then every svg is linked (by the <use> tag) in an overall svg (this process is automated by the prj add-on).
    This way I can import every drawing in a new svg file and complete the board with dimensions and graphics...


    JanFengfernandoMoultbaswein
  • What do you guys usually do with your workflow if you are using BlenderBim and a Client suddenly asks for more than SVG - like a DWG that they can use?

  • In the past I've simply converted from SVG to DXF using Inkscape and pstoedit. But now that our drawing generation is more advanced I think this solution is no longer good enough, we need to build dedicated DXF support sooner or later. I'd say sooner.

    BedsonCGRtheoryshawbitacovirAceNigeltobenz
  • Hi Moult,

    I see, yes, exactly. Of course the best solution would be that the client could work with the blender files, but you don’t always want to hand away all your 3D work because of different reasons as you probably know, sometimes you just want to hand over the 2D , and that’s when this function could really be useful.

    Anyhow, I’ve gotten back here from a long paus and it’s so fascinating how far blenderbim has gotten. I’ve already made some professional work with it.

    All the best
    Christoffer

  • edited July 2023

    @CGR said:
    Hi Moult,

    I see, yes, exactly. Of course the best solution would be that the client could work with the blender files, but you don’t always want to hand away all your 3D work because of different reasons as you probably know, sometimes you just want to hand over the 2D , and that’s when this function could really be useful.

    I suppose it is very hard to move back to DWG when you are into a 3D + BIM + IFC workflow with open formats. It could help if you agree with your client about the deliverables before a job is done. Also, you always can consider to buy a proprietary license of a 3D software that can support 3D + IFC + DWG for these cases. Here, subscription licenses can have some sense. You just need it for some times. If your client ask for this kind of deliverable, you could consider it as an additional work and including the costs of subscriptions to a temporary use of licenses.

    CGR
  • @Gorgious's blender_ezdxf_exporter could be helpful here...
    https://github.com/Gorgious56/blender_ezdxf_exporter

    Darth_BlenderCGR
  • @Moult said:
    In the past I've simply converted from SVG to DXF using Inkscape and pstoedit. But now that our drawing generation is more advanced I think this solution is no longer good enough, we need to build dedicated DXF support sooner or later. I'd say sooner.

    I vote for sooner!

    carlopavBedsonAceCGR
  • edited July 2023

    In my experience svg > dxf exports from inkscape and using pstoedit are severely lacking in terms of layer settings preservation. dxf can also store a bunch of information like camera placement, block and attributes definition, drawing settings, etc. that I don't know how well it translates between svg and dxf. That's why I developed an (IMO) improved dxf exporter for Blender.

    Although I pretty much abandoned development when I found out about the prj addon, because (as far as I know) very few people actually use dxf or dwg as a means of exchanging 3D geometry data, so I was only interested in the 2D export after all. I have dived again into it lately because of a few limitations of the prj addon and I wanted to leverage the line art modifier but not gone too far.

    svg and dxf have a lot of similarities so I don't think it would be that hard to piggyback on the svg export to also export dxf. I have wanted to delve into it for a while, and have not had much time nor energy to do so unfortunately. But that's how the prj addon does it and the conversion file is under 200 loc. https://gitlab.com/marzof/prj/-/blob/main/cad.py

    AceCGRatomkarincaelschilling
  • I am aiming to store all my 2D drawing information in svg, export it to pdf for printing and to dxf for sharing with collaborators locked-in proprietary formats

    @Gorgious said:
    In my experience svg > dxf exports from inkscape and using pstoedit are severely lacking in terms of layer settings preservation.

    Tackling this here
    Just need 3 more reputation points to be able to launch a campaign

    I also want to be able to author 2D technical drawings with layers (or maybe collections?) directly into svg, the possibilities of linking IFC information and augment the visualization with css and js are amazing. So working in that direction I started a prototype that runs on the browser with a Blender like ui, thanks to Pablo bender-ui repo, and a command line interface.
    Here is it in action
    I plan to make it public as soon as it get releasable with basic features stable. Anyone else here would be interested in such kind of tool? Curious to hear your toughs about it!

    theoryshawNigelSavyGust27BedsonMassimocarlopavAce
  • Forget about the reputation points, I just earned a new badge after posting here and passed the threshold!

    theoryshawNigelJanF
Sign In or Register to comment.