Straight line of best fit

Straight line of best fit

Anonymous
Not applicable
5,364 Views
18 Replies
Message 1 of 19

Straight line of best fit

Anonymous
Not applicable

Hello,

I have surveyed a beam, and need to project its alignment beyond its extents. However, the beam is not well built, and isn't straight. It has a general trend, with points varying by 20mm or so. How would I create a straight line that best fits the points, and shows the average line of the beam?

Thanks for any help.

0 Likes
5,365 Views
18 Replies
Replies (18)
Message 2 of 19

imadHabash
Mentor
Mentor

Hi and Welcome to AutoDesk Forum,

 

>> the beam is not well built, and isn't straight <<

you can fix it by using Rotate command with reference and using Ortho (F8).

 

Command: ro ROTATE
Current positive angle in UCS: ANGDIR=counterclockwise ANGBASE=0

Select objects: Specify opposite corner: 1 found

Select objects:
Specify base point: _endp of
Specify rotation angle or [Copy/Reference] <0>: r

 

>>  How would I create a straight line that best fits the points << 

you can create straight lines by controlling ortho status and by turning on ortho (F8). 

 

Regards,

 

 

 

 

Imad Habash

EESignature

0 Likes
Message 3 of 19

john.vellek
Alumni
Alumni

HI @Anonymous,

 

I see that you are visiting as a new member. Welcome to the Autodesk Community!

 

This is indeed an interesting problem. If I understand correctly, the beam has some deflection at some point along it's length.  Perhaps the easiest way to find the average path is to place points at regular intervals along the beam, use DATAEXTRACTION to capture their locations and then export to a spreadsheet to determine the best path. If this makes sense and you need additional information, please add a post.

 

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 4 of 19

Anonymous
Not applicable

Thanks for the reply, John. May I enquire as to how you used a spreadsheet to determine the best fit line?

0 Likes
Message 5 of 19

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I actually haven't built a spreadsheet to do this before.  I am thinking that you have a planned deflection or variance you can compare that to the actual patch and perhaps calculate the standard deviation.

 

Can you attach a sample file/data set? I am know I am in over my head here but I am happy to see if I can help get something to work.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 6 of 19

Anonymous
Not applicable

Actually, we are adding additional sections on to the end of the existing beam, essentially lengthening it along its alignment. I want to see if by extending the beam, it will clash with an existing structure, and by how much it will overlap the structure. Since the existing beam is old, and badly constructed, it has slight deflections along its length, but somehow I need to find the average line of the beam in order to find the alignment of the additional beams.

Attached is the survey, with the linear beam, and the circular structure attached.

0 Likes
Message 7 of 19

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Thanks, Let me play with it for a bit so I can see if there is something easy to do on this for you.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 8 of 19

Anonymous
Not applicable

Thank you

0 Likes
Message 9 of 19

dgorsman
Consultant
Consultant

Do some reading on "least squares regression".

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 10 of 19

Kent1Cooper
Consultant
Consultant

Since the waver is, at worst, by rather tiny amounts as a percentage of its length, and by roughly equivalent amounts on both sides of the straight line from end to end, I would think that the straight end-to-end Line would be more than close enough -- it could be off from any really-precisely-calculated best-fit line by a little bit, but surely by no more than amounts well below any realistic construction tolerances.  Think about the process of fabricating and attaching the extension -- it's not watchmaking, and they'll never get it down to within a millimeter or two or three from "exactly" where you design it to be.  They might even displace the existing beam in the process of drilling holes in it for bolts, banging on it, welding, etc., in which case highly precise calculations would be wasted.

 

EDIT:  I looked at the actual displacements of those defining points off the end-to-end striaght-line route.  The worst of them is off by only about 1/50  of 1%  of the beam length!  Before going to the trouble of calculating a best-fit line with great precision, look into the tolerances in standards for fabrication of such things by whatever agency or industry association governs that kind of thing where you are -- I would bet that no fabricator can guarantee that you'll get a new  beam as close to straight as that one is.  I doubt it's really "not well built" -- it's probably well within the standard tolerances.  Again, rolling steel beams is a far cry from watch-making.

Kent Cooper, AIA
Message 11 of 19

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

I think @Kent1Cooper is correct in his post about tolerances as well as issues caused when "modifying" the existing beam. I talked to a Structural Engineer that I know and he didn't feel that there was any value into trying to extrapolate the data into AutoCAD either.

 

The spreadsheet method I suggested doesn't prove to make any sense either after having played with it.

 

I suggest if you really want to look at this is finite detail, that you consider downloading a Trial of Robot Structural Analysis which will give you a much better analysis than plain AutoCAD could ever do.

 

You might also consider browsintg the Autodesk App Store for any kind of plug-ins that might assist in this.

 

I am sorry that I was no help on this issue.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 12 of 19

Anonymous
Not applicable

Kent1Cooper,

Thanks for looking into this, but I think you are getting the wrong idea, I was just wanting to know if there was a function on autoCAD that could do a best fit line for me, or an alternative easy method.

As for the beam, it was constructed many years ago, and we have no original information for its correct alignment. It is made of RC concrete, and poured in short sections. The sections should line up, but poor shuttering means that the sections aren't aligned very well. Because it isn't one section that is deflecting as a whole, the ends aren't guaranteed to be along the best fit either, as the end sections could have been constructed poorly. Apologies if I was not clear enough to begin with.

I get what you are saying about tolerances, and fabrication methods, as I am a contractor and well used to the capabilities of materials, manufacturing, and construction, and know the specification for my current job, but by simply eyeing the line of the beam in I can see that it is not constructed to a high standard. 

Thank you for taking the time to look into this, but I was simply wanting to know if there was an AutoCAD function, or known easy way of finding the best fit line for a data set on AutoCAD. 

Message 13 of 19

Anonymous
Not applicable

John, Thank you for trying to help, I shall look into your suggestions!

Thanks again for taking the time out to help.

0 Likes
Message 14 of 19

Anonymous
Not applicable

What are the drawing units on the file??  If it's inches the beam is just under 7 feet long with deviations of less than .004" (4 thousandths) from baseline which is well within rolling tolerances for structural steel.

 

0 Likes
Message 15 of 19

Anonymous
Not applicable
Rculp, the units are metres.
0 Likes
Message 16 of 19

Kent1Cooper
Consultant
Consultant

@Anonymous_watton_bamnuttall_co_uk wrote:

....

As for the beam, .... It is made of RC concrete.... 


So, not steel as some of us assumed.  Even so, the amount of deviation from purely straight seems minimal to me, despite how apparent it may be in sighting down the beam, but I don't know how acceptable concrete tolerances compare to steel fabrication tolerances.  However precisely formwork may be constructed, when you pour the concrete in, vibrate or tamp or whatever you do to get the air bubbles out, etc., how precise can it be expected to remain in the end?  I would still think the straight-line end-to-end Line would be so close to the best-fit line that any difference would be essentially meaningless in the real world.

 

But in the abstract, I don't know of any better way of finding a best-fit line than those already suggested.

Kent Cooper, AIA
0 Likes
Message 17 of 19

Anonymous
Not applicable

Precast or cast-in-place concrete??

 

So you're 4mm out of baseline on concrete beam 85 meters long, that's within normal casting tolerances.  I'd call it straight.

0 Likes
Message 18 of 19

leeminardi
Mentor
Mentor

There's no best-fit curve function in AutoCAD.  You can plot the data in Excel as a scatter plot then right-click and select Trendline.  You can get a straight line best fit as well as a bunch of other options (polynomial, exponential, etc.).

 

trendline.JPG

 

 

lee.minardi
0 Likes
Message 19 of 19

Anonymous
Not applicable

Thanks for this ;O)

 

I needed this for a survey, where I will measure some existing beams in a building to define the original buildings module-lines.  (construction lines)

 

The best way to do this is to measure all be beams and create the best fit line between them ;O)

 

Attached is the simple excel sheet what will help me do this ;O)

0 Likes