+ Reply to Thread
Results 1 to 3 of 3

Thread: Draw a new curve between two existing curves

  1. #1

    Draw a new curve between two existing curves

    I'm brand new to Rhino (and in fact to 3d modeling in general), but have quite a lot of Python experience. What I'd like to do is allow the user to draw two curves on the screen and select them. Then, they would run my script, which would draw a new curve in between the existing curves. It would act in a way very similar to the "Average 2 Curves" function, but would allow the user to specify a weight, which would cause the new curve to be more similar to (and closer to) one of the original curves.

    It seems like this should be relatively easy, since the Average 2 Curves function already exists, but I don't see anything in the API docs that looks related to it. Can anyone point me in the right direction to get started on a project like this?

  2. #2
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,472
    Blog Entries
    19
    I'm adding a CreateMeanCurve function to our SDK which works the same as our MeanCurve command. Is that what you are looking for?
    Thanks,
    -Steve

  3. #3
    That sounds great. Is there any chance we could add the ability to weight one of the curves more in the mean calculation? Then it would do what I need.

    With the help of a friend of mine, I've developed a workaround involving some crazy nonsense; it goes something like this:

    1) Have the user select 2 curves
    2) Loft them into a surface
    3) Create points on that surface based on some weighting function
    4) Extract iso curves from the surface at those points
    5) Delete the surface.

    If there's a better way, I'd love to know what it is.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts