Jump to content
Sign in to follow this  
thereza

complex replace.csv commands

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

Share this post


Link to post
Share on other sites
Posted · complex replace.csv commands

And I forget, but will those commands disable the fan during bridging? Is there some way to enable it for the bridge?

Thanks,

Reza

Share this post


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.

Share this post


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.

Share this post


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.

Share this post


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!

Share this post


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

 

Share this post


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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Our picks

    • Ultimaker Cura 4.0 | Stable available!
      Ultimaker Cura 4.0 is mainly focused on the improved user interface and cloud integration.
      As always, we want to collect your user feedback for this release. If there are any improvements you can think of, feel free to mention it here and help us to shape the next release.
      • 85 replies
×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!