SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
38 stars 10 forks source link

C API has no direct boolean functions to test for manifold volumes #90

Open DanRathbun opened 6 years ago

DanRathbun commented 6 years ago

SketchUp C API Enhancement

C API has no direct boolean functions to test 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

Secondly coders 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.)

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

thomthom commented 6 years ago

Logged as SU-40194