Hi All,
Sorry in advance that this is long, I’ve been trying to mull this one over for a long while.
I’m a novice in Dynamo, and have been using it for several months at this point. I’ve done a dozen or so scripts but I’ve been trying to implement one for awhile but keep running into so many roadblocks or things I presume will be issues.One of the major issues I’m not sure I understand how to tackle or if Dynamo can even support it, is doing an iterative solution that runs a part of the script, looks to see if something fails a check and then runs that same script again with slightly different parameters. Essentially a while loop that interacts with Dynamo nodes.
My main goal for this script is to automatically create parallel-style ADA (Americans with Disability Act for non-US residents) compliant curb ramps. Essentially our current process for designing one of these by hand is this:
- Take our sidewalk corridor and apply 3 assemblies to our curb ramp region.
- These curb ramp regions consist of a ramp down to the low point, a low point (landing zone), and a ramp back up to the sidewalk grade.
- Verify that the slopes are compliant (Less than 7.5% slope on the ramp run down to the low point).
- If not (this is where I would like to create an iterative process), adjust the ramp length (e.g the assembly stationing range in the corridor) to be up to 15ft long to meet the grading requirements.
- Worst case scenario we adjust the profile to get it to work, but I will not have this be apart of the script as that is asking for trouble.
I’ve tried to create a rough idea of this script already, but am having trouble getting the iterative part of it to work. My idea for the workflow/script is:
- Excel sheet has stationing to place ramps. - Got this working
- Script extracts stationing, places ramps - This works somewhat.
- Checks to see if ramp runs have a compliant slope (less than 7.5%)
- If less than 7.5%, ramp succeeds, no further action.
- If greater than 7.5%, extend ramp assembly by 0.5ft.
- If success, no further action.
- If fails again, repeat step 3 up until ramp either succeeds or reaches a maximum width.
Step 3 is where things get tough (makes sense, it’s the bulk of the script). I think there’s two reasons why my process is bad, but I would love to get some ideas on ways to do it better.
- Adding regions to an existing corridor is difficult. (e.g we have a sidewalk corridor that runs from station 0+00 to 5+00, inserting a region for the ramp from 0+15 to 0+30 spits out errors “The Start and End Station should not be within Another Region”
- C3D seems like it won’t be able to handle the iterative process of applying a new corridor region → checking if slopes fail/succeed → adjust the region again if it fails until it succeeds.
- I’ve played around with some Python scripts to try this but I’m not sure how to get it to loop while using the Dynamo nodes to adjust the corridor region station range, since those would be two separate nodes. Maybe feeding an output into its own input? Not sure.
Something I’ve thought of but didn’t want to invest the time in another potential failure without getting advice first is using feature lines instead of a corridor to create the ramp. I’ve seen others create them manually using feature lines as well as other programs do it automatically using them, but was hoping to have a script that integrates well into our already-existing workflow.
My main questions:
Any ideas or things you’ve seen to make this work? Is this even possible with Dynamo?
How to implement an iterative solution using Dynamo nodes?
Are feature lines better than corridor modification when working with Dynamo?
Thanks and appreciate any and all advice!!
I’ve attached my in-progress script, but it’s kind of been torn down as I’ve been doing a lot of trial and error to try and get it to work and it’s very specific to our workflow, but hopefully it can be a bit of a guide in what I’m trying to accomplish.
CurbRampCreator.dyn (72.5 KB)
