sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Odd results from add_circle/add_face combo

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 6 Posters 585 Views 6 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.
    • sdmitchS Offline
      sdmitch
      last edited by

      As you probably know, add_circle does not automatically create a face so typically you would follow it with an add_face using the edges produced by the add_circle. However, if the added circle is be totally within the bounds of and on the same plane as an existing face, neither the circle or face is created.

      Example 1: Circle is placed at center of selected face. Nothing is added to the model.face on face 1.jpg

      Example 2: Circle is placed at the corner of the selected face. New edges and face is added to the model.face on face 2.jpg

      Oddly enough, the corner of the original face that falls within the circle, appears to be part of both faces as it is part of the selection when the face within the circle but outside the original face is selected or the original face is selected.

      Nothing is worthless, it can always be used as a bad example.

      http://sdmitch.blogspot.com/

      1 Reply Last reply Reply Quote 0
      • S Offline
        slbaumgartner
        last edited by

        Odd indeed! I can't reproduce example 1. Here's what I got

        Screen Shot 2015-03-30 at 12.17.58 PM.png

        1 Reply Last reply Reply Quote 0
        • sdmitchS Offline
          sdmitch
          last edited by

          @slbaumgartner said:

          Odd indeed! I can't reproduce example 1. Here's what I got

          [attachment=0:2xx35ukp]<!-- ia0 -->Screen Shot 2015-03-30 at 12.17.58 PM.png<!-- ia0 -->[/attachment:2xx35ukp]

          Did you use my code or some of your own?

          mod = Sketchup.active_model
          ent = mod.active_entities
          sel = mod.selection
          f=sel.first
          c=f.bounds.center
          n=f.normal
          e=ent.add_circle c,n,24,12
          f=ent.add_face(e)
          
          

          Nothing is worthless, it can always be used as a bad example.

          http://sdmitch.blogspot.com/

          1 Reply Last reply Reply Quote 0
          • D Offline
            driven
            last edited by

            works for me using your code...

            I'm using SUv15 on a mac and so is Steve...

            also tested v8, v13, v14 and it works on all...
            john

            learn from the mistakes of others, you may not live long enough to make them all yourself...

            1 Reply Last reply Reply Quote 0
            • jiminy-billy-bobJ Offline
              jiminy-billy-bob
              last edited by

              Win7, SU15.

              http://i.imgur.com/chFdio2.png

              25% off Skatter for SketchUcation Premium Members

              1 Reply Last reply Reply Quote 0
              • sdmitchS Offline
                sdmitch
                last edited by

                Well I don't know what to say. I have tried this on both v8 and v2014 and it fails every time. Perhaps it has something to do with Windows Vista. I would appreciate any other Vista users out there to try this and report their results.

                Nothing is worthless, it can always be used as a bad example.

                http://sdmitch.blogspot.com/

                1 Reply Last reply Reply Quote 0
                • S Offline
                  slbaumgartner
                  last edited by

                  @sdmitch said:

                  Did you use my code or some of your own?

                  Your code. Very strange!

                  1 Reply Last reply Reply Quote 0
                  • jolranJ Offline
                    jolran
                    last edited by

                    Doesent work for me either when running in SU8 and Alex Ruby code editor. BUT it does work from the Ruby consol pasted as a oneliner(semicolons).

                    So... maybe some hickup in the webdialog...

                    1 Reply Last reply Reply Quote 0
                    • sdmitchS Offline
                      sdmitch
                      last edited by

                      This just keeps getting more bazaar. The code works when pasted into Ruby Console but fails when executed from Ruby Web Console.

                      I first noticed this in a plugin I was creating and I had to skip the add_face if I was on a face to get it to work.

                      I just created a new simple plugin that accepts a center point and a point on the circle and it works without fail on a face or off. The only real difference in the two plugins is a start_operation and commit_operation statements.

                      Remembering these have caused be trouble in the past, I removed them from plugin that was failing and that cured the problem. So the moral of the story is, if strange things are happening with a plugin, remove the start/commit statements and see if it goes away.

                      Nothing is worthless, it can always be used as a bad example.

                      http://sdmitch.blogspot.com/

                      1 Reply Last reply Reply Quote 0
                      • thomthomT Offline
                        thomthom
                        last edited by

                        2015-04-06_21h44_53.png

                        For for me as well - SU2015 Win8.1.

                        Have you tried with extension disabled?

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

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

                        Advertisement