Exporting format for CNCs



  • Hello

    I have some polygons I want to export in a common format for CNC cutting (2D).

    Tried searching around, I know there DXF and STL export in jscad but could not find a straightforward library or way to export a polygon from JSCAD to a CNC format (like STEP).

    Are there any options to accomplish this using jscad functions or an external library?

    Thanks!



  • Researching cnc workings better, seems like the conversion process is more involved and that DXF is a suitable format for generating CNC g-code from. DXF export from jscad is very reliable so far. thanks all for the replies



  • @hrgdavor
    thanks!!. i'll check it out as see what options are there



  • @Ion-0 you could use https://github.com/donalffons/opencascade.js to generate step files.

    Opencascade is WASM build of OCCT, that is if 12MB, but could be custom built smaller if all you need is STEP export.

    There are some efforts to create a simpler wrappers around it but non yet available as those devs have just recently started playing with this.



  • @z3dev hello
    Thanks for the ansewe. I have poligons built, only targeting 2D shapes.

    What i am looking for is a library or way to export from javascript a cnc common file.

    I do understand that conversion from dxf or svg might be possible but I expect other issues as units or conversion issues and it could require an extra step.



  • @Ion-0 Welcome!

    There are several members making designs for CNC / Cutter machines, so hopefully they can add some suggestions.

    DXF is still very popular for exchanging CNC designs. And newer CNC machines can also convert SVG. Are you working in 2D or 3D?

    For the designs, you can create 2D polygons using a set of points.

    const myshape = polygon([point,…])


Log in to reply