Holes (hwx.inspire.Holes)#

class Holes(populate=True, **kwds)#

Bases: list

Holes found in the model. The items in the list are HoleData.

Has members:

  • aligned - List of aligned holes.

  • singular - List of single holes.

  • minsize - The calculated smallest hole size in the model.

  • maxsize - The calculated largest hole size in the model.

Attribute Table#

Name

Type

holesDb

NoneType

Method Table#

Name

Description

getHoleFromFeature (self, feature, holeList=True)

Returns the holes found from the specified feature.

getUnfilteredHoleFromFeature (self, feature)

Returns aligned hole from specified feature.

getUnfilteredSingleHoleFromFeature (self, feature)

Returns the single hole found from specified feature.

makeDirty (self)

Repopulates the holes.

populate (self, minsize=None, maxsize=None, parts=None, holeType=None, cadParts=None)

Finds all the holes that satisfies the given condition.

populate(minsize=None, maxsize=None, parts=None, holeType=None, cadParts=None)#

Finds all the holes that satisfies the given condition.

Parameters:
  • minsize (float) – Get the holes with a size larger than minsize.

  • maxsize (float) – Get the holes with a size smaller than maxsize.

  • parts (Part,list[Part]) – Get the holes for these parts.

  • holeType (str) – Filters the hole based on type. Allowed types are ‘through’, ‘blind’ and ‘all’.

  • cadParts (bool) – If true, finds existing geometry in holes.

makeDirty()#

Repopulates the holes.

getHoleFromFeature(feature, holeList=True)#

Returns the holes found from the specified feature.

Parameters:
  • feature (Feature) – Part feature on which holes need to be found.

  • holeList (bool) – If True, returns the holes as a list.

Returns:

Holes found from the feature.

Return type:

Holes

getUnfilteredSingleHoleFromFeature(feature)#

Returns the single hole found from specified feature.

Parameters:

feature (Feature) – Part feature on which single hole need to be found.

Returns:

Single Hole found from the feature.

Return type:

Hole

getUnfilteredHoleFromFeature(feature)#

Returns aligned hole from specified feature.

Parameters:

feature (Feature) – Part feature on which aligned hole need to be found.

Returns:

Aligned Hole found from the feature.

Return type:

AlignedHole