Grasshopper

algorithmic modeling for Rhino

Hello All,

I have a problem with some circle parameters. I basically need to extract a sub curve from a circle with several OnIntervals. The problem is that all of the extractions work fine except for one interval that has its m_t(0) almost at the end of the circle and m_t(1) that is right after the start. I tried a bunch of different ways, like casting different types of curves on them, swapping the interval start and end, via Sub Curve and via OnArc(circle, interval) --- but nothing seemed to solve the problem. It should be clear in the pdf that I attached.

Right now i'm just really curious why (geometrically) the heck it makes so much difference when the interval includes the start/end parameter.

Please, let me know if you have any suggestions!

Thanks
Dima

Views: 447

Attachments:

Replies to This Discussion

Hi Dima,

the last interval goes across the seam of the curve, this never works as a valid subcurve interval.

I'd have to extract two subcurves, one to the left of the seam and one to the right, then join them together. This would turn simple curves into Polycurves when getting a subdomain. Is that an acceptable outcome?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Oh wow! For some reason it just blew me away! I had no idea that it is set to behave this way. Anyhow - thanks for this information and the possible solution with left and right subcurves. I "workedarounded" it a bit different by extracting/creating new OnArc /by 3 points - I had sample points in start and end of the subdomains and then a mid point between them getting a closest point on the circle. So with these 3 points create a new OnArc per each subdomain.
Thanks again
Dima
Hi Dima,

if you are willing to use a script for that, what you could also try is the RhinoCommon Curve.ChangeClosedCurveSeam(t) instance method (or .Net SDK OnCurve.ChangeClosedCurveSeam(t)), or, alternatively in this case because the circle has infinite symmetry axes, just rotate the circle itself before getting the subdomain, so that the seam is far from the interval you want to extract.

- Giulio
Thanks, Giulio

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service