jscad / io

DEPRECATED : Input Output handling for JSCAD (see the link below)
https://github.com/jscad/OpenJSCAD.org/tree/V2/packages
34 stars 13 forks source link

DXF : Issue converting lines #83

Closed z3dev closed 4 years ago

z3dev commented 5 years ago

There seems to be issues with converting LINE entities as some DXF formats do not supply all X, Y, and Z values for the points. This results in some very strange results for the generated code.

  let jscad1 = CSG.Line3D.fromPoints(47.5,4.3301,NaN,27.5,38.9711,NaN)
  let jscad2 = CSG.Line3D.fromPoints(20,43.3013,NaN,-20,43.3013,NaN)
  let jscad3 = CSG.Line3D.fromPoints(-27.5,38.9711,NaN,-47.5,4.3301,NaN)

Looks like the Z value should be treated as optional.

How to reproduce:

Sample DXF file attached.

z3dev commented 5 years ago

makerjs-heart.dxf.txt

z3dev commented 4 years ago

Done as part of V2.