dxfjs / writer

A JavaScript dxf generator written in TypeScript.
https://dxf.vercel.app
MIT License
82 stars 17 forks source link

Support for Polyface Meshes #116

Closed jonathan-skymap closed 11 months ago

jonathan-skymap commented 1 year ago

Hi, fantastic library,

I was wondering if the library currently has support for creating polyface meshes? It should be a variation of the polyline entity, however the section about polyline seems to be empty in the documentation: https://dxf.vercel.app/guide/entities.html#polyline

I found the flag for PolyfaceMesh available and I tried to create it like this:

    writer.addPolyline3D(vertices, {
      flags: PolylineFlags.PolyfaceMesh,
      layerName,
    });

However, I think I would need to be able to set flags on each vertex, to define faces for example? Am I missing something or is this just not supported yet? If so, do you have any plans to add support for this?

Best regards

tarikjabiri commented 1 year ago

Hi

I am planing to implement this in the next version, and it will be a major update to the library.

Currently not supported.

jonathan-skymap commented 1 year ago

That's great news! I will be looking forward to the next version 😄

Sorry for the late reply, I got caught up with other things

tarikjabiri commented 11 months ago

Hi, I published an alpha version @tarikjabiri/dxf. It has support for polyface meshes and meshes.

See the examples folder: polyline.ts and mesh.ts.

Please repport any issue if found.

Regards.