• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Add_arc etc.

Scheduled Pinned Locked Moved Developers' Forum
26 Posts 7 Posters 2.1k Views 7 Watching
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.
  • H Offline
    honkinberry
    last edited by 14 Mar 2013, 21:14

    Those are the values from the Arc in AutoCAD.
    If the Start is roughly 270 degrees, and the End is roughly 90 degrees, that is a D shape, not a C shape.
    Angles accrue in counter-clockwise fashion, yes? So from Start angle, one begins slowly spinning in a counter-clockwise fashion until reaching the End angle.

    --J

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 14 Mar 2013, 21:39

      Yea, it seems to be counter-clockwise - and then the C-shape makes sense. If you use the Protractor and uses the same angles to add guides, then adding then counter-clockwise from the X-axis places them exactly where add_arc draws the arc.

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • H Offline
        honkinberry
        last edited by 14 Mar 2013, 22:14

        I'm sorry, I'm just not following.
        I'm Susan, I'm standing at the origin, and I'm pointing at at object down the negative Green axis, at 270 degrees relative to me. It is a car, and it is driving in counter-clockwise circle around me. As it drives counter-clockwise towards a point located at my 90 degrees, the resultant path it drew was a D shape, not a C shape.

        I've dealt with arcs extensively with AutoCAD, and as I said, this is just taking the exact arc in AutoCAD and recreating here in SketchUp. But some of my arcs are getting reversed, and I can't figure out what I'm supposed to be accounting for.

        --J

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 15 Mar 2013, 09:40

          Right, I see.

          Maybe SketchUp normalize the start and end angle - because swapping the values around creates the same arc. ??

          You might have to use negative angles.


          add_arc.png

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • H Offline
            honkinberry
            last edited by 15 Mar 2013, 16:22

            Ah, I'm starting to get it.
            I made the same mistake when I was a 19 year-old programmer.
            If the arc crosses 0 degrees, it will get reversed.
            So you're right, Sketchup is sort of normalizing the arc. Or put more accurately, it's a bug -- it assumes the start angle to be less than the end angle.
            So easy enough fix -- if (start > end) start = start - 360.degrees
            Thank you sir!

            --J

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 18 Mar 2013, 14:00

              Probably be good to make a wrapper for the add_arc method.

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 2 / 2
              2 / 2
              • First post
                23/26
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement