Jump to content
Ultimaker Community of 3D Printing Experts

Line order for bed adhesion issues.


Darinth
 Share

Recommended Posts

Posted · Line order for bed adhesion issues.

I'm trying to print something that has a number of small holes in the bottom, and running into an issue that I feel like there should be a good and obvious solution to, but every time I try to change one setting to solve this the slicer makes a bad decision somewhere else.

image.png.a9a8c3074467581b723f957a77f055d9.png

That is the full set of lines for the first layer of the print. By default, the slicer wants to do red lines (outer walls) first (ish) and then move towards the green lines (inner walls) and finally the yellow lines(interior fill). Tweaking various settings, I can get it to go green lines first, then red lines, followed by the yellow fill lines. But either of these settings results in it trying to print small unattached bits on to the build plate, and because of the large number of them... probably > 70% of these have some number of the holes mangled and require extra effort to clean up.

Ideally... I feel like it should print the outer most red line (because longer, straighter lines generally have the best buildplate adhesion) and from there work it's way slowly inward always starting each line so that it's touching a previous line because filament sticks to itself extremely well and as long as you start adjacent to another already printed piece there's generally no problems. So for this print, I'm fairly confident that if it did the outermost red line, then moved to the green lines that are next to it, then the yellow lines, then the interior green lines, then the red outlines of the hole (starting each of those outlines so they're adjacent to the existing green lines), then the innermost green, and finally the innermost red lines. Given what I've seen with my issues with getting small features to attach to a buildplate... I'm surprised this isn't already an option but if it is I'm not able to find it. Is there a way to make this happen? Is there a way to force the line ordering such that it starts off with a line that is the least likely to have build plate adhesion issues, and slowly works from there to print lines that are attached to the ones that should already have good adhesion?

  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    After manually modifying the gcode to print the lines in this order, I am now at 4 for 4 with zero defects. Just need to figure out how to write a post-processing script to automate re-ordering the lines of the first layer... manually reordering gcode is a PITA.

  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    If you put a Pause at Height in at the end of LAYER:0, you could slice one time with the wall order set to "Inside to Outside" and save the gcode, and then slice again with the wall order at "Outside to Inside" and save the gcode.

    Copy LAYER:0 from the 2nd file and overwrite LAYER:0 of the first file.  Adjust the transition gcode so any retractions and location settings are synced (and get rid of the pause line) and you should be good.  It's possible that a G92 E line is all you would need to sync.

     

    I can't help from thinking that re-ordering the line printing order is a band-aid and doesn't address the problem which would seem to be first layer adhesion to the bed.  @gr5 is a moderator here and put together THIS_VIDEO that could be titled "Everything you need to know about Bed Adhesion".

    I've printed a lot of models with a lot of smaller (2mm) holes on the bed and haven't had a problem.  I typically print PLA with no Adhesion Aid but I prep the glass with hairspray for those types of models as there isn't much contact patch between all the little circles and the bed.  Increasing your "Initial Layer Flow" to 105% or even 110% might help as well.

  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    Neither outside to inside or inside to outside is the right print order on the first layer. Both have problems which required me to go into the gcode and manually reorder the lines. Hoping to create a post-processing script to automate the process, but I'm having issues with debugging. Logging in general appears to just be non-functional in post-processing scripts.

    Nothing in the video which is new to me. I generally print using a PEI sheet on a heated bed, and that's solved most of my adhesion issues. It's only an occasional issue like this that cause problems. With 10 tiny holes (measure 2.87mm from corner to corner on the model) in rapid succession and all of them are actually functional components rather than just something aesthetic, they basically have to be perfect. So taking the time to clean them up at the end gets frustrating. And don't get me wrong... there's probably a like >80% of the holes adhere with the default print order... but with 10 holes that means that there's almost always a hole or two that gets a little mangled.

    Good squish, heated bed, don't generally have adhesion issues... but apparently when I get down to small 'outside' lines on the inside of the model I've still got issues. I'll admit, I haven't tried an increase in the first layer flow rate. I may give that an attempt. But honestly it still seems like options to reorder the lines on the first layer is a really good, viable solution to an issue that I know (from finding other people who've had similar issues) causes a problem for some prints.

  • Link to post
    Share on other sites

    Posted (edited) · Line order for bed adhesion issues.
    On 6/25/2022 at 2:22 AM, Darinth said:

    After manually modifying the gcode to print the lines in this order, I am now at 4 for 4 with zero defects. Just need to figure out how to write a post-processing script to automate re-ordering the lines

     

    I had the same thought while I was having adhesion issues with ABS. I've only just now had a cursory look at the gcode format, but it seems like you could separate out the G1 sequences, pick the longest one to start with, and then choose the remaining sequences in order of "greatest adjacence" to all the prior G1 sequences. It's an N^2 algorithm but approximating the degree of adjacence (perhaps by only taking every nth point of the current G1 sequence) could save some time. It might not be too bad if it's just the first layer. This would probably maximize the degree of contact, but I should think the G0 sequences would have to be re-generated once a suitable order of G1 sequences is computed and I'm not sure how cura does that off the top of my head. It would really make more sense to do this during the slicing process rather than after the fact.

     

    A basic definition of the adjacence measure between the already-printed lines and a remaining sequence could be the average number of individual coordinates in the remaining sequence that are within a certain distance (presumably the line width) of at least one coordinate from the lines already printed.

    Edited by Andrew1
  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.
    6 hours ago, Andrew1 said:

    ...but I should think the G0 sequences would have to be re-generated once a suitable order of G1 sequences is computed and I'm not sure how cura does that off the top of my head. It would really make more sense to do this during the slicing process rather than after the fact.

     

    I agree that this would make more sense for Cura to do, but I have little to no capability to get draw attention to this need to see it implemented and right at the moment I'm not gonna lie I simply don't have the desire to go through and learn Cura's codebase well enough to make the PR. I do, however, feel confident in my capabilities to write a post processing script that will read & analyze the different lines and can reorder them in such a fashion that (if possible) it'll start with longer/straighter line and from there select lines that are already adjacent. Even at an N^2 algorithmic complexity, this should be doable for a python script that's just reordering the lines for the first layer. If that turns out to be too high, I already know how to get this down to what should be N log N.

  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    Bigger issue honestly right at the moment is that I tried again yesterday and, unless I'm missing something, the logger used to debug post processing scripts is broken and that makes actually writing the script a PITA.

  • Link to post
    Share on other sites

    Posted (edited) · Line order for bed adhesion issues.

    I agree with GregValiant's comment that it might be easier to just treat the problem as a general adhesion issue. I'm sure there's a reason that cura prints the walls first, though I'd still be curious to know whether or not the line ordering I suggested would work. And yes, you can probably reduce the complexity of the comparison function by organizing all the individual coordinates into a suitable data structure, perhaps a k-d tree. This depends on the adjacence function though. If you only check for every coordinate in a remaining sequence whether or not it's within a certain distance of at least one coordinate in the already-processed sequences, then yes, I think it would work. More generally, you'd still be doing a pairwise comparison between all sequences (and presumably all coordinates).

     

    Anyway, I've never had great results with PEI. What material are you using? For PLA and PETG I've had much better luck with a glass bed and either gluestick, or an "extra firm hold" hairspray, optionally topped with a light gluestick application. Printing ABS on PEI was very sensitive to bed temperature and there was hardly any middle ground between adhesion failures and permanently bonding the part to the bed, especially with larger models. ABS doesn't seem well-suited for 3d printing in general and I don't use it anymore.

    Edited by Andrew1
  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    This is printed with PLA. I've tried printing with ABS exactly once. I gave up on what I was trying to do at the time and since then 3D printing has mostly moved on to better alternatives from what I understand. I really don't see anybody recommending it for anything these days. I've also used PETG and keep some available, but I tend to avoid it unless I've got concern about needing my print to be a little bit more heat resistant. I still use PLA as my general purpose workhorse. Might make another attempt at just trying to resolve bed adhesion issues, but not gonna lie I really like the solution of just reordering the lines. I've printed a dozen or so of these with the manually altered gcode at this point and have a 100% success rate with 0 defects.

  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    Hair spray with glue stick applied on top (after the hairspray dries) is what I've been using lately.

  • Link to post
    Share on other sites

    Posted · Line order for bed adhesion issues.

    Hello,

     

    You can do a lot of things with a postprocessing script. But it will be not so easy, You will also need to manage the E Value ( test if you are in relative or absolute extrusion mode. You will also need to manage the retract movements Z hop if you decide to use this option etc. 

     

    It's possible but it's not an quick and easy job. You can start from a sample script like this one to already have a structur and some basic subroutine : https://github.com/5axes/Cura-Postprocessing-Scripts/blob/master/GradientInfill.py

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 13 replies
    ×
    ×
    • Create New...