Grasshopper

algorithmic modeling for Rhino

Hi everybody,

I'm having a problem offsetting a polyline: when the offset segments form convex corners, new corner points are created and I can't find a way to eliminate them.

Note: I can't use simpify curve because that will also eliminate other points I need that might be on a flat segment.

 

Attached follows a simple example definition + 3dm.

Thanks a lot!

Regards,

LUCAS

Views: 6789

Attachments:

Replies to This Discussion

Hi Lucas,

 

I can see the problem but no solution. I'll keep thinking about this but it may require some custom VB/C# coding to consistently eliminate the unwanted points.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Wow, and I thought it was a simple problem...! So please let me know if you find a solution.

Thanks a lot for your time!

Regards,

LUCAS

Not exactly, but maybe something close:-)
Attachments:

Wow again, thanks Dedackel!

It's the most complex offset I've ever seen, but it gets the job done.

Unfortunately when I use it on the file I'm working (much larger than that example I sent before) I still have unwanted points. And I can't apply the solution to several curves, they connect together strangely.

But I'll try to make the necessary modifications, as soon as I can completely understand your definition.

Thanks again for your time and effort!

Regards,

LUCAS

mh, ok!? I am quiet sure there are possipilities to make my definition easier. But I can not spent more time on it right now, sorry. In the end it is not very complex. By the way. the Points you get with my version... at the end ther are to many. I guess there are duplicates or somthing like this.

 

Best Regards

DeDackel

Don't worry, you've already helped a lot!

Yes, I saw the duplicate points too, and maybe that's why it doesn't work well on my file.

Thanks again and regards,

LUCAS

Hi Lucas,

 

in my lunch time, I made this quick definition with out of the box components.
It makes polyLines out of every set of three sequential control points of the offset curve.

Then it filters for the Line-like segments and pulls their 2nd control point to the offset curve.

By Splitting the offset curve and rejoining the segments you get your control points along the line segment back.

 

Cheers

Peter

Attachments:

Are the ControlPoints the same as the CurveCPs? I didn´t know that. I thought thy behave more like a t value on the new Curve!? Anyway good solution!

 

DeDackel

Hi Peter!

Amazing job, seems to work very well with curves with low curvature! I'll give it a try and let you know!

Thanks a lot!

LUCAS

As you are working on a polyline, using the Discontinuity component is probably good enough to recreate a clean offset curve.

There are still one or 2 unnecessary control points though, weird.

Thanks Systemig,

But I guess the combo "discontinuity + polyline" is equivalent to a "simplify curve alone" isn't it? That way I'd lose the points on the flat segments I need aftwerwards, am I right?

Thanks again,

Regards,

LUCAS

Oops indeed, this should work better.

But other helpers probably have suggested something similar.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service