Create lines from two points lists

Hi all,
If you see my script bellow, I have two lists with 4 points for both…so how can I filter them to create 4 stright lines that’s represente my longitudinal rebars?

Thanks.

@REDO10 ,

i think you try this

something like this


Or another solution you could do this with less nodes with a code block taking the lists out from each other.

1 Like

In your case it might just be simpler to create rectangles from the sets of 4 points and then loft a solid between them. You can then get the edge curves directly from the solid.

1 Like

@Piero

Thanks for your reply

After creating my two lists (start and end) I got my first list not sorted correctly according (Y values) and lines get intersected, so how to sort the list in the correct order?

list

Thanks

@Nick_Boyts

Thanks for your reply

It’s a good idea to loft solid between rectangles but which node should I use…can you do that for me in my script bellow ?
rectangle2.dyn (18.2 KB)

Thanks.

You could try the out of the box node List.Sort, that seemed to work when I rebuilt your issue.

1 Like

This forum is not a place for others to do your work for you.

Try searching for loft nodes. There are only a few options and it should be pretty easy to figure out which one works best for your situation.

@Piero @Nick_Boyts @Draxl_Andreas

I finally create my 04 lines these defines my rebars but I can’t choose the right vector node that defines the direction of my rebars or else I can’t enter the right vector parameters!!.. in addition should I select only one surface or 04 surfaces to define my vector?

Thanks.

What have you tried?

@JacobSmall

I tried Surface.NormalAtparameter and I selected one face as shown bellow but I get error!!?

Thanks.

What does the error say?

@JacobSmall
check the error message bellow please

Thanks.

Looks like the node description, not the error message. The error would be the small yellow pop out above the node, and will say something like "Create.FromCurves expects arguments of type... but was called with..."

@JacobSmall

It should be this

Try using the direction of the lines for the vector and see if that resolves the issue.

1 Like

I dont know how to use that!!

Thanks

Hi All,

which node I should use to get 02 points in my sub-list bellow?

Thanks.

Hello to answer your last 2 questions.

if you only want the 1st and last element of the 1st list

and for the vector with Mr. Jacob’s answer

Cordially
christian.stan

Hi,
What’s wrong with my script?..I can’t get my longitudinal rebars!!

pls check my file bellow
ferraillage_poutre3.dyn (65.5 KB)

Thanks.