Jump to content
Ultimaker Community of 3D Printing Experts

Kin

Member
  • Content Count

    36
  • Joined

  • Last visited

Everything posted by Kin

  1. from ..Script import Script import re class share_Wipe(Script): version = "3.2" def __init__(self): super().__init__() def getSettingDataString(self): return """{ "name":"share Wipe """ + self.version + """", "key":"share_Wipe", "metadata": {}, "version": 2, "settings": { "machine_type": { "label": "Machine Type", "description": "Select which machine type you are using. CRITICAL!", "type": "enum",
  2. Thanks again for finding the issue I had! I imagine the criteria in .search are more familiar for traditional programmers. It sounds like regular expressions section of the python documentation I need to get more background on. I had quite a hard time understanding how to parse the difference between your search criteria and the default criteria. That is, between re.search('^[0-9]+\.?[0-9]*', sub_part) and re.search('^[-+]?[0-9]*\.?[0-9]*', sub_part) In fact, at first I was sure you had a typo with * vs +, but I understand a bit better that the characters are shorthand for a number of ca
  3. Seriously, you're amazing. I am grinning, as this has been a lonnnggg struggle for some simple functionality, but totally worth it (selective memory?) I admit I looked into getValue to even confirm how it was working, but balked at trying to understand the .search functionality (embarrassed to say.) I will now make sure I fully understand that code and your version.
  4. So I think I finally have a reasonable proto that works-almost. It seems reliably to add the gcode and resume the z height, for every layer except layers 0 and 1. In those two layers the gcode first line is not "G1" or "G0" but rather M106 or M106 and M107. I can't confirm that is the problem but it's the only thing I can notice different about those layers (and that my code doesn't start in earnest until after it passes "layer:0".) In my code I believe I should be resolving those cases of M106 and M107 by iterating linewise until I find a G1 or G0 command, but the behavior doesn't seem to f
  5. Heh, I am still chugging away at this. In the past I would have used raw file manipulation, but here I'm trying to build this properly as a cura gcode script. That said, I am thinking I basically don't know where the functionality is even coming from. Like, I am not clear on how cura expects the data input to be formatted (I can mimic the basic integer and yes/no inputs from example scripts) and even am not 100% certain how functionality like "for layer in data" work. I mean, I get that I am cutting the dataset apart(by layers? using the "LAYER:" key I assume?), but I don't even know what stru
  6. So Dahai, thanks again for all this help. I definitively have been struggling with this more than most simple projects, probably because I can't see my errors well. I think in your last post, you made me realize python is supposed to use four spaces over the tab notation, per some convention. I used the "untabify" type function of notepad++ to do that, and ran through everything. "return data" is supposed to be four spaces indented of "def execute" I think... Am I missing something there? When I do that, I still can't get cura 2.3 to load the script. UPDATE: Just kidding! Untabify, looking mor
  7. You are a wonderful saint. Can't tell you how frustrated I was getting and confused! It's just that I feel I couldn't understand where I was going wrong, since this was such a simple protoscript. Now I look forward to really fleshing this out into a useful script. Thank you!
  8. Heyo, six hours in, kind of certain my error is basic in nature. Not really sure what it is though. I can't get the script to show up, so I think I'm doing something wrong. Been trying to do things like "work from base case up" in terms of modifying the existing scripts into doing what I want them to. But besides the fact cura takes 20ish seconds to startup on my computer, it's been slow and not very effective to understand what kind of issue I am seeing. I'm hoping it won't take too long for someone to be able to redirect me where I'm probably doing something obviously wrong. Sidenote:
  9. So I started working on this again this weekend, and I do find the basics to be approachable. I am a little confused about how to "load" the plugin. I thought if the .py was saved in the plugins folder, it would be automatically loaded. But I don't see my script when I open cura. I assume this means I have an error in my script format, but it seems at first few glances correct, although I am an amateur. Is there a better way to understand how to load a custom plugin, or where I might find an error log of that process? Thanks! Updates: So far I have found I can tweak an existing working scr
  10. Thanks DaHai8! So it sounds like there isn't any particular functionality built into cura for the plugins, and I'll just be parsing the gcode with standard python string parsing tools? I think I will take a closer look at the example scripts, thank you. This should be doable I suppose, even if my solution isn't very robust. Thanks!
  11. Hi! I have the code I would like to introduce between every layer change on my gcode. It's a nozzle wipe, ideally I'd have a way to do every "X" layers, or something like that, but every layer is great start. My understanding is that Cura doesn't have this functionality built in to the user-side (Simplify3D does, and Slic3r does), but I would suspect it's a semi-common need. Would anyone have such a plugin already, or something they'd recommend I try repurposing? I can write some python, though not an expert, but I don't really have any idea of the format for Cura plugins (especially as I
×
×
  • Create New...