# Issue with mustBeFullyContained = true in beginConvexPolyhedronSelection API

**URL:** <https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574>\
**Category:** HOOPS Visualize Web\
**Tags:** knowledge-base\
**Created:** [April 21, 2025, 9:08am UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574 "2025-04-21T09:08:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cad-developer](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cad-developer](https://forum.techsoft3d.com/u/cad-developer)\
**Post date:** [April 21, 2025, 9:08am UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574/1 "2025-04-21T09:08:33Z")

</div>

Hello TechSoft3D,

I’ve encountered an issue while using the `beginConvexPolyhedronSelection` API. I created a bounding region by selecting a node. To find nodes inside bounding box and overlapping with the bounding box I used ‘beginConvexPolyhedronSelection’ API. However, when I set `config.mustBeFullyContained = true`, the node used to create the bounding region is not being returned as included or inside bounding box.

As shown in the screenshot shared below, the node appears to be slightly touching the bounding box. Despite that, it’s not being included in the selection when the `mustBeFullyContained` flag is set to true.

Interestingly, when I set `config.mustBeFullyContained = false`, the node is included in bounding box.

Ideally, even with `mustBeFullyContained = true`, I would expect the node to be lies entirely within the bounding region.

Could you please clarify if this is the expected behavior, or if there might be a precision issue or configuration setting that needs adjustment?

 ![Screenshot from 2025-04-21 14-26-02](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/3/3cfa30883c492ece6f38740ba156ffcd90614691.png)

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [April 21, 2025, 12:55pm UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574/2 "2025-04-21T12:55:44Z")

</div>

Hello @cad-developer,

The results you are getting are very likely due to precision “errors.” Our recommendation here is to implement an epsilon variable for the bounding box dimension (so an infinitesimally larger bounding box).

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![cad-developer](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cad-developer](https://forum.techsoft3d.com/u/cad-developer)\
**Post date:** [April 23, 2025, 11:59am UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574/3 "2025-04-23T11:59:59Z")

</div>

Wouldn’t it be technically incorrect to add an external variable in this context? Since we also need to identify nodes overlapping a bounding box, using an external variable could result in inaccurate node IDs.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [April 23, 2025, 12:35pm UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574/4 "2025-04-23T12:35:46Z")

</div>

I would agree that on a purely technical vantage point, the extra buffer should not be needed. That said, part of the bounding box boundary is **co-planar** with that of the model. In this particular situation, having such a buffer makes more sense.

In the context of collision detection, buffer zones are typically implemented to provide for hard and soft clashes. More information on this can be found in a [previous forum post on this very topic](https://forum.techsoft3d.com/t/clash-detection-library-for-hoops-communicator-released/2149).

---

<div class="post-metadata">

**Author:** ![cad-developer](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cad-developer](https://forum.techsoft3d.com/u/cad-developer)\
**Post date:** [April 24, 2025, 6:24am UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574/5 "2025-04-24T06:24:46Z")

</div>

Can you provide the value of infinitesimally small value of epsilon? How small it should be?

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [April 24, 2025, 11:58am UTC](https://forum.techsoft3d.com/t/issue-with-mustbefullycontained-true-in-beginconvexpolyhedronselection-api/4574/6 "2025-04-24T11:58:41Z")

</div>

Well, the rule of thumb for epsilon `1e-6` but there is no one-size-fits-all answer. Our recommendation is test on the types of models you will typically load to gain empirical data.
