Trimming a curve between two points
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?
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?
Last edited by Mitch; 08-14-2012 at 10:48 AM.
That helped out a lot thank you very much!