Jump to content

complex replace.csv commands


thereza

Recommended Posts

Posted · complex replace.csv commands

I want more control over the fan - I think it makes a big difference in the quality of the print. I want to combine some suggestions from users from your posts, but they seem incompatible..

;TYPE:FILL M107 ;TYPE:FILL

;TYPE:WALL M106 S255 ;TYPE:WALL

;LAYER:1 ;LAYER1 M106

The M106 commands get inserted before the LAYER:1 which defeats its purpose. I just removed the manually. Would it be possible to add conditional commands like

IF (LAYER<1) then do this substitution?

Thanks,

Reza

  • Link to post
    Share on other sites

    Posted · complex replace.csv commands

    This will also disable the fan during bridging, which is why I didn't add this as a feature to Cura.

    The replace.csv is quite a hack, and I'm not very happy about it. But it gives some advanced users some advanced features. Adding conditionals to it won't be possible due to the way it's implemented.

  • Link to post
    Share on other sites

    Posted · complex replace.csv commands

    it seems as if many sections in the generated code are prefixed with the type of section, such as ";TYPE:FILL" -- why doesn't the bridging section have this behavior? I know the code knows that it needs to bridge as it fills the bridged section differently. Any idea where that code might live?

    Also, can you point me to section of your code which handles the replace.csv -- I can have a go at modifying it to enable conditionals. given the complexity of SF, the replace.csv might be the best place to implement a lot of features if it was more robust.

  • Link to post
    Share on other sites

    Posted · complex replace.csv commands

    First, let me warn you. I did not make the code that handles the replace.csv, nor the code that does the infill. It's also known that this code has driven people mad. So read it at your own risk.

    For the bridging part, you have to be at Curacura_sfskeinforge_applicationskeinforge_pluginscraft_pluginsinfill.py. Which I wish you the greatest luck with. I tried to isolate the solid and sparse infill from it, and I failed. I know how the code generates the sparse and solid infill parts, but I could not get the export to change for the sparse and solid parts.

    For the replace.csv it's a bit easier, which is in Curacura_sfskeinforge_applicationskeinforge_pluginscraft_pluginsexport.py, however, it's implemented as simple string replaces on the whole file.

  • Link to post
    Share on other sites

    Posted · complex replace.csv commands

    I've finally had a chance to look at the code, and have since upgraded to Cura_RC4 (btw, I noticed you fixed some of the divide-by-zero errors that I had found but never submitted patches for in RC1).

    I can't find the infill.py file anymore; did that code migrate elsewhere?

    Thanks,

    Reza

    p.s. your code still works amazingly, and NETFABB is still A WORTHLESS PIECE OF S*IT. I just upgraded that as well, and it is just junk. thanks for the hard work!

  • Link to post
    Share on other sites

    Posted · complex replace.csv commands

    actually, it wasn't that hard to figure it out assuming that bridge rotation is turned on. in gcode_small.py :

     

    --- ../Cura_RC4_orig/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py  2012-05-21 01:51:12.000000000 -0700+++ ./Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py 2012-10-12 22:36:09.805801800 -0700@@ -70,6 +70,7 @@               self.output = cStringIO.StringIO()               self.layerNr = 0               self.parsingAlteration = False+               self.bridgeLayer = False       def getCraftedGcode( self, gcodeText ):               "Parse gcode text and store the gcode."@@ -123,10 +124,17 @@                       self.output.write(';TYPE:SKIRT\n');               elif line.startswith('('):                       self.output.write(';TYPE:WALL-OUTER\n');-               elif line.startswith('('):+                       if (self.layerNr == 1):+                               self.output.write(';TYPE:LAYER0-WALL\n');+               elif line.startswith('('):                       self.output.write(';TYPE:WALL-INNER\n');+                       if (self.layerNr == 1):+                               self.output.write(';TYPE:LAYER0-WALL\n');               elif line.startswith('('):-                       self.output.write(';TYPE:FILL\n');+                       if (self.bridgeLayer):+                               self.output.write(';TYPE:BRIDGE-FILL\n');+                       else:+                               self.output.write(';TYPE:FILL\n');               elif line.startswith('('):                       self.output.write(';TYPE:CUSTOM X\n');                       self.parsingAlteration = True@@ -137,4 +145,8 @@               elif line.startswith('('):                       self.output.write(';LAYER:%d\n' % (self.layerNr));                       self.layerNr += 1+                       self.bridgeLayer = False;+               elif line.startswith('('):+                       self.output.write(';BRIDGE-LAYER\n');+                       self.bridgeLayer = True;

     

    along with this config ..

     

    ;TYPE:BRIDGE-FILL M106 S255 ;TYPE:BRIDGE-FILL

    ;TYPE:FILL M107 ;TYPE:FILL

    ;TYPE:WALL M106 S255 ;TYPE:WALL

    ;TYPE:LAYER0-WALL M107 ;TYPE:LAYER0-WALL

     

    I get this fix to the bridging problem

     

    G1 X19.3 Y75.3 E10.4882

    M106 S255 <-- we can turn on the fan

    ;TYPE:BRIDGE-FILL <--- the entire layer's fill is now a bridge fill

    G1 X182.4 Y73.475 F18000.0

    and

     

    M106 S255 <-- fan turns on

    ;TYPE:WALL-INNER

    M107 <--but promptly turns off

    ;TYPE:LAYER0-WALL

     

  • Link to post
    Share on other sites

    Posted · complex replace.csv commands

    btw, any chance you can incorporate these replace entries automatically as checkboxes in the config dialog?

  • 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
        • 18 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...