Crash Barrier

Hi. I try to create a script that creates a crash barrier model. I managed to insert a post block along a 2d polyline and surface but I have problem with guardrail face. I`d like to be a simple cuboid that connects the top of posts as at the picture below:

I`d be obliged for any help with this

crashbarrier.dwg (2.1 MB)

crashbarrier_JS.dyn (50.2 KB)

I was able to create cross sections at each posts to use Solid.ByLoft but I get an error with this node.

I also have a problem to control on which side of polyline posts appears. There is a portion of polyline that posts appear on other side than at the rest of the polyline.
I`d be obliged for any help with this.
crashbarrier2.dwg (2.1 MB)
crashbarrier_JS2.dyn (301.5 KB)

Hola amigo @kubastan89 buenas. I’ve analized your script, you have 2 main issues.

  1. you are working very far from the origin, because a scale topic Dynamo will make weird things graphically, i solve this copying your base polyline and recreating an alternative file based on the default origin.
  2. when you try to use solid by loft Dynamo is not able to doit because the turns of the curve they are very agresive, then due to the size of the rectangle being too small and the tightness of the dynamo curve it is not able to create the solid, I increased the size of the rectangle and it worked, maybe you should give it a little smoother curves instead of a pointed vertex.
    I hope this information will helps you, good luck!! :cowboy_hat_face:

    Crash Barrier Rebuild.dwg (392.0 KB)
    Polyline 3D to Polycurve.dyn (31.2 KB)

Hi @gilberto.arechigaiba
Thank you your reply.
For 1m depth and 1m width of my guardrail face the script works but for smaller dimensions solid is not creating.
I need to think it over but hasn`t have idea how to change the workflow so far.

Rebonjour amigo @kubastan89. I will told you a secret that you should never told to the clients: Just add 1 mm or less!! :shushing_face:
Just kidding allways be honest, this kind of scaling limitations are very enoying, but it is what it is, like this you can continue to work mean while, after in the following days you will figure out a solution i’m sure of that!!

Hi @gilberto.arechigaiba
Unfortuanatelly this trick doesn`t work with my script :frowning_face:
I have to keep thinking …

Try changing the geometry scaling in preference’s menu, try with large or medium, some times helps!!