+ Reply to Thread
Results 1 to 3 of 3

Thread: Trimming a curve between two points

  1. #1

    Trimming a curve between two points

    Hi Everyone,

    I am trying to trim an interpolate curve between two points. I can not figure out how to make the trimCurve command work for this task. I am also having an issue understanding what exactly the CurveDomain command does as well. Could someone please help me out?

    Thanks,
    Andrew

  2. #2
    Super Moderator Mitch's Avatar
    Join Date
    May 2010
    Location
    Switzerland
    Posts
    288
    Hi,

    The curve domain is a set of two numbers that indicate the start and end values of the parametrization of the curve. Parameter values that are between these two extremes will lie on the curve. The method rs.CurveDomain returns the two values in a list.

    To trim a curve one needs an "interval" which is also a set of two numbers (in this case you need to supply a tuple). This interval should lie on the curve, that means the start of the interval (the smaller of the two numbers and the first index in the tuple) should be bigger than the starting value of the curve domain; and the end of the trim interval (the larger of the two numbers and the second index in the tuple) should be smaller than the value of the end of the curve domain.

    Note we are talking here about "parameters" (a single number) and not 3D points. to get the parameter on a curve that is closest to a 3D point, you need to use rs.CurveClosestPoint(curve,point).

    Does that help?
    --Mitch
    Last edited by Mitch; 08-14-2012 at 10:48 AM.

  3. #3
    Mitch,

    That helped out a lot thank you very much!

    -Andrew

+ Reply to 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