# Trimming curves(lines) by elements(surfaces, boundingboxs or solids)

**URL:** <https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923>\
**Category:** Geometry\
**Created:** [August 16, 2022, 9:28am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923 "2022-08-16T09:28:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 9:28am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/1 "2022-08-16T09:28:33Z")

</div>

How do I cut the parts of lines(Red highlighted) which cross the elements?  
I tried with Curve.Solidintersection, but only worked for first lines. I also tried to change lacing but still couldn’t get the correct result.  
And the first line, which is cut also a bit weird. I placed structural framing on the lines(the lines length is okay) but there are gaps between the elements. To reach my goals which nodes do I need to use?

 ![Q. Trim lines by elements](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/9/29df26f9946fa7aa913105e2453fb48423848260.jpeg)  
 ![Q. Trim lines by elements2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/4488c5d69839e84ca0df4ed3b60e631e5189c207.png)

---

<div class="post-metadata">

**Author:** ![gilberto.arechigaiba](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gilberto.arechigaiba/32/204980_2.png) [@gilberto.arechigaiba](https://forum.dynamobim.com/u/gilberto.arechigaiba)\
**Post date:** [August 16, 2022, 9:39am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/2 "2022-08-16T09:39:29Z")

</div>

Hola Amigo @jaeho Geometry.Intersect Works fine I think, but maybe you have to clean the list or fix Levels, hope this gives you some ideas.

 ![Sphere vs Lines](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/a/ba44a587c4684fbf1b871a715602132dcc3efe9b.jpeg)

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [August 16, 2022, 9:53am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/3 "2022-08-16T09:53:17Z")

</div>

Hello,  
you can manage to find your points of intersection  
afterwards:  
Determine the relative distances (of each point of intersection) compared to the total distance of your line of Section L (D1/L, D2/L,…)

then use the trim segment with these same parameters

(afterwards I don’t know with the roundings…)

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 9:55am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/4 "2022-08-16T09:55:16Z")

</div>

![Q. Trim lines by elements3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/c/bcfb98466ad0b2a19a13988e07f5c7a02693734b.png)  
It doesn’t work for me…

---

<div class="post-metadata">

**Author:** ![gilberto.arechigaiba](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gilberto.arechigaiba/32/204980_2.png) [@gilberto.arechigaiba](https://forum.dynamobim.com/u/gilberto.arechigaiba)\
**Post date:** [August 16, 2022, 10:13am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/5 "2022-08-16T10:13:09Z")

</div>

@jaeho Amigo, you are comparing full lines vs solids, frankly it seems very strange that the node does not work, it is made precisely for that, what do you think @christian.stan ?

 ![Cuboid vs Lines](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/5/556c6ac83512b923a66d164639eb799692a4fa1b.jpeg)

---

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 10:33am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/6 "2022-08-16T10:33:03Z")

</div>

I followed your way by using the Geometry. Intersect node (same nodes, levels and lacing) but the result is different…  
Did I put any inputs wrong?

 ![Q. Trim lines by elements4](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/b/7b971eac3dfdc6967b872166b35854175a0afde0.png)

---

<div class="post-metadata">

**Author:** ![gilberto.arechigaiba](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gilberto.arechigaiba/32/204980_2.png) [@gilberto.arechigaiba](https://forum.dynamobim.com/u/gilberto.arechigaiba)\
**Post date:** [August 16, 2022, 10:54am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/7 "2022-08-16T10:54:13Z")

</div>

Amigo @jaeho You don’t seem to have put anything wrong, you even have a result, can you share your file to look at it carefully? if possible of course! what version of revit are you using?

---

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 11:05am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/8 "2022-08-16T11:05:59Z")

</div>

Thank you for your checking!  
Sorry, the file is related to my work. so I can not share it;  
I’m using Revit 2020.2.5 and Dynamo 2.3.1

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [August 16, 2022, 11:55am UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/9 "2022-08-16T11:55:51Z")

</div>

you can try following this approach

 ![16 aoutforum anglais_2022-08-16_01-51-06](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/2/624b6882541d169fe2db6d6286d28e00a1e06e09.png)

[16 aoutforum anglais.dyn](https://forum.dynamobim.com/uploads/short-url/8o0ulfO4sTsgVLk2AHPZPclzVH0.dyn) (69.0 KB)

 ![Capture d’écran 2022-08-16 135455](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/7/7770302c54c802eec5aee4af9329f9164ae14b41.jpeg)

Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 12:21pm UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/11 "2022-08-16T12:21:25Z")

</div>

Hi, Thank you for your approach.

Unfourtunately, I couldn’t understand that which nodes that I can connect my lines to be trimmed.

and What does the number slider work for?

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [August 16, 2022, 12:24pm UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/12 "2022-08-16T12:24:58Z")

</div>

In fact, I project the line on a surface with voids, so no lines at the places of the voids (the result)

edit:  
the front part of the script is an essay of resembling geometry (“which approximates± your geometry”)  
Cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 12:34pm UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/13 "2022-08-16T12:34:17Z")

</div>

Thank you for your explanation.

In your picture, I could see that you selected 65th value from Topology.Faces,is there any reasons for that?

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [August 16, 2022, 12:49pm UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/14 "2022-08-16T12:49:25Z")

</div>

As screenshot 2 (I took this one as the largest and lowest surface)

edit: more or less manual lazy way  
(Else: if complete approach:  
Vector whose surface normal is almost equal to the component vector (0,0,-1))  
cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![jaeho](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jaeho](https://forum.dynamobim.com/u/jaeho)\
**Post date:** [August 16, 2022, 12:59pm UTC](https://forum.dynamobim.com/t/trimming-curves-lines-by-elements-surfaces-boundingboxs-or-solids/79923/15 "2022-08-16T12:59:41Z")

</div>

Wow. You made me go home from my office today!.  
Thank you so much!
