Hello,
I have defined a retaining wall subassembly that has elevation targets for the TopofWall, ToeofWall, BaseofWall and BottomofFtg. The user is able to input the Wall batter in degrees (3 = 3 degrees, 0 = Vertical, etc). This works pretty well as is.
What I want to be able to do now is be able to target the "ToeofWall" point to a surface rather than a profile. So, I added an Auxiliary point to the SA that was to begin at the top of the wall and target a surface. But the only function is "Slope to Surface", so I need to convert the user input of degrees into a slope the function can use.
I know the basic Trig formula is TAN (degrees)*100=Percentage
so
Here is what I tried initially in the SA (Math.Tan(WallBatter))*100
This places the AP1 point "close" to line L1, but never on top of it. I suspect I might need to convert the WallBatter angle into RADIANS.
Which I tried to formulate as well with no luck .............. (Math.Tan (-WallBatter*(Math.Pi/180)))*100
Can anyone help me out to get pont AP1 intersecting the surface taget at the same angle as the WallBatter?
Refer to the attached PDF for a sketch of the issue. Thx.
Solved! Go to Solution.
Solved by fcernst. Go to Solution.
the same angle as the WallBatter?
Slope to surface for AL1 = L1.Slope
If you didn't have the luxury of already having L1 to reference. I believe the formula you would be looking for is:
Slope=(-1/math.tan(wallbatter*math.pi/180))
No need to multiply by 100, and without the 1/ you are getting x/y instead of y/x (for slope).
Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®