convexHull

Hi all,

I would like to simplify certain parts of the geometry in my model.
I tried using decimate or convexHull from ‘vcGeometrySet’ but I keep getting this error:


Does anyone know what the problem might be here?

Also, is there a way to automatically finds childs in childs in childs… all the way till the lowest level?

convexHull is a method of vcTriangleSet.

In your code you are traversing the children of a geometry feature, what you need to do is get the list of geometry sets of your geometry feature, check which ones are of type VC_TRIANGLESET and call the convexHull method on them.

sets = myGeometryFeature.Geometry.GeometrySets
for s in sets:
  if s.Type == VC_TRIANGLESET:
    s.convexHull(False)

getComponent().rebuild()
1 Like

Thanks alot ccamilo!!