Shablab Posted February 25, 2019 Posted February 25, 2019 I have over a thousand points in a drawing where I need to draw a "best fit" line within a 1 ft buffer to eliminate unnecessary vertices. Is there a Lisp for this to help automate this? I tried just using the weed tool as well but couldn't find a way to make it work the way I wanted as the constraints to weed points are different than what I need. Quote
Steven P Posted February 26, 2019 Posted February 26, 2019 I am not sure if there is a LISP for this - it could be useful though. It should be possible if the user selects all the points and then use a line of best fit formula (which you can get online). Quote
Shablab Posted February 26, 2019 Author Posted February 26, 2019 3 hours ago, Steven P said: I am not sure if there is a LISP for this - it could be useful though. It should be possible if the user selects all the points and then use a line of best fit formula (which you can get online). What you described is already a command I believe in C3D. The problem lies in the fact that you would then end up with just a straight line. I practically want to eliminate all unnecessary vertices under a 1 degree angle. Since that statement is not true in my projects entirety, I can't just use the weed tool for this. Quote
lrm Posted February 26, 2019 Posted February 26, 2019 You seek a “best fit line” for a thousand data points. Are you really looking for a best fit series of straight lines or a smooth curve (equation) that is a best fit to the points. I assume the former task. The C3D weeding feature is aimed to do this. What does it do that does not meet your requirements? If you goal is the latter task then you could import the points to Excel and do a curve fit with a polynomial, exponential or some other expression. You could then convert the smooth curve to a chordal approximation if that is your end goal. 1 Quote
Shablab Posted February 26, 2019 Author Posted February 26, 2019 (edited) 2 hours ago, lrm said: You seek a “best fit line” for a thousand data points. Are you really looking for a best fit series of straight lines or a smooth curve (equation) that is a best fit to the points. I assume the former task. The C3D weeding feature is aimed to do this. What does it do that does not meet your requirements? If you goal is the latter task then you could import the points to Excel and do a curve fit with a polynomial, exponential or some other expression. You could then convert the smooth curve to a chordal approximation if that is your end goal. Maybe I'm overthinking it, this helped. Thank you. Edited February 26, 2019 by Shablab Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.