xqtyler:
how about C?
In a roundabout way yes.
Firstly, groups would need to be cast to a ComponentInstance using …
SUGroupToComponentInstance
Secondly you would attempt to get the volume of the instance using …
SUComponentInstanceComputeVolume
, and test the result for not SU_ERROR_NO_DATA
(which is returned if the instance is not manifold .)
Enhancement Issue logged:
opened 06:15PM - 08 May 18 UTC
enhancement
C API
SketchUp
logged
parity
### 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
1 Like