tarikjabiri / js-dxf

JavaScript DXF writer
MIT License
180 stars 76 forks source link

Dotted layer style for circle not working in QCAD #9

Closed kriffe closed 5 years ago

kriffe commented 5 years ago

In demo.dxf in examples the circle wont show in open dxf sorftware QCAD for dotter style. Works when arg changed from 'DOTTED' to 'CONTINUOUS' in layer arg

image

var Drawing = require('Drawing');
        window.onload = function()
        {
            d = new Drawing();

            d.drawText(10, 0, 10, 0, 'Hello World'); // draw text in the default layer named "0"
            d.addLayer('l_green', Drawing.ACI.GREEN, 'CONTINUOUS');
            d.setActiveLayer('l_green');
            d.drawText(20, -70, 10, 0, 'go green!');

            //or fluent
            d.addLayer('l_yellow', Drawing.ACI.YELLOW, 'DOTTED')
            .setActiveLayer('l_yellow')
            .drawCircle(50, -30, 25);

            var b = new Blob([d.toDxfString()], {type: 'application/dxf'});
            document.getElementById('dxf').href = URL.createObjectURL(b);
        }
ognjen-petrovic commented 5 years ago

Hi,

Have you found reason why this happens?

kriffe commented 5 years ago

It seems like it produces 2 dots on the entire circle in QCAD. Perhaps it a size property problem (or lack of size property)?

The dxf version exported here is kind of old also, so it could be just a bug in QCAD. Perhaps changing from DOTTED to DASHED in the demo will make the demo file work on most systems at least?

image

ognjen-petrovic commented 5 years ago

Hi,

Thanks. If you have already changed demo feel free to make a pull request.

Regards, Ognjen

kriffe commented 5 years ago

Pull Request created