Grasshopper

algorithmic modeling for Rhino

Hi guys,

I have read numerous posts on the forum but still I did not find a solution for my problem. Perhaps it is really easy but anyway.

With the grasshopper model that I have been developing I end up with an irregular polygons (representing a 3D shell) that consist out of single lines/curves.

The length of these (+- 350) lines vary from approximately 300 mm till 2000 mm.

The goal is define points on these (+- 350) lines each 75 mm seen from mid point going to the start and end point of the line/curve.

But each point that is in the last 40 mm (seen from start and end point) should be culled. 

In the end the points will be used to extrude "notches".

Thanks in advance !!

See principle:

Views: 990

Attachments:

Replies to This Discussion

I didn't really stop to think very long about a clever solution, here's the naive one:

  1. Extend your curves at both ends with -40mm. This will trim off the ends you don't want to populate with points.
  2. Find the parameter at the mid-point (if your curves are lines, you can reparameterize their domains and the middle will be at 0.5).
  3. Shatter your curves at the midpoint parameter.
  4. Flip the 'left' part (at index=0) of the shatter result.
  5. Divide both subcurves using your specified length.
  6. Delete the first division point that came out of the left subcurve.
  7. Reverse the list of division points from the left subcurve.
  8. Merge the two lists of division points.
  9. Phew.

As per.

Attachments:

Hi david,

Sorry for bothering you again, but I cannot figure out a decent/elegant way to achieve the notched pattern described in my sketch. I was tried the following steps:

1. Move the previously achieved points in + and - local Y direction of each curve.

2. Creating lines with series etcetera.

Though this process will require a lot of components and is not very efficient in my opinion.

Is there any alternative??

Thanks in advance!

Hi David,

Yup you are right, it works. I also have another solution.

1. Subtract 40 mm from line length

2. Divide by total length

3. This gives a relative value close to 0 and one close to 1 which is used for evaluate length resulting in two points.

4. these two are then connected by a line component

5. Then continue at point 3 at your list ;)

Do you also have a suggestion for the "squared/notched pattern"?

Yours sincerely

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service