Sep 16, 2018

  • Zach Buckner
    Is it possible to initiate SVG or DXF exports directly from the main OpenJSCAD editor/viewer (or the browser’s JavaScript console) or would I need to create a custom application to import the serializer npm module?
    no plus ones
    no shares
    Shared publicly

    Jeff Gay
    Hi +Zach Buckner
    It seems to me that the command line interface might be a better choice. You can create the design via the website / desktop, and then convert to SVG / DXF via the CLI. Is this part of your workflow process?

    Zach Buckner
    Thank you, +Jeff Gay. I tried using the CLI to export to SVG and received an error (see stacktrace below) and figured that meant the CLI was misconfigured or broken. I just tried again, though, and successfully got a DXF export, which is encouraging!

    SVG export exception in case helpful:

    TypeError: cag._toCSGWall is not a function
        at /usr/local/lib/node_modules/@jscad/cli/node_modules/@jscad/csg/src/core/CAG.js:44:26
        at (native)
        at Object.union (/usr/local/lib/node_modules/@jscad/cli/node_modules/@jscad/csg/src/core/CAG.js:43:18)
        at mergeSolids2 (/usr/local/lib/node_modules/@jscad/cli/node_modules/@jscad/core/utils/mergeSolids.js:71:21)
        at prepareOutput (/usr/local/lib/node_modules/@jscad/cli/node_modules/@jscad/core/io/prepareOutput.js:20:14)
        at /usr/local/lib/node_modules/@jscad/cli/generateOutputData.js:116:28
        at process._tickCallback (internal/process/next_tick.js:103:7)
        at Module.runMain (module.js:606:11)
        at run (bootstrap_node.js:394:7)
        at startup (bootstrap_node.js:149:9)

Log in to reply