Plugin wouldn't be the best way to do it. This is a change that is best with the cura engine. It would also need some GUI changes, as you want to tell the slicer the resolution for certain heights.
Plugin wouldn't be the best way to do it. This is a change that is best with the cura engine. It would also need some GUI changes, as you want to tell the slicer the resolution for certain heights.
thanks for the input guys, a mod to the cura engine was my next though. potentially it would be much better and easier for people to use if done correctly. then I would not have to worry about the different layers being multiples of each other. I haven't looked at the source code yet but im going to have a look and see what I think I can do.
Not a feature of Cura Pink Unicorn?
Not a feature of Cura Pink Unicorn?
that's a good point. that would be nice. although it would give me something to do if it isn't haha
I'm looking at the python code now and I think it can be done. I will have to alter the GUI and get the slice engine to look for multiple layer thicknesses but I'm fairly confident at this stage.
I'll update my progress as I make it.
It's not planned for pink unicorn to have multiple layer heights, but everyone is free to submit a pull request.
well I've done the easy bit, I've added 3 fields to the expert config dialog box.
alternate layer thickness, lower z value and upper z value of where the change occurs.
also added a checkbox to the BasicQuality section to toggle the alt layer expect setting on and off.
just need to make it work... a job for another night I think!
Hi Nebby85,
I started Swap at Height plugin and it does support layer height changes:
http://umforum.ultimaker.com/index.php?/topic/7290-new-plugin-swap-at-height/
Its still under dev. I need to integrate a change tonight in regard to layer heights specifically. Basically you swap with a previously saved gcode for the given z. Check the thread for the specifics.
I hope this can help.
thanks pm_dude,
I did read your thread before I made mine and this would definitely do the trick. I must admit I don't like the "Frankenstein" idea but it would most certainly work and is a clever idea. I think that Dim3nsioneer and nallath are right though, it needs to be done in the curaengine not as a plugin. it would be neater and more user friendly if I can get it right. I may even be able to incorporate the different infill % at the corresponding layer thickness. hmmm you have me thinking now... I am liking this idea muchly... though I did see that gr5 commented saying that the infill % change was going to be in the pink unicorn.
In PU there will be settings per object but its not clear (at least not confirmed by Daid) that change at any given heights will be possible.
I have submitted the changes needed to better handle the height differences.
I agree that this should be done in CuraEngine but in order to allow for any given set of parameters to be changed it would be a huge chunk to change. Therefore doing it as a post process seemed like the easiest way to go.
In PU there will be settings per object but its not clear (at least not confirmed by Daid) that change at any given heights will be possible.
No, in PU currently there is no option to change a setting at a certain height. This requires more engine work.
(The engine and the backend code can set settings per object, or sub-part of objects, but there is no frontend to do this in yet. Except for which extruder to use for which object/part)
ah that's an idea... there's me thinking of setting a specific z range for changes but of course the key is multiple objects or parts, though for my idea to work the join needs to be a straight horizontal cut (this would be perfect of pm_dude's infill change too). I'm not using dual extrusion so the thought never crossed my mind. though I can foresee that a decent amount of frontend work would need to be done in order to get something like this working.
Daid you are a Genius!
too many ideas... where to begin... not only that all this code is new to me and after staring at it for a few hours its like looking at hieroglyphics haha
is there an ETA on PU??
is there an ETA on PU??
Nope. I'm doing small things on it, but my main priorities are elsewhere right now.
I'm a little rusty with the code and its taking me a while to figure out what's what! haha
I'm just brainstorming here,
I think I need to get the merge function happening with only one extruder and have extra conditioning to suit the use of one extruder with the merge option when multiple settings are required. I can't find in the code where the merge function is called. From what I can tell in the code in the merge function actually creates a single object from 2 objects.
my problem at the moment is trying to locate the relevant bits of code to alter and add to. I don't think the Curaengine will need touching just the python code that sends the parameters to the engine. actually maybe not, as the engine uses the extruder count to know which part to create gcode for... so a minor change. maybe something like an extra parameter from the python script to the engine to allow for one extruder but multiple parts with different parameters. (I'll stick with 2 for now)
Then I would need the engine to use the different properties for these parts. This should be relatively simple as I think the engine gets the parameters for each part it sends through for processing. Therefore depending on which part is being processed at the time I could have a condition for choosing the correct layer thickness and infill percentage. these extra parameters would have to be sent to the engine and then processed by the engine I think.
In summary, I can manipulate the GUI no problem and I found were the python code determines the number of extruders used by the machine. However, I need to find the code that calls the merge option and [found it] where the engine calls the layer and infill parameters cos for the life of me I can't seem to see them.
I'm still looking into this, I will admit I'm having trouble. I am an engineer not a software programmer everything I know about scripts is self taught.
I think I've worked out how the engine knows which extruder to use but I'm only guessing based on the way the python code send the info to the engine. I haven't looked to much at the engine itself, mostly as I don't want to edit it if I don't have to. From what I can tell the objects in the scene are stored in an array or list as an object list with a mesh list within each object. if the dual or multiple extrusion merge is used then the 2 objects are joined creating 2 mesh lists within one object. I'm assuming this is how the engine knows which mesh is which and chooses the tool number to suit.
am I on the right track?
so far all I've done is create an option on the scene right click that instead of a dual extruder merge there is a part merge (which works the same way at the moment) but its based on an extra variable. the GUI alteration I've done is that you can select how many parts. if it is greater than 1 then dual/multi extrusion is disabled this will then give you the right click option of merging the objects. also when the part number is > 1 the extra layer height and infill options appear. but so far they are just hollow promises! :mrgreen:
does anyone have any ideas? I'm just hoping PU isn't changing all this too much making it obsolete
I don't expect one python line to be the same in traditional Cura and PU. Daid really began from scratch again with PU.
The CuraEngine is much more future-proof. I recently saw Daid submitting changes to both the master and the PU branch of the CuraEngine.
ah ok well I might just quit now and wait and see.
maybe I'll just focus on what to print next for now!
On the other hand I also don't expect PU to be released anytime soon with Daid being assigned to the UM2 dual extrusion development. I'm pretty sure that Cura 14.09 is not the last version with the present GUI.
ok kool, well I don't think I'd be able to switch my brain off from it anyway... I spend 3 weeks at a time away from home where my printer and only one week at home before returning to work. So other than that, drawing something else to print the only thing I can do is read thousands of lines of code lol
Recommended Posts
Dim3nsioneer 558
Yes, you're right. Cura plugins are postprocessing scripts. And it may be indeed very difficult to write such a plugin. I also had planned something similar in the past. However, after having had a look at the Curaengine source code I think it should be possible to implement height dependent layer width. But not too soon.
Link to post
Share on other sites