Table of Content

Linux
Years ago I did a [small utility][cad2svg] to convert [DWG][DWG] or [DXF][DXF] files into a vector-graphic, zoomable, [SVG][SVG] preview.
The Linux command-line utility was used in a larger drawing management application that I had built before I left that company for greener pastures.

The Linux server-based application would scan the vast (100,000s of [CAD drawings][CAD]) and, depending on their format, attempt to create thumbnails and extract textual information from them and populate a database so we could easily find related drawings through a simple web-interface.

CAD File The software would present thumbnails of the drawings; when the drawing was in DWG or DXF format, the thumbnail would be an SVG vector representation of the original drawing instead of an image. That made the preview much more useful as you could zoom in and still retain enough detail to ascertain if the drawings was actually what you were looking for.

Other file formats ([TIFF][TIFF], [HPGL][HPGL] plots, etc) were transformed into [PNG][PNG] image previews that were saved into 2 size: a small thumbnail, good enough to be displayed in a list, and a larger one that would show more details.

The server software was written in [Perl][Perl], with some of the converters in [C][C]. Every night, the server would go through the whole tree of drawings on the filesystem, looking for drawings it hadn’t seen before and it would pass them to the appropriate plug-in for extracting text -where possible- and create thumbnails.

Memories of fun projects…

### Download links:

* cad2svg: [http://etc.nkadesign.com/Download/Cad2svg][cad2svg]
* cad2text: [http://etc.nkadesign.com/Download/Cad2text][cad2text]

[^*]: Jorge from the University of Toronto [is using cad2svg][1] in a [WiFi positioning project][2].
Thanks Jorge!

[cad2text]: http://etc.nkadesign.com/Download/Cad2text
[cad2svg]: http://etc.nkadesign.com/Download/Cad2svg
[DWG]: http://en.wikipedia.org/wiki/.dwg
[DXF]: http://en.wikipedia.org/wiki/AutoCAD_DXF
[SVG]: http://en.wikipedia.org/wiki/Svg
[TIFF]: http://en.wikipedia.org/wiki/Tagged_Image_File_Format
[PNG]: http://en.wikipedia.org/wiki/Portable_Network_Graphics
[HPGL]: http://en.wikipedia.org/wiki/HPGL
[Perl]: http://www.perl.org/
[C]: http://en.wikipedia.org/wiki/C_(programming_language)
[CAD]: http://en.wikipedia.org/wiki/Computer-aided_design
[1]: http://scampus.blogspot.com/2008/07/indoor-positioning-is-one-step-closer.html
[2]: http://wiki.scyp.atrc.utoronto.ca/wiki/WiFiPositioning

Last modified: Sunday, 18 April 2021

Author

Comments

Sweet. I’m looking for some conversion utility for Linux. Can you share your application? Thanks!

@ADV: the links are in the article but I’ve just added them explicitly at the bottom as well.

That’s seems to be a great soft but it doesn’t open my dwg file. Does OpenDWG ToolKit and ViewKit v2.x from http://www.opendesign.com/ still free for non commercial use ? because I didn’t find any toolkit on the website.

Comments are closed.