dxfjs / writer

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

Fill Rectangle Entity #125

Closed dunialmasmari closed 1 year ago

dunialmasmari commented 1 year ago

Hello

I am having an issue filling up entity (Rectangle entity ) how can I implement that considering that I am having an canvas and then I transfer it into .dxf so it can be downloaded

the downloaded file is full of pixels when zooming in (of course because the rectangles are not filled )

can you help me doing that? ASAP

Thank you in advance

tarikjabiri commented 1 year ago

Hi,

A little background, in the dxf specification there is no entity called rectangle its only a LWPOLYLINE entity. And you can't use a fill on entities directly, in cad softwares they attach an entity called HATCH, so you should a hatch along side with it specifically a solid hatch.

HATCH docs.

Hope this helps you, regards.