haplokuon / netDxf

.net dxf Reader-Writer
MIT License
993 stars 404 forks source link

Writting to DXF from a Unity mesh leaves small cracks in the model #240

Open marioslokas-v opened 3 years ago

marioslokas-v commented 3 years ago

Hello,

I have been successful in writing and exporting a DXF model from a Unity game object with multiple meshes, However, after putting the model in Autodesk's viewer I have noticed that every separate mesh has some very small yet visible "cracks" near the end of the mesh (se attached images) snip-1 snip-2

I wonder if there's something wrong in the way I iterate through the vertices/faces in Unity. All the submeshes have cracks the same way as seen in the attached images, either at the top end or the bottom end. The exported mesh is actually a long cylinder comprised of different parts.

marioslokas-v commented 3 years ago

Additionally, exporting two basic cubes makes them look like this: snip-3

marioslokas-v commented 3 years ago

I will answer my own question: any subdivision value of 1 or more will cause the models to appear like this. I would expect a subdivided square to end up looking for like a sphere though.