Extend by amount plugin
-
At a rough guess from your image, Tigs smart offset might help you.
-
@box said:
At a rough guess from your image, Tigs smart offset might help you.
The should work independently from the presence of a face and with unconnected lines too
-
@camoncamon2001 said:
Hi to all!
I'm searching for a plugin that extend multiple lines at once in his vector direction and in both sides with a predefined amount as in attached image.
Does anyone knows something like this?
Thanks in advance.
CCSketchup won't let you "extend" an edge associated with a face because it automatically breaks lines where they cross. The extension will have to be an added edge at each end point like this.
mod = Sketchup.active_model ent = mod.active_entities sel = mod.selection unless sel.empty? dst = UI.inputbox(["Extend;"],['1'.to_l],"Extend all Edges") if dst sel.grep(Sketchup;;Face){|fac| fac.edges.each{|e| sp,v=e.line;ep=e.end.position ent.add_line(sp,sp.offset(v,-dst[0])) ent.add_line(ep,ep.offset(v,dst[0])) } } end end
-
@sdmitch said:
@camoncamon2001 said:
Hi to all!
I'm searching for a plugin that extend multiple lines at once in his vector direction and in both sides with a predefined amount as in attached image.
Does anyone knows something like this?
Thanks in advance.
CCSketchup won't let you "extend" an edge associated with a face because it automatically breaks lines where they cross. The extension will have to be an added edge at each end point like this.
[attachment=0:22irlvoa]<!-- ia0 -->Extend Edges.gif<!-- ia0 -->[/attachment:22irlvoa]mod = Sketchup.active_model > ent = mod.active_entities > sel = mod.selection > unless sel.empty? > dst = UI.inputbox(["Extend;"],['1'.to_l],"Extend all Edges") > if dst > sel.grep(Sketchup;;Face){|fac| > fac.edges.each{|e| > sp,v=e.line;ep=e.end.position > ent.add_line(sp,sp.offset(v,-dst[0])) > ent.add_line(ep,ep.offset(v,dst[0])) > } > } > end > end >
Great! How to use with separate lines, not face?
-
For Edges
mod = Sketchup.active_model ent = mod.active_entities sel = mod.selection unless sel.empty? dst = UI.inputbox(["Extend;"],['12'.to_l],"Extend all Edges") if dst sel.grep(Sketchup;;Edge){|e| sp,v=e.line;ep=e.end.position ent.add_line(sp,sp.offset(v,-dst[0])) ent.add_line(ep,ep.offset(v,dst[0])) } end end
-
Thank you! Perfect!
-
Would it be possible with a version that extended edges on faces like in this image to quadify surfaces?
Let's say you have a wall with a door and some windows.
The script would try to extend edges to outer loop.
Inner loops would try to find closest point.
Hopefully resulting in a quad face surface. -
@pixero said:
Would it be possible with a version that extended edges on faces like in this image to quadify surfaces?
[attachment=0:311e78k8]<!-- ia0 -->wallsegments2.jpg<!-- ia0 -->[/attachment:311e78k8]Let's say you have a wall with a door and some windows.
The script would try to extend edges to outer loop.
Inner loops would try to find closest point.
Hopefully resulting in a quad face surface.Looks simple enough but IMHO virtually impossible to code.
-
Would it be possible to make it simpler with just extending edges until it meets a edge?
For a case like in the image above that would work for all but one. (The diagonal edge.) -
@pixero said:
Would it be possible to make it simpler with just extending edges until it meets a edge?
For a case like in the image above that would work for all but one. (The diagonal edge.)Yes, it is the diagonal edges that complicate the problem but I'm still thinking about it.
Advertisement