Jump to content

Best Fit Line within distance


Shablab

Recommended Posts

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 by Shablab
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...