sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Extrude edges by Normals?

    Scheduled Pinned Locked Moved Developers' Forum
    20 Posts 8 Posters 1.0k Views 8 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.
    • thomthomT Offline
      thomthom
      last edited by

      I've been working on some code for the milling tool plugin that offsets - I could adapt that to a regular offset tool with the option of adding edges between the offset vertices. Might also be able to remove some of the artefacts you get with the SU offset tool in some cases.

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

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Normal pushpull is a little decieveing. If uses the face normal only. But joint pushpull uses a combination of neighboring faces normals, which could also be interpereted as an offset.

        Rick did write an offset.rb that you could look at Adam if you were considering learning some Ruby. It would be more than just tweaking a few lines of code though I think.

        But truth be told it is not the hardest script to write from scratch, if it is only meant to work on a single flat face. Now builing in some solid error checking (to make sure the user only supplies the correct parameters (such as a sigle flat face) might be time consuming to implement). But just a quick and dirty version could be done sort of quickly I would guess.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • EarthMoverE Offline
          EarthMover
          last edited by

          Thanks Thomas and Chris!

          Thomthom, if you had some code you could tweak, that would be awesome. If not, I was thinking about a script that will connect verts on perpendicular edges? I think this would make it more universally useful and for my purpose, I could use the standard offset and run a connect verts scripts.

          I have an upcoming class that I am teaching on Pool and Patio design to landscape designers and a really big part of that workflow is modeling copings, brick borders and stair & wall caps. All of which have joints. I am able to do it with my current techniques, but it's a 5 or 6 step process, and the users I've taught previously, have a really hard time with it. I thought a plugin to simplify the workflow would make life easier.

          Chris, I'd really like to start learning ruby, but I know it will take serious attention and time, which is in short supply these days. It's definitely toward the top of my to do list though.

          3D Artist at Clearstory 3D Imaging
          Guide Tool at Winning With Sketchup
          Content Creator at Skapeup

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

            @earthmover said:

            Thomthom, if you had some code you could tweak, that would be awesome. If not, I was thinking about a script that will connect verts on perpendicular edges? I think this would make it more universally useful and for my purpose, I could use the standard offset and run a connect verts scripts.

            Well, I already had plans to make an alternative offset tool - as I wanted to correct some of the oddities the SU offset tool makes. And I got quite a bit of the code there already. So I will add a version that connects the offset vertices. I have use for such a tool my self anyway.

            "connect verts on perpendicular edges" perpendicular to what? since a vertex is only a point, what would it be perpendicular to?

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

            1 Reply Last reply Reply Quote 0
            • EarthMoverE Offline
              EarthMover
              last edited by

              @thomthom said:

              @earthmover said:

              "connect verts on perpendicular edges" perpendicular to what? since a vertex is only a point, what would it be perpendicular to?

              I guess I should've said, "connect verts using perpendicular edges across co-planar faces." Obviously I'm assuming it would require the same number of divided or offset edges to make it work in a multiple connect situation, if that's even possible without cross connecting triangulation.

              The new offset tool sound great. I am constantly cleaning up the mess left by the standard offset, especially in corners less than 90 degress. If you could somehow solve this issue and add a connecting line option....it would save me so much time!!!


              Connect Verts.jpg

              3D Artist at Clearstory 3D Imaging
              Guide Tool at Winning With Sketchup
              Content Creator at Skapeup

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

                @earthmover said:

                I guess I should've said, "connect verts using perpendicular edges across co-planar faces." Obviously I'm assuming it would require the same number of divided or offset edges to make it work in a multiple connect situation, if that's even possible without cross connecting triangulation.

                Yea - I've been thinking of something like that. It's something I need as well. But I've been trying to make such a thing to versatile. I think it needs to be more specific - like enforcing even number of vertices.

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

                1 Reply Last reply Reply Quote 0
                • EarthMoverE Offline
                  EarthMover
                  last edited by

                  I was looking into how Chris's "Line on Normals" tool functions on edges as another option.

                  I drew a curved shape, divided it into even 6" increments, offset it by 9". The thinking is to use the Line on Normals tool to draw 9" connecting lines between verts or midpoints.

                  What I gather is that for the plugin to work on an edge, a face must be present. The plugin will take the normal information from the face and draw a line of specified length projecting out from the normals. If an edge has two shared faces with different normals, the line will split the difference between those normals. For example the edge on a box has shared faces with a 90 degree difference between normals, so the tool will send out an edge at 45 degrees to meet half way.

                  If I I push pull up the offset center face, I could delete the horizontal planes and send out lines on the normals of just the vertical planes. Clicking on each vertex would allow me to manually draw out my connecting lines one at a time. Definitely more time consuming, but might be useful in some situations. Chris could maybe consider adding an option to favor vertical or horizontal in the case of shared edges?


                  line normals w faces.jpg


                  line normals w faces removed.jpg

                  3D Artist at Clearstory 3D Imaging
                  Guide Tool at Winning With Sketchup
                  Content Creator at Skapeup

                  1 Reply Last reply Reply Quote 0
                  • fredo6F Offline
                    fredo6
                    last edited by

                    @earthmover said:

                    I am trying to figure out a simple script the either offsets a shape and draws a line between the original vertex and the new offset vertex.

                    As an interim solution, you could use the offset of ToolsOnSurface, which also works on flat faces.
                    The current version does not generate the vertex-to-vertex lines.
                    To do so, you would need to comment out the line 1169 ( cleanup_colinear(g.entities, lstfaces)) in the file OffsetAlgoOnSurface.rb.

                    In a next version, I will offer the option in the button palette.

                    Fredo

                    1 Reply Last reply Reply Quote 0
                    • EarthMoverE Offline
                      EarthMover
                      last edited by

                      Thanks Fredo!

                      It doesn't seem to be working for me. I added a # symbol in front of the line of code you said. Is that what you mean by "comment it out"? I also tried removing the line of code, saving and restarting SU, but no luck.

                      Any help would be great.

                      3D Artist at Clearstory 3D Imaging
                      Guide Tool at Winning With Sketchup
                      Content Creator at Skapeup

                      1 Reply Last reply Reply Quote 0
                      • fredo6F Offline
                        fredo6
                        last edited by

                        @earthmover said:

                        Thanks Fredo!

                        It doesn't seem to be working for me. I added a # symbol in front of the line of code you said. Is that what you mean by "comment it out"? I also tried removing the line of code, saving and restarting SU, but no luck.

                        Any help would be great.

                        Yes, # in front of the line should make it.
                        It only works if you offset toward the outside, when the script has to create faces.

                        Fredo

                        1 Reply Last reply Reply Quote 0
                        • EarthMoverE Offline
                          EarthMover
                          last edited by

                          Thanks Fredo. It's working now!!! 👍

                          3D Artist at Clearstory 3D Imaging
                          Guide Tool at Winning With Sketchup
                          Content Creator at Skapeup

                          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