Guide Points: Dividing a poly-line in even segments
-
Hi guys, have a question about dividing lines into segments. I'm currently using the 1001 tool suite's 'divide selected edge' tool to place guide points on line segments.
This works fine 99% of the time, however it doesn't work on lines that have been welded together. Also, if a have multiple connected line segments of different legnths that aren't in a straight line that I wish do divide evenly, this won't work either.
In short is there a way around dividing a line that has been 'welded' together? I'm guessing SU reads this line a bunch of line segments, rather than one.
-
Have a look at Fredos http://sketchucation.com/pluginstore?pln=BezierSpline (BZ transform).
-
Thanks cotty. ALready use BZ but didn't check out all of the options. Converting any existing lines into polylines didn't quite do the trick. The 1001 guide divider still wont pick it up.
Interestingly, using the BZ polyline divider kind of works but it ultamately simplifies the geometery of the line into segments instead of using guide points. Not the result I'm looking for.
I've attached a image that showcases the issue. The 1001 guide point divider is based off line segments. It won't work on poly-lines to deliver guide points.
Surely they must be a way to place guide points on polylines?
Had a look at TT's Guide tools too but I don't think it offers guides at a particular distance.
-
@shpox said:
Hi guys, have a question about dividing lines into segments. I'm currently using the 1001 tool suite's 'divide selected edge' tool to place guide points on line segments.
This works fine 99% of the time, however it doesn't work on lines that have been welded together. Also, if a have multiple connected line segments of different legnths that aren't in a straight line that I wish do divide evenly, this won't work either.
In short is there a way around dividing a line that has been 'welded' together? I'm guessing SU reads this line a bunch of line segments, rather than one.
I have two plugins, AddPts2Curve and EqSegCurve, on my blog that may be of some use.
AddPts2Curve has two options. One to add points at a given interval along a curve or place a guide point where those point would be located.
EqSegCurve also has two options. The curve can be divided into a given number of segments or segments of a given length.
-
Hi Mitch, thanks for the help. First time I've come across your blog so I downloaded quite a few plugins.
I had some success with addpts2curve, it works great on polylines, but I was wondering about how you would go about doing something like the bookshelf I've attached.
The overall form is easy enough to come up with arcs but I'm not sure about how to segment it evenly.
-
@shpox said:
Hi Mitch, thanks for the help. First time I've come across your blog so I downloaded quite a few plugins.
I had some success with addpts2curve, it works great on polylines, but I was wondering about how you would go about doing something like the bookshelf I've attached.
The overall form is easy enough to come up with arcs but I'm not sure about how to segment it evenly.
Something like this...
- weld the arcs to make a curve and use the Offset Tool to make front and back edges.
- divide the length of the curve, from entity info, by number of desired divisions to get segment length.
- use AddPts2Curve to show points at that interval.
- use Protractor Tool to establish 90 deg guide lines.
- use Pencil Tool to draw segment boundaries.
-
To draw edges between 2 curves (step 5)you could paste this into some Ruby code editor.
Untested..a=Sketchup.active_model;b=a.entities;c=a.selection;d={};c.grep(Sketchup;;Edge).each{|e|if cc = e.curve;next if d.has_key?(cc);d[cc] = cc.vertices.collect{|v| v.position };end};if d.length == 2;crvpt1 = d.values[0];crvpt2 = d.values[1];unless crvpt1.length == crvpt2.length;puts "unmatching points from curves";else;gps = b.add_group.entities;for i in (0...crvpt1.length);gps.add_edges(crvpt1[i], crvpt2[i]);end;end;else;puts "Select only 2 curves, please";end
Edit: Compressed it to 1 line for pasting into Ruby consol..
Advertisement