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

    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.
    • EarthMoverE Offline
      EarthMover
      last edited by

      In my design work, I do a lot of brick borders and coping around pools. Right now the method I use for this is typically either Chris's shape bender or Rick Wilson's copy along a path script. It occurred to me recently that a more efficient method would be to be able to Scale / Extrude / Offset a divided polyline along it's X,Y normals and retain a connecting line between verticies. If I draw out an organic pool shape, weld it and then use Fredo's Polyline Divider to divide the Curve by the width of my brick, I could potentially Scale, Offset or Extrude the line inward by the length of my brick and leave me with my coping. Obviously, there would be other uses for a tool like this, but for me that would be the most beneficial application. In 3ds Max, this is done by selecting an edge loop and holding shift while scaling, which scales in a copy of the edges and creates a polygon and a new set of support edges.

      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. Another option would be a script that scales a copy of edges, or another way would be an extrude lines along their normals script. None of which I could find in existence. Didier's Extrude lines script comes close, but it extrudes along the Vector of a line and not the normals.

      Can anyone help me find a script, or help me with some code that would make this possible?


      Extrude Edges by Normals.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

        Think Projections can do that: http://forums.sketchucation.com/viewtopic.php?f=323&t=20140

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

        1 Reply Last reply Reply Quote 0
        • M Offline
          MartinRinehart
          last edited by

          How about a model or screenshot that shows what you want in 3d?

          Am I right in assuming that you want actual bricks, not a material?

          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

          1 Reply Last reply Reply Quote 0
          • K Offline
            Khai
            last edited by

            @thomthom said:

            Think Projections can do that: http://forums.sketchucation.com/viewtopic.php?f=323&t=20140

            uh uh.. it was requested for it tho...

            1 Reply Last reply Reply Quote 0
            • simon le bonS Offline
              simon le bon
              last edited by

              Hi Adam (EarthMover)

              There must be various solutions for such needing: here the first solution I've in mind 😉


              http://i274.photobucket.com/albums/jj245/Spendauballet/SketchUp/EEBN001_th.jpg

              a fairly flexible method I think..


              http://i274.photobucket.com/albums/jj245/Spendauballet/SketchUp/EEBN002_th.jpg

              A god damn "allbrokenUp" happy new year for any SCF friend, their family and who they loved,

              Simon.
              (I am now inventing english words 🤣 )

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

                The extrude lines in projection tools extrudes along the vector.

                Martin, thanks for the interest. Minimally, I just basically want to be able to offset a face and have the line retained between the original and offset verticies.
                Ideally a scale extrude tool would have a broader benefit for other modeling tasks.

                I don't have a 3D example as there is no tool to do this..to my knowledge. I quickly did it in 3DS max to illustrate what I am talking about.

                EDIT - That's funny Simon, I was just sitting here doing the same thing as you are showing, but instead of JPP I just push pulled a copy up, scaled it in and then moved the new face back down, unsoften edges for the same result.


                click for animated gif

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

                1 Reply Last reply Reply Quote 0
                • GaieusG Offline
                  Gaieus
                  last edited by

                  @earthmover said:

                  EDIT - That's funny Simon, I was just sitting here doing the same thing as you are showing, but instead of JPP I just push pulled a copy up, scaled it in and then moved the new face back down, unsoften edges for the same result.

                  Exactly the same method came to my mind - but then read your post and now won't try (or will I?)
                  😉

                  Gai...

                  1 Reply Last reply Reply Quote 0
                  • simon le bonS Offline
                    simon le bon
                    last edited by

                    HeHe, Adam and Gai..,

                    We have to do quick in this place with such many experienced users 😆

                    But I think a remark must be told:
                    On a complex curved shape,( as a letter for example) an offset doesn't give the same result as a scale.

                    And as I can understand the process, Joint PushPull works as an offset operation

                    +++Simon

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

                      I think you are right about that Simon. Truth be told, I think offset is more in line with what I would need as even extruding by normals in theory would leave gaps between the edges. Looking at both JPP and NPP, you can definitely see the difference.

                      I think this method will work for what I need, but it will definitely be a lot more steps than I had hoped for.

                      Is there any code tweak I could do that would simply retain a connecting line between verticies using a standard offset?

                      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

                        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