Ad

Tuesday, December 30, 2008

Vertical Curve - HP/LP Split Profile Vertical Curve Label Style

OK, I messed up on the previous version of this post. The text was huge instead of small and I didn't realize it since I didn't zoom extents and if the low/high point was the BVC or EVC the label still showed it at the correct size. But have no fear I know another way to do it, it requires a knowledge of vertical curve equations and the use of expressions.

The first equation we have to use is the R equation, which results in the the % grade change per length.

R = (G2-G1) / L

Where G1 is the grade in, G2 is the grade out and L is the length of curve. The expression would look like the one below. The *100 is because the formula works as a % value instead of the decimal.

(({Grade Out}-{Grade In})*100)/{Profile Curve Length}

So now that we know the rate of change of the vertical curve we can calculate the Turning Point which is the high or low point of the grades used for the vertical curve. The Turning Point is measured from the starting curve station and may be positive or negative or extend past the end of the vertical curve end point which is important to know later on. The formula for Turning Point is:

-G2/R

The expression in Civil 3D is:

-({Grade In}*100)/R

So know we now know where the HP or LP occurs for the vertical curve we can create the expression that checks to see if the HP/LP occurs for the vertical curve. The expression is below:

High Point

IF({Grade In}>=0,IF(TurningPoint>0,IF((TurningPoint+{Profile Curve Start Station})<{Profile Curve End Station},.1/12,0.0000000000000000001),0.0000000000000000001),0.0000000000000000001)

Low Point

IF({Grade In}<=0,IF(TurningPoint>0,IF((TurningPoint+{Profile Curve Start Station})<{Profile Curve End Station},.1/12,0.0000000000000000001),0.0000000000000000001),0.0000000000000000001)

The expression first checks to see what type of curve this could be based on the positive or negative incoming slope. Next the expression checks to see if the turning point is positive. If it's negative the turning point is outside the vertical curve. Finally the expression checks to see if the turning point + start station extends past the profile curve end. If all of the items are true the text height is set to 0.1/12 and if any of the IF statements are false the text height is really small using the 0.0000000000000000001 number.

So that fixes the label. The corrected drawing may be found in the link below. Sorry for the mix up, but I guess the saying is true, you get what you pay for and I don't get paid enough for doing these posts to pay for a QA/QC process. The drawing uses both the R expression and Turning Point, but they could be combined into one. I wouldn't suggest adding it the other label since doing so makes the expressions really long for the determining expression.

The DWF below shows the HP label, and the DWG file may be found on this page.



8 comments:

Anonymous said...

I applied this method in addition to the one James posted on civil3d.com and got great results...but I noticed that it wants to label a high point even if the v.c. doesn't really have one (I adjusted the profile in your dwg to still have a vertical curve but put the pvi at an elev of 663.25). how can I incorporate your 'one vertical curve for sag and crest' method into this one? or did i miss something?
thanks. c. carr.

Christopher Fugitt said...

I noticed that too, to fix that change the {High Point Station} value to {High Point Station}+0.001 at the start and {High Point Station}-0.001 or one more than the precision you want to show. That way if the HP is at the Start or End of the curve it won't show up.

Unknown said...

I created the expressions and applied them as the text height for my "high point" and "low point" text components within my standard curve label, and it appeared to work fine until I "zoom extents". Then the "high point" and "low point" labels that were supposed to have shrunk are actually found to be gigantic, on the order of 1+E22' tall. Am I missing something? Thanks much

Christopher Fugitt said...

OK, totally screwed this post up. Look for a revised post later on tonight.

Unknown said...

Chris, you're right, you don't get paid enough! I'm new to Civil 3D and need all the help I can get, that's why "Civil 3D Reminders" is my top bookmark.

Thanks for this post, and all the others, you rock!
Greg

Dave Massingale said...

I'm stumped. I made the changes to my label style, and at first all seemed well. However, when I closed and re-opened my drawing, the text was super huge again. I'm using C3D 2008. Could that have anything to do with it?

Christopher Fugitt said...

I'll try it tomorrow at work and see.

Christopher Fugitt said...

It looks like 2008 doesn't like the expressions referencing other expressions. To get it to work in 2008 just combine the TurningPoint components and just use 2 expressions (one for the high and one for the low). The combined expression for the TurningPoint is below:
(-({Grade In}*100)/((({Grade Out}-{Grade In})*100)/{Profile Curve Length}))

LinkWithin

Blog Widget by LinkWithin

Ad