slidehas.blogg.se

Reverse curve autocad 2019
Reverse curve autocad 2019




reverse curve autocad 2019

"absc2" (you should definitely use other names) calculates now the x-values for a given curve length "d" so it can be compared to the values of "absc" created using the integral and the solve block.įirst I find the the largest value in the list "s" of cumulated segment lengths which is still smaller than d. So the last value in the return vector is the lenght of the whole curve, the third value in the returned list is the length up to the third point, etc. The total length calculated so far (R[i-1) is added and the result is the next cumulated valued. Now I go throw the transposed list, chose two consecutive points (=columns) and let Mathcad calculate the distance between those points. Transposing the "list" matrix is necessary because MC15 does not offer a way to select a specific row of a matrix, we only have a column selector. This is achieved using Mathcads ability to work with vectors directly. "segments" is a function which takes a list of points (n x 2 matrix) and creates a vector consisting of the cumulated lengths of the various line segments with 0 as the first entry. If you stay with linear interpolation, then determining the x-value from a given "curve" length could be programmed easier and exact as it would just mean to determine the length of line segments or parts of them.įurthermore the "derivative" would be constant between two of your points and not defined at the points themselves (or you may calculate the mean value for them).īTW, the time consuming part in my approach is not the solve block but rather the numeric derivation. As you are looking for the derivatives I think you should not use linear interpolation but rather spline interpolation for smooth results. You may give it a try with a constant guess at first.ĮDIT: One additional remark. But that depends on the function you have. Yes, a solve block would give you the inverse you need.ĭepending on the function you use I guess its better not to use a constant guess value but rather make the guess for x dependent on the curve length in some way as shown in the file.






Reverse curve autocad 2019