Grasshopper

algorithmic modeling for Rhino

Offset a polyline, segments offset with different values

Hello

Any suggestions on a way forward for this would be a huge help.  I've been looking at this all day and my eyes are bleeding.

I have a 6 sided closed polyline and I want to offset 4 of the sides inwards by differing amounts. Two of the sides won't be offset, but their length will be altered due to the other sides being offset.

The resulting smaller polygon will be moved upwards in the z axis, and the 2 polygons will be lofted to form a 6 sided open brep with 4 sloping sides and two vertical sides. 

Images attached.

I basically can't figure out how to do this. I've tried finding the component segments or vertexes of the first shape and offsetting them one by one, but I can't get their end points to respect (remain colinear with) the two segments that are to remain vertical once lofted. (where the red and magenta lines overlap).

My offset lines need to remain parallel to the original lines. The endpoints of the offset segments need to move in and out in response to what the segment on either side is doing.

Thank you!

Views: 2993

Attachments:

Replies to This Discussion

Hi MotM,

-explode polyline

-cull index (for curve you don't want to offset)

-offset curve

-extend (for curve which not intersect)

-intersect > line | line

-cull index with closest point (for obsolete point)

-move to Z-axis

-polyline

Hope this help

here file

Attachments:

Thank you!

I couldn't open that GH file, but I followed your points in the first post and that solved it for me.  Now if I can just figure out how to loft these two curves.... ;)

Much appreciated!

I'm using GH 0.8.0066, if you post the file, maybe can be much easier to help.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service