# Is there a function to know a group or a component is a solid group or a solid component?

**URL:** <https://forums.sketchup.com/t/is-there-a-function-to-know-a-group-or-a-component-is-a-solid-group-or-a-solid-component/68041>\
**Category:** SketchUp SDK\
**Created:** [May 8, 2018, 2:43am UTC](https://forums.sketchup.com/t/is-there-a-function-to-know-a-group-or-a-component-is-a-solid-group-or-a-solid-component/68041 "2018-05-08T02:43:39Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 8, 2018, 6:05pm UTC](https://forums.sketchup.com/t/is-there-a-function-to-know-a-group-or-a-component-is-a-solid-group-or-a-solid-component/68041/5 "2018-05-08T18:05:04Z")

</div>

> [@xqtyler](#):
>
> how about C?

**In a roundabout way yes.**

Firstly, groups would need to be cast to a ComponentInstance using …  
[**`SUGroupToComponentInstance`**](http://extensions.sketchup.com/developer_center/sketchup_c_api/sketchup/group_8h.html#ac7c5d6dec08538a51b86a61f4aa66066)

Secondly you would attempt to get the volume of the instance using …  
[**`SUComponentInstanceComputeVolume`**](http://extensions.sketchup.com/developer_center/sketchup_c_api/sketchup/component__instance_8h.html#a396ef27f192815c9f882f4859fe1e8bc), and test the result for not **`SU_ERROR_NO_DATA`**  
(which is returned if the instance is **not manifold**.)

* * *

_Enhancement Issue logged:_

> <https://github.com/SketchUp/api-issue-tracker/issues/90>
>
> \### SketchUp C API Enhancement
> 
> \*\*C API has no direct boolean functions to tes…t for manifold volumes.\*\*
> 
> Coders are forced into a roundabout way to test volume for a particular error.
> 
> Firstly, groups need to be cast to a ComponentInstance using ...
> \[\*\*\`SUGroupToComponentInstance\`\*\*\](http://extensions.sketchup.com/developer\_center/sketchup\_c\_api/sketchup/group\_8h.html#ac7c5d6dec08538a51b86a61f4aa66066)
> 
> Secondly coders attempt to get the volume of the instance using ...
> \[\*\*\`SUComponentInstanceComputeVolume\`\*\*\](http://extensions.sketchup.com/developer\_center/sketchup\_c\_api/sketchup/component\_\_instance\_8h.html#a396ef27f192815c9f882f4859fe1e8bc), and test the result for not \*\*\`SU\_ERROR\_NO\_DATA\`\*\* 
> (which is returned if the instance is \*\*not manifold\*\*.)
> 
> This workflow could be wrapped into \*\*\`SUComponentInstanceIsManifold\`\*\* and \*\*\`SUGroupIsManifold\`\*\* functions that return boolean (and in the case of group does the casting inside the function.).
> 
> \----
> 
> \_REF Public Forum Thread:\_ 
> https://forums.sketchup.com/t/is-there-a-function-to-know-a-group-or-a-component-is-a-solid-group-or-a-solid-component/68041

---

_[View the full topic](https://forums.sketchup.com/t/is-there-a-function-to-know-a-group-or-a-component-is-a-solid-group-or-a-solid-component/68041)._
