# Honeybe E+ context shading component splitting surfaces

**URL:** <https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762>\
**Category:** honeybee-legacy\
**Tags:** shading\
**Created:** [November 20, 2015, 7:58am UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762 "2015-11-20T07:58:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LudvigNyman](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/ludvignyman/32/26_2.png) [@LudvigNyman](https://discourse.ladybug.tools/u/LudvigNyman)\
**Post date:** [November 20, 2015, 7:58am UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/1 "2015-11-20T07:58:00Z")

</div>

Hi!  
  
When i input the surface attached in the example into the context shading component it splits the surface into two. This creates problems for me further down the pipeline.  
  
Why does it do it? (starting surface is checked to be planar)  
  
If i merge the surfaces after the context shading component has done its work, will they continue to behave as they should in e+ and hb generator?

Thanks!

[context geometry question.gh](https://discourse.ladybug.tools/uploads/default/original/2X/f/facdf67974f9e92ee4ef9fbc394886a8943ef8f8.gh) (81.3 KB)

---

<div class="post-metadata">

**Author:** ![LudvigNyman](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/ludvignyman/32/26_2.png) [@LudvigNyman](https://discourse.ladybug.tools/u/LudvigNyman)\
**Post date:** [November 20, 2015, 8:10am UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/2 "2015-11-20T08:10:00Z")

</div>

Update; two merged HB surface does not work like a single surface in HB components. I could have guessed that… 🙂

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mostapha/32/15244_2.png) [@mostapha](https://discourse.ladybug.tools/u/mostapha)\
**Post date:** [November 20, 2015, 5:51pm UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/3 "2015-11-20T17:51:00Z")

</div>

Hi Ludvig. EPContext component meshes all the surfaces regardless of being planar since I wanted to avoid any possible issues with EnergyPlus but now I can see how it can cause some real issues. For example I’m not sure if EnergyPlus can handle shading non-convex shading surfaces. Let me give it a try and see if I can create a cleaner version without re-writing the whole component.

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mostapha/32/15244_2.png) [@mostapha](https://discourse.ladybug.tools/u/mostapha)\
**Post date:** [November 20, 2015, 7:53pm UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/4 "2015-11-20T19:53:00Z")

</div>

Here you go:

[![](http://api.ning.com:80/files/bSwfCDfF4Fa9yun-ai1tAq8UV9w4iTXC8z7K*UQkxMIwMxOoctlMfLSMNmVvvnCkmy3HX-gSSWD4znABPBvdiThrBI4h3VUs/contextGeometry.png?width=721)](http://api.ning.com:80/files/bSwfCDfF4Fa9yun-ai1tAq8UV9w4iTXC8z7K*UQkxMIwMxOoctlMfLSMNmVvvnCkmy3HX-gSSWD4znABPBvdiThrBI4h3VUs/contextGeometry.png)

Haven’t tested it for enough cases so make sure to double check the outputs. Let me know if you found any cases that component fails to generate expected results.

[contextgeometryquestion\_msr.gh](https://discourse.ladybug.tools/uploads/default/original/2X/0/03033a54ad3296a2dab1f2f257d01e58ae34381c.gh) (81.5 KB)

---

<div class="post-metadata">

**Author:** ![AntonSzilasi](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/antonszilasi/32/8_2.png) [@AntonSzilasi](https://discourse.ladybug.tools/u/AntonSzilasi)\
**Post date:** [November 21, 2015, 3:22am UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/5 "2015-11-21T03:22:00Z")

</div>

Thanks Mostapha, when I tested it this fixed the problem that Ludvig was having. and saved me a lot of time thank you! Ive left you some comments on github about what you changed.

Cheers!

---

<div class="post-metadata">

**Author:** ![LudvigNyman](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/ludvignyman/32/26_2.png) [@LudvigNyman](https://discourse.ladybug.tools/u/LudvigNyman)\
**Post date:** [November 26, 2015, 4:16pm UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/6 "2015-11-26T16:16:00Z")

</div>

Thanks Mostapha! Your very quick fixing my question saved me alot of time, and made me stick to the tool. Which im thankful to now that im getting such nice results. Your update seems to solve al problems that i had.

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mostapha/32/15244_2.png) [@mostapha](https://discourse.ladybug.tools/u/mostapha)\
**Post date:** [December 2, 2015, 8:44am UTC](https://discourse.ladybug.tools/t/honeybe-e-context-shading-component-splitting-surfaces/762/7 "2015-12-02T08:44:00Z")

</div>

Hi Ludvig! Thank you for the kind comments. The real thanks goes to Anton for developing all the components for HB-Generation. I just fixed my old code that I should have written better in the first place anyways. Cheers.
