Closed mstigter0 closed 1 year ago
The same result on my side
Yes, I found the same thing. And the fix suggested works for me.
I'm not sure why Object.create()
is used here (and in a few other places) but it definitely looks wrong. I think what is happening is:
polyPoint
is initialised with a value of {}
(and a prototype that includes values for x
, y
and bulge
)polyPoint.y
is given a valuepolyPoint
(now inside an array) is returned later on, it has just a y
property.
Hi,
I've got an issue with parsing hatches with polyline points (only y values are returned).
I've found that removing the Object.create() and just setting polypoints to the object fixes my issue but i dont know if this creates other issues. I saw that this line was added in a commit that added the bulge to the polypoints (879808c). https://github.com/skymakerolof/dxf/blob/72302c5ca3e62721b805725aad105eb7f12b4d2e/src/handlers/entity/hatch.js#L30-L34
I cant see why Object.create(0 doesnt work so would appriciate it if this is looked at.