# Fix Oddly sized bounding boxes for FaceMe components

**URL:** <https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288>\
**Category:** Ruby API\
**Created:** [September 25, 2019, 8:24am UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288 "2019-09-25T08:24:26Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![CAUL](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@CAUL](https://forums.sketchup.com/u/CAUL)\
**Post date:** [October 13, 2019, 6:06am UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/21 "2019-10-13T06:06:37Z")

</div>

I also noted that the oversized box has the widht of the xy-diagonal of the tight box:

`bounds_oversized_x = Math::Sqrt(2 * bounds_tight_x**2)`

So, it seems obvious what Sketchup does, but not why. And it’s strange that the bounding box is dependent the camera.

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [October 13, 2019, 9:48am UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/22 "2019-10-13T09:48:07Z")

</div>

Please do not hesitate to file a bug report in the issue tracker …

- [Issues · SketchUp/api-issue-tracker · GitHub](https://github.com/SketchUp/api-issue-tracker/issues)

---

<div class="post-metadata">

**Author:** ![eneroth3](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/eneroth3/32/1222_2.png) [@eneroth3](https://forums.sketchup.com/u/eneroth3)\
**Post date:** [October 13, 2019, 12:12pm UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/23 "2019-10-13T12:12:40Z")

</div>

If an edge is drawn diagonally between the X and Y axis, that formula would still make the “rotary” bounding box include all content, while being based on the actual bounding box as opposed to being based directly on the geometry.

![2019-10-13_14h08_51](https://global.discourse-cdn.com/sketchup/original/3X/a/0/a09b959c22223809afc066580ce605349bcb25d5.png)  
 ![2019-10-13_14h08_48](https://global.discourse-cdn.com/sketchup/original/3X/b/f/bfba34fb24fa1f5ffbd503679ff6a410c5540eb4.png)  
 ![2019-10-13_14h09_01](https://global.discourse-cdn.com/sketchup/original/3X/1/9/19cc92bbb069e8923f2757e702369e1bfc92b890.png)

Seems to be special handling of special cases stacked on top of each other.

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [October 13, 2019, 1:01pm UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/24 "2019-10-13T13:01:12Z")

</div>

way back, we were informed that the ‘display’ bounds were broader so as not to be mistaken as edges by users…

and that as they were already part of the GUI, the API wasn’t designed to use them for anything more than ‘first round’ culling…

`Geom::BoundingBox.new` collecting target drawing elements was implemented for coding purposes…

there’s a Scott L blog or SCF post somewhere…

I’l see if I can find it, but at lot seems to have vanished in the ether…

john

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [October 13, 2019, 4:23pm UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/25 "2019-10-13T16:23:42Z")

</div>

> [@john\_drivenupthewall](#):
>
> way back, we were informed that the ‘display’ bounds were broader so as not to be mistaken as edges by users…

OH! I was confused by @CAUL’s terminology for the topic title.  
I thought he was really speaking of bounding boxes not **selected** boxes.  
I agree, they are two separate things. And currently there is no padding control for the latter.

---

<div class="post-metadata">

**Author:** ![CAUL](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@CAUL](https://forums.sketchup.com/u/CAUL)\
**Post date:** [October 13, 2019, 7:18pm UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/26 "2019-10-13T19:18:10Z")

</div>

Just to be clear, I’m interested in the Sketchup’s internal representation, that is, the size contained in `entity.bounds`.

The normal graphic oversizing in the viewport is if I’m correctly informed (by @eneroth3) a constant 30px in screen space or something like that. The problem under discussion is an oversizing by a factor `√2` of `entitiy.bounds`

---

<div class="post-metadata">

**Author:** ![eneroth3](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/eneroth3/32/1222_2.png) [@eneroth3](https://forums.sketchup.com/u/eneroth3)\
**Post date:** [October 13, 2019, 8:22pm UTC](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288/27 "2019-10-13T20:22:42Z")

</div>

> [@john\_drivenupthewall](#):
>
> way back, we were informed that the ‘display’ bounds were broader so as not to be mistaken as edges by users…

> [@CAUL](#):
>
> The normal graphic oversizing in the viewport is if I’m correctly informed (by @eneroth3) a constant 30px in screen space or something like that.

This applies to the box drawn when editing a group or component, not the actual bounding box/selection box.

[Previous page](https://forums.sketchup.com/t/fix-oddly-sized-bounding-boxes-for-faceme-components/104288.md?page=1)
