I'm trying to do a multifilament print on my single extruder machine. So I separated out the models based on filament, and imported the parts into Cura. I ensured that "Automatically drop models to build plate" was disabled and in the "Prepare" phase that seems to work. However, when I slice the model it gets pushed back down to the build plate as can be seen in the picture below. Any recommendations? Do I just need to write a script to go in and shift the z location?



I've been playing with this and came up with a solution, so I thought I would share in case anyone else had this issue in the future. In Ultimaker Cura I enabled supports and z-hopping before I sliced the part, then I ran this Python function to remove the supports and get the extruder setup.

import re

def float_part(file):
    printString = ';LAYER:'
    partString = ';(.*?).stl'

    with open( file , 'r') as content_file:
        content = content_file.read()

    printArea = re.search( printString , content ).span(0)[0]
    partArea = re.search( partString , content ).span(0)[0]

    uncommentedLine = partArea - re.search( '\n.*?(?<!;)\n' , content[ partArea:printArea:-1 ] ).span(0)[0]

    lastExtrusion = uncommentedLine - re.search( 'E' , content[ uncommentedLine:printArea:-1 ] ).span(0)[0]
    secondLastExtrusion = lastExtrusion - re.search( 'E' , content[ lastExtrusion-1:printArea:-1 ] ).span(0)[0]

    lastExtrusionAmount = float(re.search( '\d+(\.\d+)?', content[lastExtrusion:] ).group(0))
    secondLastExtrusionAmount = float(re.search( '\d+(\.\d+)?', content[secondLastExtrusion:] ).group(0))

    ResetCommand = '\nG92 E' + str(lastExtrusionAmount) + '\n'

    with open( file , 'w') as content_file:
        content_file.write( content[0:printArea] + ResetCommand + content[uncommentedLine:] )

Elevated part


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.