Extrude edges by Normals?
-
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?
-
Think Projections can do that: http://forums.sketchucation.com/viewtopic.php?f=323&t=20140
-
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?
-
@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...
-
-
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.
-
@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?)
-
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
-
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?
-
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.
-
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
-
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.
-
@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?
-
@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!!!
-
@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.
-
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?
-
@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
-
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.
-
@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
-
Thanks Fredo. It's working now!!!
Advertisement