Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I am trying to make a semi-CAD sort of program in Javascript, as I want it to be web-based, as I'm trying to make a replacement for Moraware's CounterGo for my dad.

I have found many libraries and examples for making SVG and vector editors in Javascript, but my issue is saving or converting said SVG files to DWGs, as I want to use them to more reliably calculate the area of a plan someone creates.

If the conversion isn't possible, is it possible to use real-world units for SVGs and vector drawings inside HTML5/Javascript?

Thanks in advance.
Posted

1 solution

You can not read/write files from within a web page using JavaScript! So even you write a converter from SVG to DWG (isn't DWG a proprietary format?) you can not save it (you may send it to some server to do so, but again you may send SVG and convert it on the server)...
However you can use real-word units (like mm) in SVG - read here: http://www.w3.org/TR/SVG2/coords.html[^]
 
Share this answer
 
Comments
HuggableAlien 3-Sep-14 6:02am    
Upon reading more about SVG-Edit I noticed it was in mm - but your answer is basically what I was looking for.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900