# Best way to intersect solids with a mesh

**URL:** https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202
**Category:** Geometry
**Created:** [July 25, 2016, 8:58am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202 "2016-07-25T08:58:02Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [July 25, 2016, 8:58am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/1 "2016-07-25T08:58:02Z")

</div>

Hi everyone,  
I need to intersect multiple Dynamo Solids with an imported mesh from a Revit Topography to calculate the excavation volume. I faced some difficulties here. The mesh Toolkit is not working with my mesh, converting the mesh to a Dynamo mesh by using the Vertices and FaceIndices also didn’t work. Has anyone an idea how to do this?  
I’m using Revit 2016/Dynamo 1.0.0/MeshToolkit 1.0.0. I can update any of this if this solves the problem.  
Thanks, Fabian

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [July 25, 2016, 9:39am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/2 "2016-07-25T09:39:53Z")

</div>

You could convert the mesh to a polysurface and try to intersect  
This might help …

> [@Perimeter points of a topo](https://forum.dynamobim.com/t/perimeter-points-of-a-topo/4757/5):
>
> You could convert topo mesh to a polysurface and extract perimeter curves [image]

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [July 25, 2016, 3:51pm UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/3 "2016-07-25T15:51:08Z")

</div>

Thanks @Vikram_Subbaiah. Now I have converted the mesh into a Solid.ByJoinedSurfaces(). When I now want to intersect my generated solids with the terrain solid, Geometry.IntersectAll results in an empty list´. I also tried Solid.DifferenceAll getting an error saying “cannot Difference two solids”.

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [July 25, 2016, 4:07pm UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/4 "2016-07-25T16:07:46Z")

</div>

@Fabian_Ritter You will need to provide some visual clues and/or files.

---

<div class="post-metadata">

### Author: ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)
#### Post date: [July 26, 2016, 1:30am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/5 "2016-07-26T01:30:18Z")

</div>

Isn’t the Revit method of doing that is with Topo, Pads, and Phases?

> **[About Reporting Cut and Fill Volumes on a Site | Revit Products | Autodesk...](https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Revit-Model/files/GUID-F9994BBC-027A-41B8-8852-FB33A34C3AC7-htm.html)**
>
> Revit can report cut and fill volumes on a site to aid in determining the costs of landscape modification during site development. Revit reports the values by making a comparison between a surface from one phase and, from a later phase, another...

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [July 26, 2016, 7:53am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/6 "2016-07-26T07:53:39Z")

</div>

@truevis: More or less, yes. But I need to create the second topo somehow. All I have is the imported mass of the terrain and my basements. I create the excavation volumes using a working space and the angle of embankment for the basements. I can then also import the new topo in Revit and use this method, but right now I cannot create the new surface.

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [July 26, 2016, 7:57am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/7 "2016-07-26T07:57:17Z")

</div>

@Vikram_Subbaiah: Here’s a screen shot.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/57fd8f402f1fc284ff42173f002599b090f19811.PNG)  
If I use the Intersect method, it works, but IntersectAll isn’t working. I also tried filtering first, because some of my solids do not intersect the geometry.

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [July 26, 2016, 7:59am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/8 "2016-07-26T07:59:57Z")

</div>

btw: DoesIntersect returns around 250 times true 🙂

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [July 26, 2016, 3:18pm UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/9 "2016-07-26T15:18:58Z")

</div>

_Geometry.Intersect_ will also work with multiple geometry.  
Try replacing _Geometry.IntersectAll_ with it. Change _Lacing_, if necessary.

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [August 10, 2016, 2:35pm UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/10 "2016-08-10T14:35:18Z")

</div>

First didn’t work either. But update Dynamo to version 1.1.0 helped a lot. Thanks for the help.  
Now the only problem left is that with intersect I get a lot of seperate solids. I have 5 groups of solids intersecting each other (you can also see it in the image) and I union them seperatly. For 4 groups everything works fine but for one of them I get the error message: “Warning:Solid.ByUnion failed. Unable union two Solids : INCONS\_COIN – coincident intersection edge previously non-coincident”. Any idea why this happens?

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [August 10, 2016, 3:50pm UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/11 "2016-08-10T15:50:37Z")

</div>

@Fabian_Ritter You really need to provide files for us to look at.

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [August 11, 2016, 9:55am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/12 "2016-08-11T09:55:27Z")

</div>

First I load the foundation in the 5 groups (grey group), then I get the base plane of every foundation and create a excavation volume (green group). This results in 5 lists of all the volumes. Now I like to join the volumes to 5 solids (they are all overlaping) to get the 5 intersection volumes to calculate the mass (red group). But the Solid.ByUnion operation fails for one List of solids with the error message described above

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/e/e4dec457f3dd262b1d8425c2b2ef75583cebff44.png)  
As you can see, I have found a work around for this. Nevertheless I like to know the reason for the error to avoid it in future projects…

---

<div class="post-metadata">

### Author: ![Monik\_Prabhu](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Monik\_Prabhu](https://forum.dynamobim.com/u/Monik_Prabhu)
#### Post date: [February 16, 2017, 6:33am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/13 "2017-02-16T06:33:21Z")

</div>

Its difficult to say why its failing since I dont have the files. Please feel free to email them to me  
at [monika.prabhu@autodesk.com](mailto:monika.prabhu@autodesk.com). Alternatively if this was a case with large dimension you can test them in 1.2.3.xxxx builds on [DynamoBIM.org](http://DynamoBIM.org) as we have fixed ASM scaling issue([https://github.com/DynamoDS/Dynamo/pull/6991](https://github.com/DynamoDS/Dynamo/pull/6991)). Please retest and let us know.

---

<div class="post-metadata">

### Author: ![Fabian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@Fabian\_Ritter](https://forum.dynamobim.com/u/Fabian_Ritter)
#### Post date: [February 17, 2017, 11:31am UTC](https://forum.dynamobim.com/t/best-way-to-intersect-solids-with-a-mesh/5202/14 "2017-02-17T11:31:24Z")

</div>

Hello @Monik_Prabhu, I have sent you an email with the geometry and script. Thanks, Fabian
