Intersection of severals surfaces (and cut-delete what exceed)

Dear Dynamo user,

I’m looking for a solution to intersect several faces with Dynamo.
I have this form, composed by surfaces:

As you can see, in each corner, surfaces are intersecting with an other surface.
I need to cute surfaces along those intersection line, and delete what exceed.
Here a small sketch to be clear (red crosses should be deleted).

Here is the end of the script.
Surfaces come in entry Geometry, but I’m not sure what should come in entry Others…
Maybe should I compare Surfaces one-to-one (Surf.1 compare to Surf.2->CUT , Surf.2 compare to Surf.4->CUT , etc…).

Please find all files here:

Thank to all people who will spend time to help !

Hi !

Maybe I can try to compare the list of 5 surfaces in Geometry entry, with the same list in Others entry.
But two identique surfaces in both lists shouldn’t be compare…

Nobody’s got a solution ?
Thx !

How I would approach the problem:

  1. Thicken all the surfaces to the exterior using the largest surface dimension (overkill but best to be safe).
  2. Union the extrusions into a single solid.
  3. Use a Geometry.Difference method (or a split, trim, etc.) to remove the unwanted surface area. Watch your lacing and list levels here.

Disabling your geometry previews will be a must to ensure you get the desired result.

2 Likes

trimProjections.dyn (43.4 KB)

2 Likes

Thank both of you for proposal ! I’ll try them !

1 Like

@Vikram_Subbaiah, can you tell me a bit more about what happens in the code block ?
Is this example, the form has 5 borders. What should I write if it as 6,7,…, 100 borders ?

No change required (as long as you have a flattened list of surfaces)

0…(count-1) gives the indices of the list of surfaces (count-1) because the list indices start from 0 and goes up to 1 less than the list
Creating a relationship between the number of surfaces and the rest of the workflow ensures the graph works irrespective of the number of surfaces/edges

2 Likes

It works !

I just put another Solid.ByUnion next to the first one, because I still had some residual unwanted piece.
The first Watch give me 20 Solids, the 2nd one give me only 5 ! It does the job with 5 big and strong solids !

The result in Revit is exactly what I expecte !

Thank you so much @Vikram_Subbaiah and @JacobSmall to spend time for my noobs questions !

2 Likes

Dear @Vikram_Subbaiah,

Once again I need your help !
I tried to complexify the script, and something is going wrong…

I’m now working with 2 list. One is called “15-30” (item 0), the other one “30+” (item 1). The rest of the script keep the same spirit.
I give diffent parameter of extrusion for those 2 list, but with the same nodes (some parameters go to item 0, other to item 1).
Everything is ok, until what append in the picture… I should have 5 faces (as in input), but i receive only 2 in output…;

Do you have an idea of what doesn’t work ?
Please find my script and my revit file.

For more information, I want to intersect all the face of item 0 between each other, and all of item 1 to each other.

Not sure I completely understood your intent.
However, you’d be better up simplifying the list structure wherever possible to avoid deep sub lists


20200829_PLU_SIMPLE.dyn (137.2 KB)

My mind is a bit confused, it’s sometime hard to explain !

So, if you watch the picture, I have two groups of lines, group A and group B. I want to have two groups of entry parameters. Param A apply to Lines A, Param B apply to Line B.
Up to “Decoupe des surfaces” group, those A and B groups are separate.

I think it’s come from the “Decoupe des surfaces” group. On the top, list are 0 (2 items) et 1 (3 items).

What I need in “Decoupe des surfaces” group, it’s that all surface in A group intersecte other in A group, but must keep B surfaces safe.
At the same way, all surface in B group intersecte other in B group, but must keep A surfaces safe.
(That’s why I need to keep them separate).

200830_PLU_SIMPLE.dyn (139.4 KB)

See if this works …


20200831_PLU_SIMPLE.dyn (140.4 KB)

Well… Once again, and without surprise, it works perfectly…! Thank you !!