Add Two Lists (add Z component only)


#1

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.


#2

points


#3

List.add Z component

 

 

 

 

Thanks Peter,

It worked nicely !!

Regards.


#4

PointFromImage

 

 

 

 

This is what i was trying to achieve…

Thanks Again !


#5

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


#6

Thanks for your input, Ritesh.

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

 


#7

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


#8

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.


#9

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


#10

I see. Thanks Ritesh !