How can I repeat multi node at list?

Hi,

I’m trying to apply multi function at list’s each element.
But, I can’t use Python…
could you help me?

try out function List.Map and change lacings, dont know really what you tryin to accomplish, but this might help :wink:

If you can post a more simplified version (with only 2 or 3 of those 13 nodes) with a short explanation, then we could understand better how to help you.

1 Like

I want to detect all element’s intersection.
So, I take fisrt item and rest of them except first item, and apply geometry.intersectall node.
and again second item… again and again.
but List.Map node can’t apply this mechanism…

Bimorph has nodes specifically for handling this.

here is simplified version

Thank you for your advise. however, I want to detect all of element’s intersection. but bimorph can’t to do this…

Is this not what you’re looking for?
image

Isn’t this node only possible between two special zones? I want to get an intersection of all elements in whole file…

It checks the intersections of elements in two lists. If you have one list you just use it twice.

oh, Thank you VERY MUCH!!

But the node only shows that some elements are overlaid. What I want is to see only overlaid parts. isn’t it?

I don’t follow…

hmm… 111 if i want to detect intersection,

i want like this one

You want the geometry that is the overlaping every element with the total geometry of every other element? If so, from Element.Geometry ensure you have only a single solid per element, then:

List.RemoveItemAtIndex with a range from 0 to the length of the list minus 1. You should get a list of lists of all the geometries with one item removed from each sublist.

Union each of the sublists into a single solid. This will help reduce computations in an up coming step. Flatten this list node if it’s not only two levels deep.

Place a Geometry.Intersect node, where the first input is the contents of the original element.geometry node and the second input is the solid.byunion node.

Lacing and list levels will matter throughout, but I have seen this method work.

That said, be sure to limit your lists - if you attempt this for a list of elements that is let’s say n items deep you’ll be performing n^(n-1) solid unions, and then n geometry intersections. I may be off in my count, but I think you have 23298085122481 geometries you’ll be doing boolean operations on at one point. Likely there is a better way to solve whatever your problem is (such as the Bimorph node above).

That means my method is too big to be useful?

Not necessarily, it just means you might be approaching your problem in the wrong way to begin with. What are you really after?

I want to see the overlay clear and intuitive in every model. Through this, we also want to model more accurately and further calculate the exact quantity.

import sys
import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from Autodesk.DesignScript.Geometry import *

lst = IN[0]

doc = DocumentManager.Instance.CurrentDBDocument

solids =

  i = 0

for i in range(len(lst))
todo = __Apply(lst,i)
k = List.GetItemAtIndex(lst,i)
j = List.RemoveItemAtIndex(lst,i)
l = Solid.ByUnion(j)
u = Geometry.IntersectAll(k,l)

lst1 = Solid.ByUnion(Solids)

OUT = lst1

what’s the matter with my code?
I don’t know Python, so I don’t know where this is wrong. It would be useless if it grows bigger, but I want to write it because I want to apply it in a small project.