Grasshopper

algorithmic modeling for Rhino

Hello everyone,

I got a bunch of lines going between some points I created. These points have spheres and the lines have pipes running along them. When I try to do a solid difference on them, it doesn't work (probably because the pipe solids also intersect inside the spheres).

Now i would like to trim the pipes an specific length on both sides so that they don't intersect anymore inside the spheres (but remain in the middle of the vector/line.) 

I attached a picture illustrating what i want to do. All the lines in the model should be trimmed by "B" on both their ends. C dimension is unique to every line.

I thought of dividing the lines in segments and then culling the first and last segment of each line, but the problem is that the trim wont be equal for all the lines.

Another idea I had was to somehow list all the middle points of the vector, gather the length, subtract it by B and match the middle points with the original middle points and align the new pipes with the original vector. I managed to gather the middle points and to substract all the lengths by 5mm (2.5mm on each side). How can I put them all back together where they originally were?

Was that a good idea or do you guys know any other more elegant way of doing this?

Thanks in advanced!

Views: 6078

Attachments:

Replies to This Discussion

Extend the curves with a negative length.

4 seconds that was all....

If you know or can calculate the exact distance then you can use a negative value on the [Extend] component.

Or if are looking to shorten them at know points of intersection you can [Shatter] curves at locations of 't'

omg now I feel silly... Im new to grasshopper and Rhino but it has proven to be a lot of fun. Sadly I don't know the commands and I have to ask dumb questions.

Thank you guys very much, extend worked perfectly! many thanks!

The only dumb question is the un-asked one.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service