sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Soften coplanar ?

    Scheduled Pinned Locked Moved Developers' Forum
    22 Posts 4 Posters 3.4k Views 4 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.
    • jolranJ
      jolran
      last edited by

      fill_faces_from_mesh ? Typo ?

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

        2 | 8
        Expression it is! Yei! It works.

        1 Reply Last reply
        Reply Quote 0
        • Dan RathbunD
          Dan Rathbun
          last edited by

          | is the Integer BITWISE OR operator (really method name.)
          Both subclasses ( Fixnum & Bignum) have this method.
          see:
          http://www.ruby-doc.org/core-1.8.6/Fixnum.html#method-i-7C

          πŸ€“

          I'm not here much anymore.

          1 Reply Last reply
          Reply Quote 0
          • Dan RathbunD
            Dan Rathbun
            last edited by

            Also there are many API methods that allow bit mask Integer arguments, where you can combine different bit flags using **|**.

            Some are not documented, like the 2nd arg to UI.messagebox can also (in addition to the button flag,) be OR'd with an icon integer flag that sets which standard icon (or none,) is displayed in the messagebox.

            I'm not here much anymore.

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

              ahh, nice info. I've used bitwise in JavaScript ( for performance reason ). Good to know they work in Ruby as well.

              @unknownuser said:

              Some are not documented, like the 2nd arg to UI.messagebox can also (in addition to the button flag,) be OR'd with an icon integer flag that sets which standard icon (or none,) is displayed in the messagebox.

              How the heck do you guys know all this ? πŸ˜„
              Must spend a lot of time experimenting outside the docs..

              1 Reply Last reply
              Reply Quote 0
              • tt_suT
                tt_su
                last edited by

                Heh! Docs? The docs where in a very poor state five/size years ago. Poking about was the way to go.
                (Not saying that the docs now are "good" or anything though... ...just that they where a lot worse.)

                1 Reply Last reply
                Reply Quote 0
                • tt_suT
                  tt_su
                  last edited by

                  @jolran said:

                  fill_faces_from_mesh ? Typo ?

                  Yes - should be "fill_from_mesh". 😳 Just love the consistency of the Ruby API naming... πŸ˜’

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

                    @unknownuser said:

                    Yes - should be "fill_from_mesh". 😳 Just love the consistency of the Ruby API naming... πŸ˜’

                    I had to ask, thought there where some new hidden stuff πŸ˜„

                    1 Reply Last reply
                    Reply Quote 0
                    • tt_suT
                      tt_su
                      last edited by

                      Yes, you never know.

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

                        entities.fill_from_mesh(mesh, true, 2 | 8) is working nicelly, but a small gotcha..


                        %(#FF0000)[mesh.add_polygon(1,2,3)
                        mesh.add_polygon(2,3,4)]

                        Does gives hard edges, as expected.

                        %(#FF0000)[mesh.add_polygon(1,-2,3)
                        mesh.add_polygon(-2,3,4)]

                        gives hard soft edge between Points 2, as expected.

                        but so does this:

                        %(#FF0000)[mesh.add_polygon(1,2,3)
                        mesh.add_polygon(-2,3,4)]

                        or

                        %(#FF0000)[mesh.add_polygon(1,-2,3)
                        mesh.add_polygon(2,3,4)]


                        So I'm starting to see some trouble with this method. To be able to stear edge visibility one need to use 2 Points in comparison. For ex a Collection of edge.start and end positions.
                        For a triangulated quad this works but not if the face has innerloops,
                        Or faces where triangulation is splitting the face without hitting innerloops.

                        Was to fast here..
                        The docs actually explains this behavior, "value of [-1, 2, 3] indicates that the edge from 1 to 2 is hidden"

                        1 Reply Last reply
                        Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better πŸ’—

                        Register Login
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement