← All bug reports

FS#2659File > SVG Export: unit centimeter not accepted

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.32.2
Operating system
All
Reported
2025-04-10 by CVH
Closed
2025-04-10 by andrew
Votes
1

Andrew,

Related to this forum topic where an export by dwg2svg fails in various ways.

The document has drawing unit 'none', SVG options are (none=pixels, mm, cm, or in).
When trying to specify an alternative unit 'cm' a warning is displayed:

  • Warning: Drawing unit 'cm' is not supported by SVG. SVG unit is set to 'mm'.

Traced back to a typo in the SvgExporter.getSvgUnit function:

if (unit != RS.Centimenter && unit != RS.Millimeter && unit != RS.Inch && unit != RS.None) {...}

The correct Enum of supported units should be RS.Centimeter

Regards,
CVH