Loading

Printing separated parts that can fit

by whitemousegary, published

Printing separated parts that can fit by whitemousegary Oct 27, 2012

Description

Please refer to thingiverse.com/thing:52946 instead. That is a better solution. (2013-02-27)

Printing separated parts that couldn't fit has always been a problem to me. I tweaked the skeinforge engine in ReplicatorG to add an offsetting 3D model inward funtionality. Here is the result youtube.com/watch?v=ieMXp1h0iM0 .

Recent Comments

view all

I just installed the stand alone script. It made the part (planetary gears) non-manifold in a few places, but I sent it through Netfabb. I'm excited to see how this works out!!! 

 Thanks, it's what I'm looking for.

Inset.py, line 400, add an extra value to the halfLineWidth, this is the 'default' offset.
I just tested this, works fine.

More from 3D Printing

view more

Makes

Liked By

view all

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

Result0: youtube.com/watch?v=BKLQPbExpu4, inward offset (0.3mm, 0.3mm, 0.0mm)
Result1: youtube.com/watch?v=ieMXp1h0iM0
Result2: youtube.com/watch?v=JbhVv7fzkfc, inward offset (0.15mm, 0.15mm, 0.0mm)
The plugin for skeinforge-35: thingiverse.com/download:95789
The plugin for skeinforge-50: thingiverse.com/download:95790

The 3D models downloaded from thingiverse.com (or internet) come with a variety of quality. Some are more thoughtful, and some are not. In case you got a less elaborated 3D model which having multiple parts that are too tight to fit, it would be intuitive to just have the model offsetting inward a little bit directly, such that parts can fit. (There are some good reasons why parts are likely to be too tight, see reprap.org/wiki/ArcCompensation and hydraraptor.blogspot.hk/2011/02/polyholes.html.)

I googled and waited for a such a solution. Finally, I went out of patience, and... here we go...

1) Download the file "skeinforge-50-carve.zip" in this post, and
replace "YOUR_REPLICATORG_FOLDER/skein_engines/skeinforge-50/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py" Please remember to backup the origin one, they are just python scripts, basically safe to be switched. (For skeinforge-35, please download "skeinforge-35-carve.zip" and replace the "carve.py" in "skeinforge-35" folder instead.)

2) Restart your ReplicatorG, go to MENU>Gcode>Edit Slicing Profiles, choose your profile and click Edit.

3) Go to Carve Tab under Craft Tab, you will now see a new set of setting "Offset model inward". In the setting, you have four choices. They are enable/disable, x, y, and z offsets (mm). X/Y offsets should be the same value normally, I separated them is just to make it more general. The Z axis is usually fine, so you can just leave it zero. In case you really want to change it. Do so. I'm calculating the z-offset correctly there. Be reminded that, the enable/disable state is disabled by default, please enable it before you use it.

In case you think it is too invasive to make change to the application, you can use the standalone version, shrinkmodel.py, instead. Download shrinkmodel.py in this page, put it in the folder "YOUR_REPLICATORG_FOLDER/skein_engines/skeinforge-50". Open it, you will see a dialog, choose your .stl file by click "Open file to shrink" button; A shrinked .stl file with name FILENAME_shrink.stl will be saved to the folder of the input .stl file.



This is it. Let's see some results now.

There is a .stl file "test.stl" in this page. It is a pair of hole and plug directly come out from Google Sketchup, edge to edge touching each other. Here is what I got youtube.com/watch?v=BKLQPbExpu4 , and they fit.

By the way, there is a bonus came with this plugin. The same adjustment is still valid after scaling. So, a design can be scaled freely, and a plug will still fit into its hole. For instance, youtube.com/watch?v=ieMXp1h0iM0 .

For the record, I'm using a MakerBot Mk7 with HBP, 0.4mm nozzle. The two models in this post were printed with model inward offset (0.3mm, 0.3mm, 0.0mm). If you want to make parts fits tighter, you can lower the offset values of X Y dimension to achieve it.

Comments

You must be logged in to post a comment.

duckythescientist on Nov 12, 2012 said:

I just installed the stand alone script. It made the part (planetary gears) non-manifold in a few places, but I sent it through Netfabb. I'm excited to see how this works out!!! 

DirtySteve on Oct 28, 2012 said:

This corrupts my SF50, and crashes out during slicing.
Is this just scaling the whole interior or is it offset scaling internal perimeters? If I ran this on a fan mount, would the mount hole be correctly located?

whitemousegary on Oct 28, 2012 said:

It is done by moving the surface inward into the model.  Not just a simple scaling.  If you ran this on a fan mount, the mount hole will still be the same location, and with a bigger hole.

whitemousegary on Oct 28, 2012 said:

 Are you using ReplicatorG?

Gecko on Oct 27, 2012 said:

I tried this using Cura 12.08 as the front end.  When using the replacement carve.py file my g-code is always centered around the origin point and I can't seem change it. Any thoughts?

Daid on Oct 28, 2012 said:

If you fuckup your Cura with this 'patch' then you are on your own.

Whitemousgary has done some assumptions on SF which are wrong. His code will also fuck up some models, and throwing it out like this as a 'solution' like this is irresponsible.

a) He assumes SF doesn't do insetting, while it does (I already pointed out the code locations below)
b) His code offsets all vertexes with the normals. He assumes SF already has a proper list of connecting faces (this is not the case, especially not when loading STL files) so his normal calculation starts off wrong. Then his normal calculation assumes the vertexes of the faces are always in the correct order. Surprise, they are not.

If you want extra inset, this could be done. But not like this.

whitemousegary on Oct 28, 2012 said:

I rewrote the script a little bit.  Please download "Cura 12.08 patch.zip" in this page and follow the instruction inside "readme.htm".  You need to replace four files in this case.  Also, I don't have a Ultimaker, so I can't really test it thoroughly.  If you didn't test it, please drop me some comments here.  Thanks.

UechiMike on Oct 27, 2012 said:

Does this account for different shrink rates of different materials?  That's the main reason why my parts don't always fit together with the exact dimensions and why I design a little "slop" into my parts.  Otherwise the printer does a damn fine job with dimensions.

hellphish on Oct 27, 2012 said:

Ok, I watched your videos. It seems to me that if your parts were touching each other in sketchup, then they should have an extremely tight fit in real life. Your videos demonstrate a very loose fit.  If I want a loose fit, I design it into the model.

It is a neat idea to be able to adjust tollerances in the slicer, just a little weird :)

whitemousegary on Oct 28, 2012 said:

You can make it arbitrary tighter.  This one http://www.youtube.com/watch?v... is printed with model inward offset (0.15mm, 0.15mm, 0.0mm), which I can't really separate them without a tool after they plugged.

hellphish on Oct 27, 2012 said:

Forgive my ignorance, but isn't this what inset does?

whitemousegary on Oct 27, 2012 said:

I tried to vary inset setting to make parts fit before, but no luck.  May I ask, how do you set inset setting so that parts can fit?

Daid on Oct 27, 2012 said:

You are full of bull. Skeinforge doesn't lay lines on the borders. Cura's mixed GCode-model preview clearly shows this.

Your code will also make a mess of models with lots of fine details.

Lenbok on Oct 27, 2012 said:

 I downloaded Cura just to try this out, (since it doesn't seem possible to attach images in the comments), added it as an "I made one" to this object.

flouSH on Oct 27, 2012 said:

You saved all our lives! Just hope that this is being integrated asap into all other slicers! 

Can anybody with good connection to any of the slicer devs send them this link? I'll do that for Cura and Kisslicer right now.

Todo: - MakerWare
- Slic3r
- What else?

cyclone on Oct 27, 2012 said:

I have long suspected that SF was not compensating for the thread width
on the perimeter. Most people "dial in" their printer by adjusting the
x/y steps/mm to force the outside measurement to be true as in the case
of a testcube. But lowering the steps/mm to get the outside measurement
exact means that the inside dims (holes) are now even smaller. Glad to
see someone tackle this annoying problem, one step closer to commercial
grade 3d printing. Very well done.  

eslighton on Oct 27, 2012 said:

Would it make more sense to have the settings as fractions of a thread with? That way, the setting would be roughly the same regardless of what thread width you print at. 

eslighton on Oct 27, 2012 said:

Just tried it out on your test piece.  Works like a charm!  

Top