<p>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.</p>

<pre><code>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.*?(?&lt;!;)\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:] )
</code></pre>

<p><a href="https://i.sstatic.net/Hs8Ld.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Hs8Ld.png" alt="Elevated part"></a></p>

CC BY-SA 4.0
2020-02-22T06:03:52.960Z
2020-02-22T06:03:52.960Z
user1543042
<p>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?</p>

<p><a href="https://i.sstatic.net/DptKY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DptKY.png" alt="Preview"></a></p>

<ultimaker-cura><multi-material>
Cura projecting floating print onto build plate during slicing
user1543042
# Cura projecting floating print onto build plate during slicing

(Asked by: username_0 on 2020-02-20)

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?

[![Preview](https://i.sstatic.net/DptKY.png)](https://i.sstatic.net/DptKY.png)

**Tags:** ultimaker-cura, multi-material

---

## 1 answers

### Answer by username_0 on 2020-02-22. Score: 2 | Accepted answer

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.*?(?


---

