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


#1

Hi Experts,

A Solid in SketchUp is a single Group or Component whose geometry meets certain conditions. When those conditions are met, Entity Info in SketchUp application indicates the model is a Solid Group or Solid Component.

In SketchUp SDK, is there a function to know a group or a component is a solid group or a solid component? Or Is there a function, its input is faces, then output is to tell you if these faces can be converted as a solid or not?

Thanks
Phenix


#2

Hi Experts,

In SKP SDK, there are two functions ‚ÄúSUComponentDefinitionOrientFacesConsistently()‚ÄĚ and ‚ÄúSUModelOrientFacesConsistently‚ÄĚ which can fix the face orientation issue. Could you please give more comments about their differences?

Thanks
Phenix


#3

In ruby the function is group.manifold?
It returns true if the group is a solid.


#4

how about C?


#5

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:


#6

5 posts were split to a new topic: Orienting faces consistently with the SDK