omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    [Share] a list of rects distributed around 360 degrees

    Pythonista
    circle rects share 360
    5
    44
    28120
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • abcabc
      abcabc last edited by

      I have changed two lines in your program to make it work. See the following gist

      https://gist.github.com/5e7b8beb9a0b35aaafbcd06b0cd30340

      line 81:
      self.degree = 90

      line 183
      self.degree = sender.value *360 -90

      1 Reply Last reply Reply Quote 0
      • abcabc
        abcabc last edited by

        Sorry. Typo. line 103 not 183.

        Phuket2 2 Replies Last reply Reply Quote 0
        • Phuket2
          Phuket2 @abcabc last edited by

          @abcabc , thanks. It makes it work. I was not so worried about that. More worried bout you need to know the math inside to get it to work. The reason I tried -90, was because often from what I can see anyway , the geometry done in Pythonista is based on radians. But the point is does not matter what math you use, but as a consumer of your class, the less I have to know the better. Just because you know the math back the front, nothing to say I should have to know it. But something like degrees is pretty understandable for most people. Again, look it's your code and effort. I am just pushing in the case you want to make consumable class that the majority could use with ease. It's like cooking (which I love) you want as many people as possible to try your food. That's what makes the effort worth while and gives you a buzz when you get it right. I think writing classes/functions here is the same thing. Well, for me it's like that.

          1 Reply Last reply Reply Quote 0
          • Phuket2
            Phuket2 @abcabc last edited by Phuket2

            @abcabc , a small update to the gist. Its not suppose to present an ideal case. But combining the views/funcs can start to get something that looks ok. Have numbers around the outer ring in this example, would look more realistic with major and minor tick marks for example. But for me your circular_slider makes this possible.

            Edit: of course the outter ring not even needed

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors