Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP refactor of the profile generator #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kirberich
Copy link

Hi,

I've been spending some time over the last two weeks trying to refactor the profile generator with a slightly more modular approach - this is currently only done for Simplify3D profiles, but the idea is that the same logic can be reused for Cura as well, cutting down on a lot of duplication in the code. It brings in a dependency on Jinja2 to render profiles, keeping the rendering separate from the logic.

I've made some successful single extrusion prints with results from the refactored generator, but there are some differences in some calculations that make the results difficult to compare to the original.

I'm putting this up here mostly as a starting point for a discussion - it'd be quite difficult to actually merge this as it is, as there are a lot of potential regressions. So mostly I wanted show this around to see how you feel about this and to ask for some help concerning some of the calculations that might currently be wrong because I'm lacking some context.

Some notes:

  • My code doesn't use the synchronised heating sequence - the code is very complicated and I didn't want to get too distracted. I'd be curious to know the reasons behind trying to bring everything to temperature at the same time (my code just heats up everything at the same time)
  • The original code sometimes uses layer height references specific to one extruder, even if that layer height isn't used (as the smaller layer height always gets picked). Because of this, my code currently sometimes produces invalidly high flow values for the lower-quality settings.
  • I've only tested the code with my current printer configuration (0.4mm left, 0.6mm right)
  • I think some of my speed calculations are off - dual extrusion prints slow down to a crawl probably because of some wrong maths on my part. Any feedback on the speed/temperature/etc calcs would be hugely appreciated.
  • I made the mistake of basing my work on master rather than development. I'll try to update it for the new changes in development, but I think this might turn out to be quite tricky
  • I'm not sure I understand the logic for fan speeds - they seem to go up linearly with the print temperature, but my understanding was that for materials like PLA, more fan is almost always better.

Please let me know what you think! Again I don't think this should be merged as it is, but hopefully if I can get some more context I can make my code behave just like the old code, integrate changes from the development branch, and add cura profile generation, to bring it to a state where it can be merged.

This is a first attempt at refactoring the S3D profile code into a more modular approach. The next step after this would be to integrate the current cura code into the same data models, so that the only difference between S3D and cura is in the templates used.

This introduces a new requirement, using Jinja to render the output files.

This is still work in progress, there are several open questions and bugs in the output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant