Element.cutgeometry can't fulfill my idea

I need to install an electrical device family on the wall. The family already has hollow models pre-installed. It’s fine to use the built-in “Cut Geometry” function in Revit. However, there are many electrical devices, and I need to do this in a batch process. When using the “Element.CutGeometry” node from Clockwork, it can only cut the first electrical device, and the others cannot be cut.

It is probably this

Are your Families face- or wall based?

may be try to set level to 1 and see if that works.

Ah, yer. Lacing and Levels might do the trick. Didn’t think of that.

1 Like

it might be usefull to first start with checking which fixture needs to cut with a certain wall. so check if the boundingbox intersects with the wall boundingbox. then Dynamo can cut the wall with the correct component.

1 Like

This is the issue.

Lacing here is set to “auto” and both inputs are a list. This means it’s going to run the function on matching indexes (meaning a[0] to b[0], a[1] to b[1], a[2] to b[2]… a[n] to b[n]) until it runs out of items in one list or the other. As such with the way the graph is currently configured it’s cutting the first wall it finds with the first fixture, the second wall with the second fixture, and if there are no more walls but 10 more fixtures it’s not going to even try to cut them. And as fixture 1 might not be on wall 1 but on wall 37, the model is likely get an error (element X can not be cut by element Y) for each item in the shorter list.

Ideally the fixtures would be hosted on a wall, and then @wuu could just pull the host for each fixture by it’s element.

Alternatively List.MinimumItemByKey can help find the closest wall to each fixture insertion point or centroid.

thanks,Oh, I think I understand a bit. It’s that this list cannot correspond to each other mutually; it can only be A1 to B1, B2 to B2, and not A1 to B2. This is why the first one is achieved but the others cannot. So I need to process the list to make all of them correspond to each other once. Then, is it that the element.cutgeometry node cannot meet the current requirements? The way this node processes the list cannot achieve the expected result.

it’s not like that. There are many sockets and many walls. Each socket and each wall need to be cut. This function can only be used in one place and not everywhere. Therefore, I’m looking for a way to run it in batches with one click.

Pretty much.

There will be edge cases to account for still. Primarily:

  1. Fixtures intersecting two walls (i.e. projects which model the finishes as a separate wall)
  2. Fixtures which intersect no wall (i.e. things mounted to cabinetry)