Jump to content
Ultimaker Community of 3D Printing Experts

CustomSupportCylinder


Cuq
 Share

Recommended Posts

Posted (edited) · CustomSupportCylinder

Hello,

 

I'm working on a plugin based on the CustomSupport plugin. But in this case I'm not creating a cube but a cylinder.  I haven't any problem to get the right length ( from the picked point to the base) but I wanted to define the radius as a parameter in order to be able to customize this value.  Is it possible to add a customized value ? or to get an existing value for this parameter Ie : support_conical_min_width ?

CustomSupporCylinder.thumb.jpg.3455b705237de168be09304daa44d200.jpg

Cylinder.zip

Edited by Cuq
change text
  • Like 2
Link to post
Share on other sites

Posted (edited) · CustomSupportCylinder

temporary solution : using the value of support_tower_diameter  (Support as Tower diameter) as Cylinder diameter:

        # get support_tower_diameter as cylinder value
        id_ex=0
        extrud = Application.getInstance().getGlobalContainerStack().extruderList
        DiamCylinder = extrud[id_ex].getProperty("support_tower_diameter", "value")

 

Edited by Cuq
  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    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.

    modif.JPG

  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    Step by Step thanks to the plugin ZOffset  I found  a solution to define a new parameter. Still looking to define this value via a dedicated windows

    ParametreDiam.jpg

  • Link to post
    Share on other sites

    Posted (edited) · CustomSupportCylinder
    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 Cuq
  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    Cura 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

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · CustomSupportCylinder

    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 ?

    valid.jpg

     

    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 Cuq
  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    If you put the whole thing up on github, I can help you later this week.

    • Thanks 1
    Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    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 :

     

    The plugin source code on Github

  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder
    Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    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

     

  • Link to post
    Share on other sites

    Posted (edited) · CustomSupportCylinder

    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
    • Like 1
    Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    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.

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · CustomSupportCylinder

    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 Cuq
  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder
    9 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.

  • Link to post
    Share on other sites

    Posted · CustomSupportCylinder

    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 🙂 

    CustomSupportsCylinder1.0.0-sdk7.0.0.curapackage.zip

  • Link to post
    Share on other sites

    Posted (edited) · CustomSupportCylinder
    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
  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 11 replies
    ×
    ×
    • Create New...