Jump to content
Ultimaker Community of 3D Printing Experts
Sign in to follow this  
thereza

complex replace.csv commands

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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

 

Share this post


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
Sign in to follow this  

×

Important Information

Terms of Use Privacy Policy