RDS Casa Posted March 17, 2018 Share Posted March 17, 2018 Hello, I need a script that take a lot of lines, and extends their length slightly. I'm not that far away I think. I hope there would be a set line length node... i.e just like if you select a single line, go to the OIP, put it on the polar display, keep the centre line fixed and put + 10 or whatever in the length. This keeps the centre in the same place, keeps the angle the same, but extends the length. So I can find a get line angel node, get line centre node, But the set line node is based on an start point and and point. I guess its possible to set the new points based on a trigonometric function from the centre point and the angle? but it must very close to 20 years since I did trigonometry!!! any simpler suggestions gratefully received. The reason I'm doing this is I need to tidy up a messy output drawing where hundreds of shapes are made up of lines and arcs BUT some of the lines don't quite touch (.0001mm) so I can't use compose. My plan is to make the arc sweeps longer (I've got this working thanks to some fantastic help from @Kevin McAllister on a different but similar problem) and make the lines 1% longer (keeping their centres and angles), and then create a closed polygon using the combine into surface paint bucket tool. The last stem is manual, but that's not the end of the world. If I'm missing any tricks, do please let me know. Thanks Rob Quote Link to comment
Kevin McAllister Posted March 18, 2018 Share Posted March 18, 2018 How about just scaling the lines by a small percentage so they overlap? Attached is a file with an example network. The scale factor is set up how Vectorworks thinks, where 1 is 100% and 2 is 200%. I'm sure there's a fancier solution by scaling a matrix of points or something, but that's beyond my skills. I'd be curious how to do it though. Kevin Scale Lines.vwx Quote Link to comment
RDS Casa Posted March 18, 2018 Author Share Posted March 18, 2018 awesome. I think this might work, I'll try it tonight. Thanks again, you have been a great help. Quote Link to comment
RDS Casa Posted March 18, 2018 Author Share Posted March 18, 2018 far too curious so tried it this morning. It works, thanks. So very helpful. I'm trying to improve my script further, so have tried to add a DoMenuTextByName command to put in "Combine in To Surface". I've ripped this from @Marissa Farrell compose node in another discussion. Which activates the tool, but also (because I grabbed it from a compose node) duplicates the objects and puts them in a group, which means I can't click inside the polygon. I tried taking out the bits I don't need, or at least I thought were bits I don't need, and the tool no longer activates. What am I missing? Thanks again. Quote Link to comment
Marionette Maven Marissa Farrell Posted March 20, 2018 Marionette Maven Share Posted March 20, 2018 Unfortunately since the Combine Into Surface command requires user input, I'm not sure Marionette is the best way to go about this. I'm assuming you're hoping to get the inner boundary of the lines you have that are overlapping? There may still be a way to do this, just not by using the Combine Into Surface command. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.