# Minimal Bounding Calculation in HOOPS Communicator

**URL:** <https://forum.techsoft3d.com/t/minimal-bounding-calculation-in-hoops-communicator/1615>\
**Category:** HOOPS Visualize Web\
**Tags:** code, webviewer\
**Created:** [February 20, 2023, 8:27pm UTC](https://forum.techsoft3d.com/t/minimal-bounding-calculation-in-hoops-communicator/1615 "2023-02-20T20:27:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guido](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/guido/32/115_2.png) [@guido](https://forum.techsoft3d.com/u/guido)\
**Post date:** [February 20, 2023, 8:27pm UTC](https://forum.techsoft3d.com/t/minimal-bounding-calculation-in-hoops-communicator/1615/1 "2023-02-20T20:27:23Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/1X/516d00f367bb48b78be654f149b4d8c3a77dcab7.jpeg)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/1X/e0288ba8c27531a4484235cf06e7b8691da26f0a.png)

The class below calculates the minimal bounding box for a node in HOOPS Communicator. This is the most tightly fitting non axis-aligned bounding box around the geometry contained within a node. Calculating this bounding box can be useful for volume calculations and measurements and is functionality often found in various CAD applications. As a bonus, this class can also calculate the convex hull for a node.

You can learn more here:

> **[GitHub - techsoft3d/ts3d-hc-minmalbounding](https://github.com/techsoft3d/ts3d-hc-minmalbounding)**
>
> Contribute to techsoft3d/ts3d-hc-minmalbounding development by creating an account on GitHub.

See here for a live 3D Sandbox demo:  
[https://3dsandbox.techsoft3d.com/?snippet=3GAnpHSmkLRLI8pwWNQBL0&autorun=true](https://3dsandbox.techsoft3d.com/?snippet=3GAnpHSmkLRLI8pwWNQBL0&autorun=true)

---

<div class="post-metadata">

**Author:** ![erduowang1995](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@erduowang1995](https://forum.techsoft3d.com/u/erduowang1995)\
**Post date:** [March 1, 2024, 9:59am UTC](https://forum.techsoft3d.com/t/minimal-bounding-calculation-in-hoops-communicator/1615/2 "2024-03-01T09:59:03Z")

</div>

Can you generate minimum Bounding in markup form ？  
I use MinimalBounding calculateMinimalBounding this method to get to the variables of the smallest min and Max, and then use the BoundingBoxMarkup. Js to generate markup, found position is not right. As shown in the figure  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/6/60dc52e8282facdd05f0c1ef7043e5b472c24e6a.png)

Look forward to receiving a reply

---

<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:** [March 3, 2024, 5:14pm UTC](https://forum.techsoft3d.com/t/minimal-bounding-calculation-in-hoops-communicator/1615/3 "2024-03-03T17:14:00Z")

</div>

Hello @erduowang1995,

Unfortunately, a key limitation with using the bounding box markup is that the bounding box is restricted to being [axis-aligned](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Box.html#Communicator.Box). As stated in the docs:

> _Represents an axis-aligned bounding box. A box is represented by a minimum and maximum point which describe the extents of the box._

In the case of the moto model in your pic, the bounding box is oriented lengthwise along the y-axis.

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![erduowang1995](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@erduowang1995](https://forum.techsoft3d.com/u/erduowang1995)\
**Post date:** [March 7, 2024, 2:10am UTC](https://forum.techsoft3d.com/t/minimal-bounding-calculation-in-hoops-communicator/1615/4 "2024-03-07T02:10:03Z")

</div>

Thank you for your reply. I solved it through matrix’s transform
