You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hard to pick between bug and feature request so I'll explain:
I use this library in a tool that imports DXFs from a variety of sources and converts to GeoJSON to display on a map. I need information from the raw helper.parsed.entities objects (including entity handle and layer) and other information from the output of helper.toPolylines().polylines (raw coordinates).
Generally these two arrays are synchronised, so I can loop over the entities array and use its index to get the corresponding polylines object.
But I just came across a DXF file which generates two arrays that have different numbers of elements, and hence are not aligned. There didn't seem to be any way access the information I needed without modifying the library.
In my case, it was easy to modify to include a handle property in each polyline to find the right object. But it's hacky.
There are probably lots of better options:
An option to include a polyline object on each parsed entity object
Make sure the two arrays always are aligned
Export the applyTransforms and entityToPolyline functions so one can simply generate the polyline for each entity as needed
Include the handle in the polyline object as above...
The text was updated successfully, but these errors were encountered:
Hard to pick between bug and feature request so I'll explain:
I use this library in a tool that imports DXFs from a variety of sources and converts to GeoJSON to display on a map. I need information from the raw
helper.parsed.entities
objects (including entity handle and layer) and other information from the output ofhelper.toPolylines().polylines
(raw coordinates).Generally these two arrays are synchronised, so I can loop over the entities array and use its index to get the corresponding polylines object.
But I just came across a DXF file which generates two arrays that have different numbers of elements, and hence are not aligned. There didn't seem to be any way access the information I needed without modifying the library.
In my case, it was easy to modify to include a
handle
property in each polyline to find the right object. But it's hacky.There are probably lots of better options:
polyline
object on each parsedentity
objectapplyTransforms
andentityToPolyline
functions so one can simply generate the polyline for each entity as neededThe text was updated successfully, but these errors were encountered: