- shells = self.geompyD.SubShapeAllIDs( self.geom, geompyDC.ShapeType["SHELL"] )
- if len( shells ) > 0 :
- return 3
- elif self.geompyD.NumberOfFaces( self.geom ) > 0 :
- return 2
- elif self.geompyD.NumberOfEdges( self.geom ) > 0 :
- return 1
+ if self.mesh.HasShapeToMesh():
+ shells = self.geompyD.SubShapeAllIDs( self.geom, geompyDC.ShapeType["SOLID"] )
+ if len( shells ) > 0 :
+ return 3
+ elif self.geompyD.NumberOfFaces( self.geom ) > 0 :
+ return 2
+ elif self.geompyD.NumberOfEdges( self.geom ) > 0 :
+ return 1
+ else:
+ return 0;