Welcome! Log In Create A New Profile

Advanced

Z-alignment for STL export after doing Cuts

Posted by jmont723 
Z-alignment for STL export after doing Cuts
January 21, 2015 05:15AM
Hey everyone,

I'm new to 3D printing and modeling in general and I'm having some problems getting Slic3r to do exactly what I want it to. I have what should be a pretty common use case: I'd like to use Slic3r to take large models and cut them up into more wieldable/printable pieces that I can export as a single STL file for later printing. The view/cut tool built into the program seemed perfect for doing this really quickly, but I'm running into an issue where the separate parts never end up aligned along the Z axis after cuts are made. This results in one or more pieces always seemingly "floating" off of the print bed when I try to make use of the STL file afterwards. Here's an example:

3D model for slicing/cutting (Kirito's Elucidator from Sword Art Online):
[imgur.com]

STL generated file from Slic3r after cutting the model into two pieces(side view):
[imgur.com]

As you can see, the cut was made without any issues but the bottom of the two pieces are never aligned in the Z-plane.

I'm using the option to rotate the lower piece so that the flat end faces the print bed, but it doesn't seem to have an impact on how the pieces are aligned. Hitting "arrange" doesn't seem to have any effect on it either.

I can use another program to line everything up but it would be great just to do everything quickly in Slic3r and get a neatly generated print plate for larger objects. I feel like I'm missing a setting or configuration item but I can't seem to figure out what it is. Any advice on the best way to do this would be really appreciated.

Thank you so much,
jmont
Re: Z-alignment for STL export after doing Cuts
January 21, 2015 08:11AM
I suspect that Slic3r is automatically centering each slice on the build plate.

If you just want to slice up an STL into new STL's, Slic3r is perhaps not the best tool (it is primarily designed to slice parts for FFF printing rather than STL exports). One tool that could be used to slice an STL would be OpenScad. Import the STL into OpenScad and slice the section you want using the "difference" function, then export as a new STL.

e.g.
Download the free Openscad application from [www.openscad.org] Copy & paste the code I've written below into a text file, rename that text file to "Cut.scad" and double-click it to open in OpenScad. You can now edit the variables in OpenScad - change the STL file name between the quotes in line 1 (ensure you include the quotes, and you can put in the full path to the STL if it's not in the same directory as the SCAD file) and change the slice height variables on lines 2 & 3 to what you want (they are in millimetres), then hit F6. After waiting for OpenScad to process (progress bar at bottom right), you should see the sliced section in the yellow top-right pane. If not look at the error messages in the lower right pane. You can then use the "File">"Export" menu to create a new STL. Set the top distance anything higher than the original STL for the top section.

Note that your original STL model should have its base at Z=0 and be reasonably close to the XY origin. If it is not, you can use the translate function in OpenScad to shift it - or post your STL and I'll give you some new code. If OpenScad fails to import the STL, you could try repairing the STL with NetFabb's online tool.

Here's some suitable OpenScad code to slice an STL ...

STL="Stlfile.stl"
BottomHeight=0;
TopHeight=5;

translate([0,0,-BottomHeight])
difference()
{
import(STL);
translate([-500,-500,-500])
cube([1000,1000,500+BottomHeight]);
translate([-500,-500,TopHeight])
cube([1000,1000,500]);
}
Re: Z-alignment for STL export after doing Cuts
January 21, 2015 01:58PM
I don't thing you should care too much about how the exported STL looks, but rather how the G-code looks. You will be amazed to discover that everything is aligned smiling smiley STL export is buggy. If you need to really be in control of positioning, scaling or cutting a model, use netfabb Basic.
Re: Z-alignment for STL export after doing Cuts
January 22, 2015 04:39AM
Hey everyone, thanks for the replies smiling smiley

I messed around with openscad for a bit but I ended up using netfabb basic and it seems like I can do what I want to pretty easily with it. Not quite as simple as Slic3r for quickly making a bunch of cuts but the alignment tools are really helpful in making sure that the produced STL ends up looking the way I want it. Thanks again everyone smiling smiley
jwd
Re: Z-alignment for STL export after doing Cuts
April 26, 2016 05:56AM
Hi,
I am struggling with netfabb and slicer to create a 2 color object. (2 color world [www.thingiverse.com])
In Netfabb the 2 parts are perfectly aligned and everything looks OK.
I selected each model and exported it to STL assuming that the coordinates were also stored.

But when I import the seperate parts in slic3r, one object fits perfectly on the glass plate (it has layers at Z = 0)
but the other one (which should be located about 5 mm above Z = 0) is als put on the glassplate (at Z=0) resulting in a deformed object.

My question is: Is there an option in Slic3r to just import the STL model as is and not to dump it on the glass plate?
Or did I not store the correct coordinates in Nettfabb?

A hint would be highly very helpfull........

regards,

JW Driessen
Re: Z-alignment for STL export after doing Cuts
May 09, 2016 09:03AM
Are you following this guide?
[manual.slic3r.org]
Sorry, only registered users may post in this forum.

Click here to login