# Unfolded complication

**URL:** <https://forum.dynamobim.com/t/unfolded-complication/70897>\
**Category:** Revit\
**Tags:** dynamo, unfold\
**Created:** [November 30, 2021, 3:16pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897 "2021-11-30T15:16:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 3:16pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/1 "2021-11-30T15:16:36Z")

</div>

Morning all, I’m appreciative of all the help I have received so far in exploring dynamo but I am again at a loss and hoping for some assistance. I am simply experimenting with the unfold package because I think it could be extremely useful and so mocked up a rather simple model. I believe that the issues I’m having are simple fixes but I have run out of ideas.

For reference, I’ve been referring to [Unfold Surface Not Working - #8 by bayowindapo](https://forum.dynamobim.com/t/unfold-surface-not-working/56271/8) to attempt this and currently have:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/8/88706f654f68f5f73d2ca9eb46ffe30c9ee12ed6.png)

**Issue #1**  
This roof is not complex, but the geometry generated in Dynamo segments the flat planes (highlighted lines are the ones of concern):

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/f/eff9e52c193a89b22f3d272af76e3b295e58d6e7.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/f/7f1e819f6980c9d56b87536db7471728d37a0b6b.png)

**Issue #2**  
I have yet to figure out how to spread the unfolded elements so that they do not stack on top of each other. I’ve blindly changed all the Code Block values individually but have yet to succeed:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/d/5d2ff3bf5fc19c22feb828194ad06a4bbfaf55bc.png)

**Issue #3**  
The above referenced forum post shows what appears to be a simple string to then output the unfolded geometry into a drafting view using a node called `DetailLine.FromCurve`. I have not been able to find any reference to that node, nor something similar. What am I missing? I feel this is a rookie question but I have not had the opportunity to export anything from Dynamo into a drafting view so this is completely foreign.

I gladly appreciate any suggestions you all may have, I have loved learning Dynamo and hope to someday be able to contribute instead of asking. Shout out to @Daniel_Hurtubise who has been very helpful to this newbie trying to earn his wings.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 30, 2021, 3:23pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/2 "2021-11-30T15:23:12Z")

</div>

`DetailLine.FromCurve` is a core Revit node. As long as you’re using Dynamo for Revit you should have access to it.

As for laying out your pieces, I suggest getting the `BoundingBox` of each object and then offsetting them (with a buffer) to create an array of pieces.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 3:27pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/3 "2021-11-30T15:27:45Z")

</div>

Yeah I thought I had seen `DetailLine.FromCurve` but couldn’t find it. I continued trying after posting and `DetailCurve.ByCurve` seems to have worked.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/b/7bb1c54bc70ea93817ab29e21d799a88bb25a60c.png)  
Not sure if its the best solution, but it is _A_ solution.

I appreciate the quick response @Nick_Boyts. I think I’ve seen a couple posts about `BoundingBox` but have not used them yet. Anything in particular I need to be aware of before I explore?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 30, 2021, 3:30pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/4 "2021-11-30T15:30:31Z")

</div>

Ah, that’s the node. The name must have just changed.

Bounding boxes are pretty straight forward. You can use them to get the min and max point at therefore determine the (orthogonal) extents of the object.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 3:36pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/5 "2021-11-30T15:36:14Z")

</div>

Nice, I like straight forward! I’m playing with `Bounding Box` now, but have another rookie question… Where do I insert the node? Is it in place of something, or between two nodes?

In my attempts so far, it either does nothing or deletes the geometry entirely.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 3:47pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/6 "2021-11-30T15:47:25Z")

</div>

I did stumble across the Bimorph package while googling for Bounding Box help. Not sure if I’m on the right path, but I made this and trying to understand where to place it:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/e/0ea17c6828c540fbbadeb57ed83e5eab72d8eb0f.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 30, 2021, 4:57pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/7 "2021-11-30T16:57:54Z")

</div>

You want `BoundingBox.ByGeometry` so that you can get the extents of each of the roof pieces.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 5:04pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/8 "2021-11-30T17:04:45Z")

</div>

Thanks! (hopefully last question 🤞)… now what do I do with `BoundingBox.ByGeometry`?

[Dynamo Unfold v4.dyn](https://forum.dynamobim.com/uploads/short-url/d0YMwP1hCviWFYGMgPrmq5iuNKM.dyn) (455.4 KB)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 30, 2021, 5:17pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/9 "2021-11-30T17:17:32Z")

</div>

You would use that on each of the unfolded roof geometries to get a bounding box for each piece. You can then get the min and max points of those bounding boxes to determine the extents (length and width) of each piece. With the extents of each piece, you should then be able to translate each piece (consecutively) into an array of non-overlapping pieces.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 5:31pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/10 "2021-11-30T17:31:07Z")

</div>

Ok, so am I correct in thinking that it goes between the `unfoldingObject` output (Unfolding.UnfoldListOfSurfaces\_AndreturnTransforms) and the `unfolding` input (Unfolding.PackUnfoldedSurfaces)?

I do appreciate the guidance @Nick_Boyts and sincerely feel bad for asking so many questions, just trying to head around the functionality. And when this finally gets resolved, I will (1) share for others who may have the same issues but more importantly (2) make massive code blocks giving you, and whoever else contributes, all the credit you deserve!

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/d/bdf1d9a3af6346a97a15ef0c78e5c5695089cb71.png)  
[Dynamo Unfold v4.dyn](https://forum.dynamobim.com/uploads/short-url/qYgMdfrv8vElkQ6dX8WN06ixKZZ.dyn) (28.4 KB)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 30, 2021, 5:37pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/11 "2021-11-30T17:37:39Z")

</div>

I’m guessing those two nodes have to work together. The bounding box is for whatever geometry you’re left with, either the surfaces or the boundary curves, after everything has been unfolded. All you’re doing now is moving the geometries so they don’t overlap each other when you draw them in your drafting view.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 5:40pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/12 "2021-11-30T17:40:47Z")

</div>

Good explanation, makes sense. And yes, you were correct, those two nodes do still have to be connected.

Now I’m playing with where do place the `BoundingBox.ByGeometry` node to get results but coming up short. Clearly I’m making a newbie mistake and/or overthinking it. I thought I was so close 😔

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 30, 2021, 6:03pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/13 "2021-11-30T18:03:07Z")

</div>

I assume your goal is to get the unfolded geometry and redraw it in a drafting view. Converting the unfolded boundary curves directly to detail lines would leave them overlapping. Before drawing the new lines in the drafting view, you’ll want to “move” the roof geometries to no longer overlap. This is where you get the bounding box and determine how far you have to move them.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 6:16pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/14 "2021-11-30T18:16:31Z")

</div>

Sounds so clear and easy when said by somebody in the know!

Yeah everything you stated makes perfect sense to me in theory. Not sure what easy thing I’m not doing but I’m determined to figure it out.

Note to Self:

1. Select Items to unfold
2. _undiscovered magic to bound/move_
3. convert curves to detail lines
4. appear in Revit view.

---

<div class="post-metadata">

**Author:** ![Michael\_Kirschner2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/michael_kirschner2/32/75576_2.png) [@Michael\_Kirschner2](https://forum.dynamobim.com/u/Michael_Kirschner2)\
**Post date:** [November 30, 2021, 7:11pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/15 "2021-11-30T19:11:05Z")

</div>

The packunfoldedsurfaces node should pack your unfolded parts onto a plane, given that the height and width of the plane you have specified is large enough. Increase the height and width - this will depend on what units you have set in Revit, and how large your surfaces are.

You should not need to manually layout the parts using bounding boxes, that is what the node does.

---

<div class="post-metadata">

**Author:** ![bayowindapo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bayowindapo/32/184532_2.png) [@bayowindapo](https://forum.dynamobim.com/u/bayowindapo)\
**Post date:** [November 30, 2021, 8:29pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/16 "2021-11-30T20:29:39Z")

</div>

Hey man

The first issue is that you are tesselating already flat surfaces of the roof, resulting in your roof geometry triangulating. As @Michael_Kirschner2 said, you do not need to unpack the surfaces individually. The Unfolding.PackUnfoldedSurfaces node does that for you. See the dyn file and images attached. This should help.  
Good luck

 ![Unfold 3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/7/d7523c80ff330b7b546fbd22c1c96860b891aa92.png)  
 ![Unfold 2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/6/d6892c2202b09d58c7df7005cd08a58a45540805.png)  
 ![Unfold 1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/0/40e97505d8d919e6b46cf3edb41670d1a17a5655.png)  
!

Please mark this answer if it is the solution.  
[Surface Unfold\_Planar Faces.dyn](https://forum.dynamobim.com/uploads/short-url/zYo8vfTg1jszxj1LHaNkd04n6M6.dyn) (30.5 KB)

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 9:01pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/17 "2021-11-30T21:01:53Z")

</div>

ok, so if I’m understanding you right @Michael_Kirschner2, I should delete the `Unfolding._TesselateSurfaces`, `Unfolding.UnfoldListOfSurfaces_AndreturnTransforms` nodes and go straight from the `Select Face` to the unfolding input on `Unfolding.PackUnfoldedSurfaces`?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/6/46304cf317fa2b0aad5731bf6f701ef5f1ee3fdc.png)

When attempted, it returns an error.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/1/612a13aff061cdbff6f945ccd1a5345d6622974e.jpeg)

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 9:08pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/18 "2021-11-30T21:08:39Z")

</div>

Thanks @bayowindapo for the explanation on the first issue. It makes perfect sense about tessellating an already flat object – not sure why I didn’t think of that. I am also grateful for the sample .dyn you added to help guide me.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/2/b25ab13df3e63b353cfc4c1c1b2673f9f6309235.png)

When I tried it though it returned this error:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/c/8c612a7533944827411296a015fa2fe865dfdae2.jpeg)

Any idea where I messed up?

---

<div class="post-metadata">

**Author:** ![bayowindapo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bayowindapo/32/184532_2.png) [@bayowindapo](https://forum.dynamobim.com/u/bayowindapo)\
**Post date:** [November 30, 2021, 9:16pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/19 "2021-11-30T21:16:18Z")

</div>

I can’t tell where the error is. Try replacing all the nodes I have created with the nodes from your dynamo software.

---

<div class="post-metadata">

**Author:** ![ttunate](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@ttunate](https://forum.dynamobim.com/u/ttunate)\
**Post date:** [November 30, 2021, 9:17pm UTC](https://forum.dynamobim.com/t/unfolded-complication/70897/20 "2021-11-30T21:17:56Z")

</div>

If this is rookie hazing @bayowindapo I’ll be pissed (and slightly entertained), but ok… doing that now

[Next page](https://forum.dynamobim.com/t/unfolded-complication/70897.md?page=2)
