Split rebar by dynamo

Hello everyone
Can anyone help me how i can split rebar
Regardless of the beginning of the rebar drawing I want to issue an order to dynamo to cut off the rebars from the right or the left How can I do this with the dynamo? I made a script to cut the rebat, but it starts from the side where I started drawing the rebar,and I do not want to be restricted in the script.

@mahmoudelsayedsayed1 ,

check out this topic and show your progress

The script works well, but there is a flaw that it starts cutting from the beginning of the point from which I drew the Rebar. I want it to cut the skewer regardless of the beginning of the drawing of the Rebae. I want to issue a command for it to cut the skewer from the right or the left direction .

1 Like

Check the direction of the curve by getting the tangent at parameter 0, and check the X value If the X value is + it goes left to right. If the X value is - it goes right to left. You can then decide if you want to split from the start or end accordingly.

Crazy question here though: what if it goes too to bottom? Or if it goes perfectly on a 45 degree angle that is slightly - on the X but + on the Y?

When i use node (tanget )
Sometime geterror
Sometime delete all rebar i selected to split it
:man_shrugging:
Dynamo make me always angry :triumph:

Hard to help without showing the warning and how you have configured the node in question.

he cut the rebar from left to rigth and i change the value of tangent and i do it without reverse vector all same answer cut from left to rigth

I am not sure how to use the custom node you’re using to split the curve, as it’s not something I utilize nor do I know where it came from.

Instead of trying to make that work, I’d just orient my curves consistently first. Something like this can accomplish that:

Note you don’t need the stuff to display the circle or the start point - those are just to illustrate the concept.

1 Like

It work but i need node
Reverse true to false
Do u know this node If it existed

I solved it
Thx for all :heart:

Can you share with everyone else? Will help the next person in your situation to pick up where you left off. :slight_smile:

sure

1 Like

file dynamo revit 2024
Lap Splice Max Len 2024.dyn (161.2 KB)

1 Like