pycatia.part_interfaces.hole

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.part_interfaces.hole.Hole(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
MecModInterfaces.Shape
PartInterfaces.SketchBasedShape
Hole

Hole Feature in Part Design.
property anchor_mode: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property AnchorMode() As CatHoleAnchorMode

Returns the hole anchor mode.
This information is pertinent when hole type is Counterbored or
Counterdrilled only.

Returns:
oMode The hole anchor mode (see CatHoleAnchorMode for list of possible
types)

Example:
The following example returns in holeAnchorMode the anchor mode of
hole firstHole:

Set holeAnchorMode = firstHole.AnchorMode
Returns:

enum cat_hole_anchor_mode

Return type:

int

property bottom_angle: Angle

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property BottomAngle() As Angle (Read Only)

Returns the hole bottom angle.
This call is valid when the hole bottom type is : VBottom.

Returns:
oBottomAngle An Angle object controlling the hole bottom angle (see
Angle for more information)

Example:
The following example returns in holeBottomAngle the bottom angle
of hole firstHole:

Set holeBottomAngle = firstHole.BottomAngle
Return type:

Angle

property bottom_limit: Limit

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property BottomLimit() As Limit (Read Only)

Returns the bottom limit.
This call is valid when the hole bottom type is : BlindHole or ThruHole.

Returns:
oBottomLimit A Limit object controlling the hole bottom limit (see
Limit for more information)

Example:
The following example returns in holeBottomLimit the bottom limit
of hole firstHole:

Set holeBottomLimit = firstHole.BottomLimit
Return type:

Limit

property bottom_type: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property BottomType() As CatHoleBottomType

Returns the hole bottom type.

Returns:
oBottomType The hole bottom type (see CatHoleBottomType for list of
possible types)

Example:
The following example returns in holeBottomType the bottom type of
hole firstHole:

Set holeBottomType = firstHole.BottomType
Returns:

enum cat_hole_bottom_type

Return type:

int

property counter_sunk_mode: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property CounterSunkMode() As CatCSHoleMode

Returns the mode of a countersunk hole .

Returns:
CSMode Value of the countersunk mode (see CatCSHoleMode for list of
possible types)

Example:
The following example returns in CSMode the CSMode of hole
firsthole:

Set CSMode = firsthole.CounterSunkMode
Returns:

enum cat_cs_hole_mode

Return type:

int

create_standard_thread_design_table(i_standard_type: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub CreateStandardThreadDesignTable(CatHoleThreadStandard
iStandardType)

Creates a Standard Thread design table .
This call is valid when the hole threading mode is : CATThreadedHoleThreading.

Parameters:

iStandardType
Standard type for thread (see

CatHoleThreadStandard for list of possible types)

Example:
The following example creates a standard table for MetricThinPitch
for hole firstHole:

firstHole.CreateStandardThreadDesignTable
catHoleMetricThinPitch
Parameters:

i_standard_type (int) – enum cat_hole_thread_standard

Return type:

None

create_user_standard_design_table(i_standard_name: str, i_path: str) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub CreateUserStandardDesignTable(CATBSTR iStandardName,
CATBSTR iPath)

Creates a UserStandard Thread design table .
This call is valid when the hole threading mode is : CATThreadedHoleThreading.

Parameters:

iStandardName
Name of the UserStandard thread. iStandardName should be empty if
filepath is to be defined.
iPath
Path of the UserStandard file. iPath is empty if the filepath is
already defined through CATReffilesPath.

Example1:
The following example creates a standard table for UserStandard
for hole firstHole. The file path is already defined thru
CATReffilesPath:

firstHole.CreateUserStandardDesignTable
“UserStandard”,””

Example2:
The following example creates a standard table for UserStandard
for hole firstHole when file path is not defined thru
CATReffilesPath:

firstHole.CreateUserStandardDesignTable
“”,”E:userstandardUserStandard.txt”
Parameters:
  • i_standard_name (str) –

  • i_path (str) –

Return type:

None

property diameter: Length

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Diameter() As Length (Read Only)

Returns the hole diameter.

Returns:
oDiameter A Length object controlling the hole diameter (see Length for
more information)

Example:
The following example returns in holeDiam the diameter of hole
firstHole:

Set holeDiam = firstHole.Diameter
Return type:

Length

get_direction(io_direction: tuple) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetDirection(CATSafeArrayVariant ioDirection)

Returns the hole direction with absolute coordinates.
It provides a safe array with 3 elements : X, Y, Z direction coordinates

Returns:
oDirection The direction coordinates

Example:
The following example returns in dirArray the direction coordinates
of hole firstHole:

Call firstHole.GetDirection dirArray
Set x = dirArray[1]
Set y = dirArray[2]
Set z = dirArray[3]
Parameters:

io_direction (tuple) –

Return type:

None

get_origin(io_origin: tuple) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetOrigin(CATSafeArrayVariant ioOrigin)

Returns the origin point which the hole is anchored to.
This point belongs to a tangent plane.

Returns:
oOrigin A Safe Array made up of 3 doubles : X, Y, Z - Hole origin point coordinates

Example:
The following example returns in coordArray the coordinates of hole
firstHole:

Call firstHole.GetOrigin coordArray
Set x = coordArray[1]
Set y = coordArray[2]
Set z = coordArray[3]
Parameters:

io_origin (tuple) –

Return type:

None

property head_angle: Angle

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property HeadAngle() As Angle (Read Only)

Returns the hole head angle.
This call is valid when the hole type is : Tapered or Counterdrilled or Countersunk.

Returns:
oHeadAngle An Angle object controlling the hole head angle (see Angle
for more information)

Example:
The following example returns in holeHeadAngle the head angle of
hole firstHole:

Set holeHeadAngle = firstHole.HeadAngle
Return type:

Angle

property head_depth: Length

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property HeadDepth() As Length (Read Only)

Returns the hole head depth.
This call is valid when the hole type is : Counterbored or Counterdrilled or Countersunk.

Returns:
oHeadDepth A Length object controlling the hole head depth (see Length
for more information)

Example:
The following example returns in holeHeadDepth the head depth of
hole firstHole:

Set holeHeadDepth = firstHole.HeadDepth
Return type:

Length

property head_diameter: Length

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property HeadDiameter() As Length (Read Only)

Returns the hole head diameter.
This call is valid when the hole type is : Counterbored or Counterdrilled.

Returns:
oHeadDiameter A Length object controlling the hole head diameter (see
Length for more information)

Example:
The following example returns in holeHeadDiam the head diameter of
hole firstHole:

Set holeHeadDiam = firstHole.HeadDiameter
Return type:

Length

property hole_thread_description: StrParam

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property HoleThreadDescription() As StrParam (Read Only)

Returns the hole thread description parameter.
This call is valid when the hole threading mode is : CATThreadedHoleThreading.
This call is valid only when a standard/user design table
exists

Returns:
oThreadDescParam A Parameter object controlling the hole thread
description (see StrParam for more information)

Example:
The following example returns in holeThreadDescription the thread
description (M12 etc) of hole firstHole:

Set holeThreadDescription = firstHole.HoleThreadDescription
Return type:

StrParam

reverse() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub Reverse()

Reverses the hole direction .

Example:
The following example reverses the current direction of hole
firstHole:

firstHole.Reverse()
Return type:

None

set_direction(i_direction: Reference) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetDirection(Reference iDirection)

Sets the hole associative direction.

Parameters:

iDirection
A Reference object to an edge or a line (see

Reference for more information)
The following Boundary objects are supported:
RectilinearTriDimFeatEdge, RectilinearBiDimFeatEdge and
RectilinearMonoDimFeatEdge.

Example:
The following example sets the support direction of hole firstHole
with holeDirRef direction reference :

firstHole.SetDirection holeDirref
Parameters:

i_direction (Reference) –

Return type:

None

set_origin(i_x: float, i_y: float, i_z: float) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetOrigin(double iX,
double iY,
double iZ)

Sets the origin point which the hole is anchored to.
If mandatory, the entry point will be projected onto a tangent
plane.

Parameters:

iX
Origin point x absolute coordinate
iY
Origin point y absolute coordinate
iZ
Origin point z absolute coordinate

Example:
The following example sets the coordinates of hole firstHole to
10., 20., -5. :

firstHole.SetOrigin 10., 20., 5.
Parameters:
  • i_x (float) –

  • i_y (float) –

  • i_z (float) –

Return type:

None

property thread_depth: Length

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ThreadDepth() As Length (Read Only)

Returns the hole thread depth.
This call is valid when the hole threading mode is : CATThreadedHoleThreading.

Returns:
oThreadDepth A Length object controlling the hole thread depth (see
Length for more information)

Example:
The following example returns in holeThreadDepth the thread depth
of hole firstHole:

Set holeThreadDepth = firstHole.ThreadDepth
Return type:

Length

property thread_diameter: Length

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ThreadDiameter() As Length (Read Only)

Returns the hole thread diameter.
This call is valid when the hole threading mode is : CATThreadedHoleThreading.

Returns:
oThreadDiameter A Length object controlling the hole thread diameter
(see Length for more information)

Example:
The following example returns in holeThreadDiameter the thread
diameter of hole firstHole:

Set holeThreadDiameter = firstHole.ThreadDiameter
Return type:

Length

property thread_pitch: Length

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ThreadPitch() As Length (Read Only)

Returns the hole thread pitch.
This call is valid when the hole threading mode is : CATThreadedHoleThreading.

Returns:
oThreadPitch A Length object controlling the hole thread pitch (see
Length for more information)

Example:
The following example returns in holeThreadPitch the thread pitch
of hole firstHole:

Set holeThreadPitch = firstHole.ThreadPitch
Return type:

Length

property thread_side: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ThreadSide() As CatHoleThreadSide

Returns the hole thread side.

Returns:
oThreadSide The hole thread side (see CatHoleThreadSide for list of
possible sides)

Example:
The following example returns in holeThreadSide the thread side of
hole firstHole:

Set holeThreadSide = firstHole.ThreadSide
Returns:

enum cat_hole_thread_side

Return type:

int

property threading_mode: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ThreadingMode() As CatHoleThreadingMode

Returns the hole threading mode.

Returns:
oThreadingMode The hole threading mode (see CatHoleThreadingMode for
list of possible types)

Example:
The following example returns in holeThreadingMode the threading
mode of hole firstHole:

Set holeThreadingMode = firstHole.ThreadingMode
Returns:

enum cat_hole_threading_mode

Return type:

int

property type: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Type() As CatHoleType

Returns the hole type.

Returns:
oType The hole type (see CatHoleType for list of possible
types)

Example:
The following example returns in holeType the type of hole
firstHole:

Set holeType = firstHole.Type
Returns:

enum cat_hole_type

Return type:

int