Jump to content
Developer Wiki and Function Reference Links ×

Extending line length


RDS Casa

Recommended Posts

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

Link to comment

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.

 

image.thumb.png.952015e83f1b96c7682d1356883fd3a1.png

 

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.

 

 

Link to comment
  • Marionette Maven

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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...