How to use dxf-parser - 1 common examples

To help you get started, we’ve selected a few dxf-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CIDARLAB / 3DuF / src / app / view / ui / importComponentDialog.js View on Github external
__loadDXFData(text) {
        let parser = new DXFParser();
        let dxfdata = parser.parseSync(text);
        let dxfobjects = [];
        for(let i in dxfdata.entities){
            let entity = dxfdata.entities[i];
            dxfobjects.push(new DXFObject(entity));
        }

        this.dxfData = dxfobjects;
        let render = DXFRenderer.renderDXFObjects(this.dxfData);
        this.__currentRenderSVG = render.exportSVG();
        let bounds = render.bounds;
        let zoom = this.__computeOptimalZoom(bounds.width, bounds.height);
        paper.view.zoom = zoom;
        paper.view.center = bounds.center;
    }

dxf-parser

Parse dxf files into a readable, logical js object.

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular dxf-parser functions