I often use generic links and conditional subassemblies to tackle out of the ordinary design scenarios, but this one was a bit more challenging. It wasn't until a recent Civil Immersion post by Alan Gilbert named Finish Strong Friday: Solving for Unknowns with Subassembly Composer that I thought of this solution in Subassembly Composer.
I wouldn't tackle anything in Subassembly Composer without talking first the Queen of SAC, Kati Mercier. She confirmed that my idea would work and thankfully provided a few tips to get me going.
Let's get this party started!
Open Subassembly Composer and save the new subassembly as MaxSlopeLeftEOP.
Assign the Subassembly Name in the Packet Settings tab then save again. [You can add a description, help file, and image on this tab as well.]
On the Input/Output Parameters tab, create parameters with the values shown in the image. Set the Type before entering the Name of the parameter. [The PavementThickness parameter is used in the final version of the subassembly, but not a requirement at this point in the workflow.]
On the Target Parameters tab, create parameters with the values shown in the image. Set the Type before entering the Name of the parameter.[The EOPOffsetRight parameter is used in the final version of the subassembly, but not a requirement at this point in the workflow.]
Now that the parameters are all setup, you can begin building the geometry of the subassembly. First up is the start point. Note that I've included "CL" and "Crown" as Point Codes and set the Point Geometry Type to Delta X and Delta Y for this point.
Next we need to get the surface elevation at the left edge of the lane. Since this point will strictly be used for calculations, place an auxiliary point. This point will not be visible in the subassembly when it's used in a corridor. For this point, the geometry type will be set to Delta X on Surface. Use the LaneWidth input parameter as well as the TargetSurfaceLeft and EOPoffsetLeft target parameters to determine the horizontal and vertical position of this point. Make sure to uncheck the Add Link to From Point box on this point because we will add an auxiliary link instead of a regular geometry link in the next step.
Add an auxiliary link. Similar to an auxiliary point, this link will not be visible in the subassembly when it's used in a corridor. This link will be used strictly for calculating the potential slope of the lane.
Next we need to determine what the slope of the lane should be based on the initial calculated slope compared with the MaxCrossSlope input parameter. To do this, we'll create a variable to carry that value to the link that we later add to this subassembly. The variable type will be double. Although the initial value is not important, I prefer to assign it to the slope of the auxiliary link from the previous step as shown .
Now comes the tricky part: determining whether to use the calculated slope of the auxiliary link or to use the MaxCrossSlope from the input parameter. There are several ways to get this answer and I'm only showing one of them.
Begin by determining whether the slope of the auxiliary link (AL1) is greater than or equal to 0. Use a decision component to ask this question. It helps to label the True and False conditions when working with decision components.
The next step is to complete the Positive Slope side of this decision component. Now that we've determined the AL1 slope is positive, we need to determine if it's greater than the MaxCrossSlope input parameter. To do this we use another decision component.
All that's left to do for this decision component is set the variable value to the correct slope on each side. When you add the first Set Variable component to the left side of the decision component, it will typically default to the True (Max Slope) side.
When you add the second Set Variable component, it will be connected to the previous Set Variable Component. You will need to drag the connection point of the gray link to the False side of the second Decision component then set the variable value to AL1.slope.
Now that both results for this decision component have been assigned, we return to the first decision component to complete the false (negative value) side of that decision component. As we did on the other side of this decision component, we will begin with an additional decision component. This time we will test for the slope being less than the negative MaxCrossSlope input parameter. Don't forget to modify the connection points of the decision component gray link to match the image.
Assign the LaneSlopLeft variable on the true side of this Decision component. The difference on this side is that you'll use the negative MaxCrossSlope.
For the False side of the Decision component, use the AL1.slope value again.
Now that we have the LaneSlopeLeft variable determined, we need to add the rest of the components for this subassembly. Begin by adding another point with Type set to Slope and Delta X. The slope should be set to the LaneSlopeLeft variable and the width to EOPoffsetLeft. Add links to all four Set Variable statements then check the Add Link to From Point box in the P3 component. Don't forget to add point and line codes if needed for your design.
The subassembly works like this when the target surface is adjusted above and below the MaxCrossSlope threshold. I also show how the EOPoffset Left target affects the lane width.
From here you can add more points, links, and even shapes. Assign the slope of the right lane to be the negative value of LaneSlopeLeft (-LaneSlopeLeft) to get the following result.
In case you're wondering, Subassembly Composer is not version specific. I created this custom subassembly in version 2018 and imported the pkt file into Civil 3D 2016 for testing.
Even if this scenario doesn't match your design needs, hopefully it will spark an idea for you to spend some time creating custom subassemblies in Subassembly Composer just like Alan Gilbert's video did for me. Also be sure to subscribe to the Civil Immersion feed to see Tips for Tuesday, Finish Strong Friday, and other useful posts by Alan Gilbert, Jeff Bartels, and Jerry Bartels.
You can find more infrastructure related content at Infrastructure Reimagined. Get inspired today!