Add Two Lists (add Z component only)

Hi Guys,

Is it possible to add Z component (only) from one list to the other?

e.g.-

if the first item of List 1 is (1,2,0)

& first item of List 2 is (0,0,3)

is it possible to add these two to get (1,2,3) ?

Thanks.

points

List.add Z component

 

 

 

 

Thanks Peter,

It worked nicely !!

Regards.

PointFromImage

 

 

 

 

This is what i was trying to achieve…

Thanks Again !

Hello Chander Gupta,

There is no need to assign variables and then add them up, until and unless you need them again.

There is one more easy way to achieve same results with the power of Replication (Cross Product Lacing). See attached image.

Do let me know if you any question.

Thanks,

Ritesh

AddingListElements

Thanks for your input, Ritesh.

Is it possible to choose the ‘Lacing’ options in the code block?

 

Hello Chander Gupta,

Yes, it is absolutely possible in CBN.

PointByCoordinates(x<1>, y<2>, z<3>);

Represents Cross Product Lacing.

Go to Help > Samples > Core > Core Code Blocks, this example will give you more understanding on CBN usage.

Thanks,

Ritesh

It was very helpful to read through the sample file…Thanks Ritesh !

Also i was wondering if its possible to work on two Dynamo files at a time…means working in tabs?

Regards.

Hello Chander Gupta,

Right now it is to possible to work on two Graphs in Dynamo.

You can open multiple Custom Nodes (dyf) in tabs but not dyn file.

Thanks,

Ritesh

I see. Thanks Ritesh !