Jump to content

Method for editing/"splitting" netfabb gcode?


calinb

Recommended Posts

Posted · Method for editing/"splitting" netfabb gcode?

I'm very happy with a netfabb-generated toolpath for one of my models, but the model needs to be cut in half to print properly without support (printing each half with the cut face down). Unfortunately, I'm not happy at all with the toolpaths generated for the two separate halves after cutting the model and repairing the halves. What I really want is a netfabb engine setting to start the toolpath generation halfway through the layers of the full model. It can do this with slice files but it doesn't seem to be able to import a "half-model" slice file and generate a toolpath using it.

Other than writing my own script, is there a way I can "cut the gcode in half?" I can generate full-part gcode in both orientations so the order of the gcode layers need not be "flipped" for a lower half part, but half the layers need to be deleted and the other layers re-numbered to produce a revised "half-part" gcode file.

The model is very complex and built from solids. I've been unable to make the models completely water-tight and perhaps a few other peculiarities are still present. Nonetheless, the toolpath for the full model looks very good. The toolpaths for the split halves exhibit several problems, regardless of what repairs I attempt on each half separately.

Maybe I'm missing something in netfabb and there's an easy way to solve my problem. Thanks for any suggestions,

-Cal

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    Hi

    Hope I can explain this OK

    Slice the model once normal and once upside down with Netfabb

    1 Grab the 2nd Half of your gcode

    2 Put your usual header in front

    3 put in a G92 command with the E and Z value from the start of your models GCode

    example G92 E22345 Z63 (for a model that was 126mm high that you split in 2)

    Repeat steps 1 to 3 for 2nd half of other generated Gcode with it's appropriate E and Z values in step 3.

    Ask hear if you're not sure.

    Trial on something small first if you like.

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    Thanks, Owen! You saved me a lot of time as a noob pouring over gcode definitions (

    http://reprap.org/wiki/G-code

    )

    So, for confirmation, let's say I have a 388 layers in a gcode file with

    HEADER:

    M104 S240.00M92 E866G21G91G1 X0.00 Y0.00 Z5.00 F500G90M109 S240.00G28G92 X0.00 Y0.00 Z0.00 E0.00G1 E0.00G1 X0.00 Y0.00 Z5.00 F600.00M106 S255G1 X205.00 Y200.00 Z5.00 F5000.00G1 X205.00 Y200.00 Z0.35 F5000.00G1 X205.00 Y100.00 Z0.35 F2500.00 E3.23G1 X204.00 Y100.00 Z0.35 F2500.00 E3.27G1 X204.00 Y200.00 Z0.35 F2500 E6.50G1 X203.00 Y200.00 Z0.35 F2500 E6.53G1 X203.00 Y100.00 Z0.35 F2500 E9.76G1 X202.00 Y100.00 Z0.35 F2500 E9.80G1 X202.00 Y200.00 Z0.35 F2500 E13.03G1 X201.00 Y200.00 Z0.35 F2500 E13.06G1 X201.00 Y100.00 Z0.35 F2500 E16.30G1 X202.00 Y100.00 Z0.35 F50000 E11.44G1 X0.00 Y200.00 Z0.00 F15000G92 E-4.85

     

    then maybe some non-header stuff I need:

     

    G1 X0.0000 Y200.0000 Z0.2000 F3240.0000M107G1 X0.0000 Y200.0000 Z0.3800 F1200.0000G1 X0.0000 Y200.0000 Z0.4000 F1200.0000M104 S240.0000(minimal layer time: 10.00 / Time Entry: 0)(#0-#3: extrusion time: 206.62 / jump time: 28.43)(printing at normal speed)

     

     

    Z-MIDDLE:

    G1 X33.2000 Y135.8600 Z7.7600 F1200.0000 E8743.4072(begin layer 195 at 7.800)G1 X33.2000 Y135.8600 Z7.7800 F1200.0000G1 X33.2000 Y135.8600 Z7.8000 F1200.0000G1 X33.7400 Y136.4100 Z7.8000 F4200.0000G1 X33.9857 Y136.6593 Z7.8000 F4200.0000G1 X63.2300 Y135.4100 Z7.8000 F2400.0000 E8743.5723G1 X65.8000 Y134.7900 Z7.8000 F2400.0000 E8743.5869

     

    So just put this single line right before the "Z-MIDDLE" section?

     

    G92 E8743.4072 Z7.7600

     

    because they were the last values for E and Z before the start of layer 195? Or will that cause the head to jump 20 microns in Z (7.7600 to 7.7800) before it starts printing? Layer 195 at 7.800 doesn't have an E value.

    Maybe I need the last value of E before layer 194 with the correct height for layer 194 (now the 1st layer):

     

    G92 E8743.4072 Z7.7800

     

    I'll try it in the AM, but just wanted to try to confirm first.

    Again, Thanks!

    -Cal

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    Yup--works great, according to the Repetier-Host gcode editor and simulator!

     

    G92 E8743.4072 Z7.7800

     

    is correct, because the initialization code left the head at Z=-0.040, which is the correct position for the first layer of the split gcode.

    I noticed that netfabb "preloads" the E value in initialization with

     

    G92 E-4.85

     

    which causes a fixed amount of "extra" plastic to be extruded at the first G1 command containing a non-zero E value. I don't understand what the extra 4.85 mm of plastic is for, but I could subtract -4.85 from the E value in my G92 command too. I need to investigate further. That's a lot of plastic! What is it for?

    The Repetier-Host gcode editor is great. I couldn't even get netfabb's own gcode to import into netfabb! It only imports into the SLICE section, and it can't be dragged or imported to the Ulimaker engine section. I don't know how one can print netfabb gcode from netfabb once the program is closed. Maybe it's part of the problem with printing directly from netfabb that I've read about. (I'm still assembling my printer.) Furthermore, even the netfabb slice viewer graphic is blank after netfabb imports the gcode it and does not depict any layers.

    This thread turned me on to Repetier-Host:

    viewtopic.php?f=12&t=1276#p7725

    Thanks again for the guidance! I've been alternating my time between working on models and assembling my Ultimaker. Just finished the V2 hot end. Pheww!

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    Without seeing the header I'm guessing the 4.5mm is to prime the nozzle with plastic before staring a print to account for hot plastic that has leaked out at the end of the last print and during the warmup of the new print.

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    If you don't mind looking, here's the code, Owen. I also understand if you don't have the time to figure it out. I'm not actually going to print this gcode, but I might run into a similar situation once I get my model in order and split its gcode using with the techniques I've learned here.

    I added some comments. (I learned from Repetier-Host that the parentheses that netfabb uses for comments don't seem to be official gcode comments and it will still execute codes between parens!)

    This gcode was produced by netfabb using the ultra profile for a part that is not split (only a few points would rest on the table. It would probably need support to actually print.

     

    M104 S240.00M92 E866G21                                       ;use millimetersG91                                       ;use relative positioningG1 X0.00 Y0.00 Z5.00 F500     ;move the head up to Z5.0G90                                       ;use absolute positioningM109 S240.00G28                                       ;home the head to machine originG92 X0.00 Y0.00 Z0.00 E0.00  ;set the zero to the originG1 E0.00G1 X0.00 Y0.00 Z5.00 F600.00M106 S255G1 X205.00 Y200.00 Z5.00 F5000.00G1 X205.00 Y200.00 Z0.35 F5000.00G1 X205.00 Y100.00 Z0.35 F2500.00 E3.23 ;start extruding plastic at Z0.35 on the right side of tableG1 X204.00 Y100.00 Z0.35 F2500.00 E3.27 ;several lines followG1 X204.00 Y200.00 Z0.35 F2500 E6.50      ;extrude faster and fasterG1 X203.00 Y200.00 Z0.35 F2500 E6.53      ;these lines are NOT part of the .stl modelG1 X203.00 Y100.00 Z0.35 F2500 E9.76G1 X202.00 Y100.00 Z0.35 F2500 E9.80G1 X202.00 Y200.00 Z0.35 F2500 E13.03G1 X201.00 Y200.00 Z0.35 F2500 E13.06G1 X201.00 Y100.00 Z0.35 F2500 E16.30G1 X202.00 Y100.00 Z0.35 F50000 E11.44  ;yikes--extrude really fast!!!G1 X0.00 Y200.00 Z0.00 F15000G92 E-4.85                                               ;"preload" 4.85 mm of plastic for the next extrusion ???                                        G1 X0.0000 Y200.0000 Z0.2000 F3240.0000 M107G1 X0.0000 Y200.0000 Z0.3800 F1200.0000 G1 X0.0000 Y200.0000 Z0.4000 F1200.0000 M104 S240.0000 (minimal layer time: 10.00 / Time Entry: 0)(#0-#3: extrusion time: 0.01 / jump time: 3.70)(printing at reduced speed: 10.00 %)(begin layer 1 at 0.040)                               ;null layers(begin layer 2 at 0.080)(begin layer 3 at 0.120)M106 S255(begin layer 4 at 0.160)(minimal layer time: 10.00 / Time Entry: 1)(#4-#7: extrusion time: 0.00 / jump time: 0.00)(printing at reduced speed: 10.00 %)(begin layer 5 at 0.200)                              ;more null layers(begin layer 6 at 0.240)(begin layer 7 at 0.280)(begin layer 8 at 0.320)(minimal layer time: 10.00 / Time Entry: 2)(#8-#11: extrusion time: 9.23 / jump time: 0.60)(printing at reduced speed: 98.19 %)(begin layer 9 at 0.360)G1 X0.0000 Y200.0000 Z0.3800 F1200.0000 G1 X0.0000 Y200.0000 Z0.3600 F1200.0000 G1 X58.4300 Y143.7600 Z0.3600 F10500.0000 E0.0000 G1 X60.0060 Y142.2430 Z0.3600 F10500.0000 E0.0000 G1 X69.1600 Y142.2400 Z0.3600 F2356.5957 E0.0413    ;finally start extruding the actual part at Z0.360 (why so high?)G1 X69.4900 Y142.3900 Z0.3600 F2356.5957 E0.0430 G1 X69.4800 Y144.4700 Z0.3600 F2356.5957 E0.0524 G1 X60.8600 Y144.4600 Z0.3600 F2356.5957 E0.0913 G1 X60.4500 Y144.2400 Z0.3600 F2356.5957 E0.0934 G1 X60.0100 Y142.2400 Z0.3600 F2356.5957 E0.1027 

     

    Besides the mystery extruder "preload" of 4.85, I don't understand the purpose of all the lines on the far right side of the table that are not part of the model. They are printed at Z=0.35 and then netfabb created all the null lines followed by finally extruding the actual part at Z=0.36. Functionally, it's like the print starts about 0.32 mm higher than it should.

    Thanks,

    -Cal

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    Yep, it looks strange to me. After the last update from Netfab it did do a routine of printing a few lines before it started. I used my own Header instead. But I'm not sure why it seems to start high.

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    Thanks for your thoughts, Owen. I'm still learning the ropes and will be for quite a long while. Looks like I'll use the Repetier-Host gcode editor and simulator often! It's really cool. A user can highlight different sections of gcode within a layer and the corresponding extruded plastic is highlighted on the simulator graphic. The graphic can be zoomed and rotated too, of course. The editor Help button provides gcode definitions for the selected line "on the fly" while editing.

  • Link to post
    Share on other sites

    Posted · Method for editing/"splitting" netfabb gcode?

    That sounds fantastic. I'll have to check it out.

  • 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
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 13 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...