markmaker / PushPullFeeder

All 3d-Printed Tape&Reel Feeder
GNU General Public License v3.0
71 stars 32 forks source link

Parametrized packing of pieces? #6

Closed brainstorm closed 2 years ago

brainstorm commented 2 years ago

I wish there was some sort of (randomized? parametrized?) bed area packing option in this PushPullFeeder to fit those components (other than the current two phase system)... I'm sure I can print all the pieces below on a Replicator+ bed size in one go? This one was so close!:

Screen Shot 2021-12-20 at 9 59 02 pm

markmaker commented 2 years ago

Hi @brainstorm On my PrusaSlicr (Slic3r) I can let it break up the model and rearrange it. _Mark

brainstorm commented 2 years ago

True that, pity that Makerbot's software does not seem to have an (obvious?) "split" option like Slic3r does :-S

Screen Shot 2021-12-23 at 10 16 04 am

I'll go ahead and jump through that splitting w/ slicer and re-import the resulting stl to the Makerbot Print software.

markmaker commented 2 years ago

Just out of curiosity. Can't you use Slic3r directly on the Makerbot printer? Does the slicer really need to be specific to the printer?

markmaker commented 2 years ago

I just downloaded Slic3r to see what's the difference to PrusaSlicer and it seems day and night:

This is the result of the auto-arrange in Slic3r:

image

This is the result of the auto-arrange in PrusaSlicer:

image

NOTE: you need to switch to Configuration / Mode / Expert for the Split to Objects command to become available.

image

I recommend using PrusaSlicer, obviously ;-)

_Mark

brainstorm commented 2 years ago

Thanks Mark for sharing your tests and tribulations! Very instructive and interesting as always ;)

The reason I was going for Makerbot alone was twofold:

1) I'm preparing the 3D print job for an external service (I don't own that printer), so I just wanted to stick with their "Standard Operating Procedure" and settings to avoid any possible issues.

2) Since I might be iterating and submitting this job (or parts of it) in the future after some further tweaks, I thought about minimizing the steps (and third party programs) to go through for each iteration.

Also as a curiosity, I'm preparing the same job for another makerspace and Cura isn't good either packing the pieces together:

Screen Shot 2021-12-25 at 6 35 48 pm

EDIT: Actually unfair comparison, because the STL has not been "split"... although the Cura software itself doesn't seem to give that splitting option that Slic3r and PrusaSlicer gives, either :/

So given that every other slicer/software does or doesn't do it well, I thought about having it done on the OpenSCAD side instead (given an input bedsize geometry), but of course I don't want to put that burden of you, this is pure fun/hobby ;)

markmaker commented 2 years ago

I understand and yes, doing it right out of OpenSCAD is the best option, that's obviously what I did for my Prusa printer too.

I don't think it will be possible to write a generic auto-layouter inside OpenSCAD (that's quite a hard problem anyways). Instead I would simply aim for a more compact layout that fits on these smaller print beds. The layout implemented now (for Prusa) has just evolved along with the model, there was no big effort into optimization.

I'll certainly accept a PR. ;-)

I must say I'm a bit surprised that these print services have smaller print beds. I always thought the Prusa was one of the smaller printers.

Another option might be somehow scripting / command-line controlling PrusaSlicer.

_Mark

brainstorm commented 2 years ago

I'll certainly accept a PR. ;-)

Challenge accepted ;)

I guess I'll start by tweaking that translate piece by piece (otherwise it takes too long to render and iterate on it):

Screen Shot 2021-12-28 at 7 20 49 am

I guess that after putting a few magic numbers in those translates by adding offsets there manually I might find a way to generalise this well, but I'm not too sure it can easily 🤔

brainstorm commented 2 years ago

Screen Shot 2021-12-28 at 8 37 56 am

Getting there, I'll keep tweaking... thinking about the pieces, most of them parametrize by height (inset, chute, base plate), so the packing can be fairly static and benefit everybody without many constraints or breakage at all :)

t-paul commented 2 years ago

I suppose I can't claim an unbiased opinion, but I'm not sure OpenSCAD is the right place to do that. The main argument being that usually the Slicer is the tool that understands the geometry and restrictions of the printer. And that is not necessarily just the bed size. Depending on the printer setup / fabrication method, there could be additional constraints or more relaxed options (e.g. the 3DPrintMill could just print all objects in a line).

I think a good option would be extended support for generating multiple parts in OpenSCAD and export those in file formats supporting that (e.g. 3MF). Now that is out of control of an OpenSCAD script at this point, so some added support in the script could be a good short term solution. I only want to highlight a possible more general option in case someone has suggestions on how to tackle those :grinning:.

brainstorm commented 2 years ago

Always nice to have an OpenSCAD dev popping by (from https://github.com/openscad/openscad/issues/4022) :D

I hear what you say, my intention was to tighten the iteration loop while printing by avoiding intermediary steps... out of curiosity, I exported the scad model to .3MF (supported in OpenSCAD), but apparently MakerBot print doesn't seem to accept it as-is (.3MF file is grayed out as opposed to .STL)?

Screen Shot 2021-12-29 at 5 01 48 am

What do you mean by "added support in the script"? Are there special OpenSCAD directives for .3MF exports?

t-paul commented 2 years ago

Yes, if there's reasonable effort options in the script, that's certainly a quicker win. Bigger export changes in OpenSCAD probably will take some time, even though it's a topic coming up repeatedly and it would be an extremely useful extension, not just for 3MF.

I've never used the Makerbot tools, but if those do not support 3MF, that's a very sad situation. Especially considering 3MF is not a new format anymore (published in 2015) and Stratasys is listed as Steering Member of the 3MF Consortium. I don't know, maybe they insist using their proprietary "Thing" format which I've never seen supported anywhere else.

brainstorm commented 2 years ago

Did a quick search and no, they (Makerbot) don't support .3MF, I also think it's a bit of a shame: https://twitter.com/braincode/status/1475906583347429376

Anyway, thanks both for your valuable feedback, I think I'll call it quits with PR #7, @markmaker, you both have very good points on not doing this in OpenSCAD, I'll go with slic3r for now ;)

brainstorm commented 2 years ago

Last fun bit... it takes some creative packing to print all pieces on the Ender 3 v2 (Pro) bed:

Screen Shot 2021-12-29 at 7 28 30 am