Bug importing from Fusion 360: LaserBox software ignores group code 42 (Bulge) in LWPOLYLINEs


#1

When importing a DXF created with the latest version of Fusion 360 into the LaserBox software, round arcs do no import correctly. There are no export options in Fusion 360, nor import options in LaserBox which allow one to configure how either software responds to arcs.

Please advise how to resolve this issue.

This is what the DXF file looks like when I reimport it into Fusion360 (note the rounded corners):

This is what I see when I import it into the LaserBox software (note the arcs have all been converted to lines):


#2

Update: Here is some more info to help in diagnosing the problem.

Just the outline of the part by itself imports incorrectly. In this case the DXF file contains a LWPOLYLINE primitive. This is what it looks like in LaserBox:

However if I delete one of the lines that make up the outline and reexport from Fusion360 the DXF file now contains LINE and ARC primitives. These import correctly into LaserBox:

So it seems that the laserbox software has an issue when some of the parts of an LWPOLYLINE are arcs.


#3

I’ve done some more digging. The LWPOLYLINE that is created by F360 in the broken case above contains the 42 (Bulge) group code to specify the ARCs.

I’m going to hypothesize that the problem is that the LaserBox software ignores the 42 (Bulge) group code in LWPOLYLINE primitives.
DXF reference

It’s highly important that this is rectified since current versions of F360 export DXF which make use of this feature. Please fix this bug.

Thanks!


#4

I managed to make a quick Python program to convert DXFs with LWPOLYLINEs into DXFs containing LINEs and ARCs as a workaround until this problem is fixed in the LaserBox software.

import ezdxf
import math

def process_line(msp, v0, v1, z):
    x0, y0, s0, e0, b0 = v0
    x1, y1, s1, e1, b1 = v1
    if b0 == 0:
        msp.add_line((x0, y0, z), (x1, y1, z))
    else:
        c, start_angle, end_angle, r = ezdxf.math.bulge_to_arc((x0, y0), (x1, y1), b0)
        x, y = c
        msp.add_arc((x, y, z), r, start_angle * 180 / math.pi, end_angle * 180 / math.pi)

def process_file(inname, outname):
    doc = ezdxf.readfile(inname)
    msp = doc.modelspace()
    for entity in msp:
        if entity.dxftype() == "LWPOLYLINE":
            entity.unlink_from_layout()
            z = entity.dxf.elevation
            for i in range(1, len(entity)):
                process_line(msp, entity[i-1], entity[i], z)
            process_line(msp, entity[-1], entity[0], z)
    doc.saveas(outname)

if __name__ == '__main__':
    import argparse
    parser = argparse.ArgumentParser(description='Convert DXFs so that LWPOLYLINEs are replaced with LINEs and ARCs.')
    parser.add_argument('infile', help='input filename')
    parser.add_argument('outfile', help='output filename')
    arg = parser.parse_args()
    process_file(arg.infile, arg.outfile)

#5

this issue will be fixed in coming new version laserbox software,new software will be released on November.

Your laserbox will pop-up a reminder to ask you update software after we release once your PC has internet


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.