While i was trying to get a subcurve from 2 different open polylines I encountered the following situation.
I thought that the domain of a curve was constant as long as there weren’t areas of different curvature, and i thought the curvature of a polyline was zero, so trying to get a subcurve with the gh subcurve component and substracting the same number from the beginning and end of a normalized curve domain would get me the same distance trimmed in both sides.
But it seems that it doesn’t happen. If someone was kind enough to explain it to me, that would be great as i cannot find anything related in google or in the forum.
It seems to have something to do with the acute kinks of one of the curves
I have attached a file explaining what i mean, in case i dont make sense.
Short answer is the math doesn’t work like you want it to.
First a bit about terminology to avoid confusion. Each point along a NURBS line or curve is associated with a parameter. The parameter of a line or a curve has a domain which is how much “space” the parameter covers. So if the parameter in a line goes from 0.27 to 1.73 the domain is 0.27 to 1.73.
In a single span of a degree 1 line the parameter is linear with the distance along the curve.
Across multiple spans of a single degree 1 line or a polyline (multiple lines joined into a single object) the parameter usually is not linear with distance. The relationship between the parameter and distance is usually different in each span or segment. It is possible to create new multiple span lines and polylines with the relationship between the parameter and distance is constant. But if a control point is moved that relationship will change and not remain constant.
Bottom line - don’t count on equal increments of the parameter / changes in domain size to correspond to equal lengths.
A polyline when created will have the parameter corresponding to the distance along the curve. However If a vertex is moved the length of curve segments will generally change but the parameter will stay the same. In that case the parameter will no long match the distance along the curve.
It is usually preferable to shorten a polyline using a method which works directly with length, not one which uses the parameter.
Thank you all for your responses. But it is not clicking in me, because if i reparameterize both curves and evaluate those crvs at a length of lets say 1m, then with the t that i get from evalcrv i construct a domain from “t” to “1-t” and use it to get a subcrv, shouldnt i get a crv with length = Original less 2m since i reparameterized the crv?
It has something to do with what David says and a missinterpretation of “reparameterizing” by myself.
First because if I create a new polyline with several curves my last gh file shows what i would expect, but when i drag one vertex of the polyline it starts deviating.
Second, I thought that after you reparameterized a polyline you ended with a parameterization with a linear behaviour (or something like this) in which an increment in parameterization meant an increment in length in any given point of the curve. Then an increment of 0.02t would mean 1m in length at any t value. Is this true with polylines or not?
To sum up, reparameterization changes the bounds (start and end values, i.e. the domain) not the distribution of -t- parameters. Skewing segments by moving the control points, affect the parameter distribution, not the domain. So, if I understand you correctly, the “reparameterization” is irrelevant to what you’re trying to achieve here with the Evaluate Length component. Where it might seem relevant, it’s only because of how you construct the domains in your definition.
Hope this helps, I recommend creating a definition for analysis and investigating this.
It was not about offsetting the endpoints on a curve but about learning about that internal distribution of -t- parameters that you are talking about in your last paragraph! I could not understand the variation or what was happening, but with that last definition it becomes very visual!
Thank you very much!
P.D.: The file you attached is not the file shown in the pics, so i recreated it and posted so anyone can have a look. Thanks again!