DXF export of an object from Playcanvas

Hello - Does anyone know if it’s possible to export an object from a canvas as a DXF file?

We are programmatically creating an object with user input size, but would then like to output this as a 2D/3D DXF file

Hi @The_Hatchery and welcome,

It’s not possible to export 3D models from a PlayCanvas application on runtime, unless you are write an exporter.

You may be able to find a number of exportes for JS/WebGL applications online, most like it will involve either OBJ or GLB exporting.

From there you may be able to write your own exporter to DXF or use an online service (Autodesk may be providing one in their cloud services).

Thanks for the info! yeah i’ve seen three.js looks like it might have some options.

When you say online DXF exporters do you mean like this DXF Converter | CloudConvert and then hook into their api?

1 Like

Will has started work on a GLTF GLB exporter that will at least output meshes if that helps? https://github.com/playcanvas/engine/pull/3366

thanks will take a look

From that, you could convert from GLB to DXF (assuming the GLB exporter works as you intended it) using an external service, a service that you can host or some JS convertor like https://github.com/jscad/OpenJSCAD.org/tree/master/packages/io/dxf-serializer

1 Like