Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developer:scriptsamples:trimcurve [2015/10/14]
sandy
developer:scriptsamples:trimcurve [2015/10/14] (current)
sandy
Line 4: Line 4:
  
 =====Question===== =====Question=====
-I need to trim a lot of lines where they intersect. How can I do this?  Also, can you clarify what is meant by '​domain'?​+I need to trim a lot of lines where they intersect. How can I do this?  Also, can you clarify what '​domain' ​means?
  
 =====Answer===== =====Answer=====
 If you can remember back to your pre-calculus days, a domain is most often defined as the set of values for which a function is defined. As curves in Rhino have starting and ending points, they also have starting (minimum) and ending (maximum) domain values (parameters). You can obtain a curve'​s minimum and maximum domain values using the **CurveDomain** function. If you can remember back to your pre-calculus days, a domain is most often defined as the set of values for which a function is defined. As curves in Rhino have starting and ending points, they also have starting (minimum) and ending (maximum) domain values (parameters). You can obtain a curve'​s minimum and maximum domain values using the **CurveDomain** function.
  
-In order to trim a curve using **TrimCurve**,​ you must provide an interval, or sub-domain, of the curve that you want to keep. For example, if you have a curve with a minimum domain value of 0 and a maximum domain value of 5 and you wanted everything from t=2 to the end of the curve trimmed away, then you'd do something like this:+To trim a curve using **TrimCurve**,​ you must provide an interval, or sub-domain, of the curve that you want to keep. For example, if you have a curve with a minimum domain value of 0 and a maximum domain value of 5 and you wanted everything from t=2 to the end of the curve trimmed away, then you'd do something like this:
  
 <code vb> <code vb>
developer/scriptsamples/trimcurve.txt ยท Last modified: 2015/10/14 by sandy