Wow so simple, why did I not think of that.
Thanks Bill.
How does cad calculate the average slope of a 3d polyline?
Answer= What Bill said
Total vertical change divided by total horizontal length.
Thanks again Bill.
Now I can have confidence in the CAD calculation.
How does cad calculate the average slope of a 3d polyline?
Answer= What Bill said
Total vertical change divided by total horizontal length.
Thanks again Bill.
Now I can have confidence in the CAD calculation.
?ÿ
This would only give a correct average slope if the slope were strictly linear, in which case a single lable would be the "average".?ÿ The best way, IMO, to calculate this would be a least squares regression,
which I doubt any CAD apps do.
But I repeat myself (again).?ÿ That's what I said in the very first comment in this thread.?ÿ I don't at all mind being shown wrong, though, so please do if can.?ÿ I could use an automated method of finding this quickly myself.
?ÿ
@dave-o Ultimately that is what we are dealing with. Linear. I'm not sure I understand what you mean by a single label. The CAD app that I use would calculate the average %slope of a profile aka 3d line. Linear with multiple vertical angle points. I needed a way to manually calculate the same so I could gain some confidence in the CAD solution.?ÿ
The last diagrams that MLSchumann posted show that as long as your profile continuously rises no matter how many angle points there are, a simple total rise over total run will give you the average slope.
My profile in question had multiple sections that dropped.
Total vertical change divided by total length is the answer to my OP. It checks.?ÿ
@mag-eye That's a good answer.?ÿ My profiles typically have sag and crest and I accumulate a series of 'sub-averages' over it's length and then weight them.?ÿ I don't know if that's truly more accurate or how close it would be to a least squares calc.?ÿ When I looked at your report output for the profile you posted though, it seemed that their answer of 14+% was different than what I get from a simple high and low point elevations (= to about 9%).?ÿ To me that would imply that it's collecting crest and sag in the calc somehow or that it's showing high and low points that don't exist at the ends of the 3d poly (?).
The CAD report only indicates the high elev. and the low elev. as well as the total length. I added the start and end point elevations really just to indicate that this profile did not continuously rise.
What the report is lacking is the sum of vertical change of each segment sag or crest. That is the number needed to complete the equation.
Average Profile Slopes: Continuing the discussion
While the second diagram I presented depicted a profile in which the slope values only increased vertically from left to right, on the first diagram the slopes increased to a crest then decreased to a sag and finished by rising to a higher point. It does not matter whether slopes are positive or negative. Positive slopes increase the average value and negative slopes decrease it.
Another way to calculate the Average Profile Slope:
In the first and second presentations, the additions were added pictorially on the profile diagram. In a third presentation, Average Profile Slope 1-2.pdf, the slopes from the first presentation are plotted as height values along the horizontal axis - note that in the first presentation, the side of each square on the grid is one unit both horizontally and vertically. Using this method, it is quite obvious how negative slopes influence the solution.
Given the problem:
.....ex: Line 1 Length = 151.79' Slope 26.52%
...........Line 2 Length = 71.71' Slope 20.03%
Refer to the diagrams for two possible interpretations and consequently two possible solutions. It is assumed the line lengths are slope distances because there is no information to the contrary.
If the lines are at differing locations and orientations on some surface, there is insufficient information to determine a solution. As such, only a general solution is depicted in Average Slope btwn 2L in sp.pdf
There are references to least squares in a couple of the posts. Least Squares is the process of determining the solution that minimizes the sum of the squares of the residuals. Conversely, it may be stated that Least Squares is the process for determining the Most Probable Values. Wolf and Ghilani in Adjustment Computations, Statistics and Least Squares in Surveying and GIS Wiley 1997, provide in Section 10-2 a discussion and the proof. Finding an average is the fundamental process for determining, in one variable, a least squares solution.
Slopes in General:
Possible associations with slope abound in our everyday lives.
There's miles per hour, parts per million, aspect ratio, 10% of the people and teaspoons per quart among the multitude of items that may be compared as slopes on a chart. A key word usually indicating linearity and proportionality is "per." However, usually any indication of ratio or division, may also suggest some linear slope can be associated. In the linear cases, averaging is reasonably straight forward. For those interested in the details of slopes, they might consider differential calculus: metaphorically, slopes are the stew in the pot.
Some slopes or comparisons, such as road and pipe flowline slopes are dimensionless. This is because a height distance and a horizontal distance are usually specified in the same units, ie feet per feet, meters per meter, etc. As a fraction, a slope of 15% can be (15 feet)/(100 feet) and it can be realized that that the result of feet divided by feet is one. Thus the feet cancel and the slope is just 15% - no units. Miles per hour, for example compares values for two units that do not cancel.
When comparisons are not linear, example flow rate and pipe diameter, comparison, not flow line, slope values change relative to the "square" of the diameter. The flow rate in a pipe with a 20cm diameter is four times that of a 10cm diameter pipe - both pipes at the same slope and applied head.
Some values, degrees or angular values of rotation, are not always linear when radii values are not the same. In these cases, averaging angular values may not produce the desired results. One method of linearizing is to multiply angular values by their associated
radius, summing these amounts and then dividing by the sum of the radii. The product of an angular value and radius is the value of some arc length. If the angular values are in terms of radians, the arc length is correct. Using other units results in proportional arc lengths.