Why would you want this to be a setting though? Couldn't it just be a numeric input field in the tool panel?
29 minutes ago, ahoeben said:Why would you want this to be a setting though? Couldn't it just be a numeric input field in the tool panel?
That's exactly what I want , using a setting is not the right solution but as I don't know how to implement such type of numeric field in the tool panel it was for me a workaround. In the different plugins there is no sample code to integrate this type of function. I'm just a beginner in Python coding and this type of code is too hight level for me without an existing example.
Edited by CuqCura has many included plugins that you could use as an example. The translate tool has numeric input fields:
https://github.com/Ultimaker/Uranium/tree/master/plugins/Tools/TranslateTool
- 1
Ok it's a little bit more clear now, I can define this windows .. But I still have some problems to understand how the Binding mecanism works between the windows and the main code. Can you help me on this point ?
I have now a control TextField and I can fix the value with the code :
def getDiam(self) -> float:
""" return: Diam in mm.
"""
# get diameter_custom_support as cylinder value
id_ex=0
extrud = Application.getInstance().getGlobalContainerStack().extruderList
DiamCylinder = extrud[id_ex].getProperty("diameter_custom_support", "value")
return DiamCylinder
but how to get back this value form the TextField ?
Edited by CuqIf you put the whole thing up on github, I can help you later this week.
- 1
thanks a lot ...
It's working, but as I m a newbie in Python it's absolutly not
a clean code.. So yes if you can have a look and clean it a little bit or give me some advice it would be very nice :
See my pull request here:
- 1
Ok I will try to modify my present code according to your recommendation.
Thanks a lot for your time and the support you give us
Ok I think I have simplify the source code and based on your recommendation switched to the solution of storing the support size value in Preference "customsupportcylinder/s_size"
CustomSupportCylinder on Github
Edited by Cuq- 1
Cool. Don't give too much credit to lokster; his plugin is 98% my work on the Support Blocker. What you are doing is already much more interesting.
- 1
Ok
I wasn't aware about, that.
Thanks to your help the plugin is now "acceptable". So next step for me: find the solution to create a curapackage. Can you point me to a tuto or document which explain how to do that ?
[Edit] your solution in test https://community.ultimaker.com/topic/26046-writing-a-custom-cura-package/?do=findComment&comment=229467
and : https://github.com/Ultimaker/Cura/wiki/Creating-Packages
But my goal at the end is not necessary to put it on market place. Is it possible just to get the curapackage via this solution ?
Edited by Cuq9 hours ago, Cuq said:Is it possible just to get the curapackage via this solution ?
Yes. You upload a zip containing the source of your plugin, and before you submit it for approval, you can download a curapackage.
Finaly I don't need to go throug the market place. I made the file "manualy" it's working for a basic install on my Cura release 🙂
- 1 month later...
On 5/20/2020 at 9:10 AM, ahoeben said:Cool. Don't give too much credit to lokster; his plugin is 98% my work on the Support Blocker. What you are doing is already much more interesting.
I think I can understand now your remark 🙂 he seem's to be the king of copy/past except for the section "Donate to the plugin developer!" this part of the source code is definitly his own 🤣
Edited by Cuq
Recommended Posts
Cuq 205
So my question is now where can I find a "basic sample code" or how to implement in this plugin a windows to define specific parameters to define the size of this cylinder ? Hereafter a sample view of the expected function to clarify my request.
Link to post
Share on other sites