pycatia.part_interfaces.rect_pattern

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.rect_pattern.RectPattern(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.TransformationShape
PartInterfaces.Pattern
RectPattern

Represents the rectangular pattern.
The shape is copied along two directions. Two linear repartitions control the
shape copy.

See also:
LinearRepartition
property first_direction_repartition: LinearRepartition

Note

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

Returns the linear repartition along the first direction.

Example:
The following example returns in repart1 the first linear repartition
of the rectangular pattern firstPattern:

Set repart1 = firstPattern.FirstDirectionRepartition
Return type:

LinearRepartition

property first_direction_row: IntParam

Note

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

Returns the position of the shape to be copied along the first linear
direction.

Example:
The following example returns in FirstDirPos the position of the shape
to be copied along the first linear direction in the rectangular pattern
firstPattern:

Set FirstDirPos = firstPattern.FirstDirectionRow
Return type:

IntParam

property first_orientation: bool

Note

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

Returns or sets whether the pattern is built towards the first direction
orientation.
True if the pattern is built towards the first direction
orientation.

Example:
The following example returns in aligned1 whether the rectangular
pattern firstPattern is built towards the first direction orientation, and then
sets its to True:

Set aligned1 = firstPattern.FirstOrientation
firstPattern.FirstOrientation = True
Return type:

bool

property first_rectangular_pattern_parameters: int

Note

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

Returns or sets the rectangular pattern parameters required to define the
pattern. These parameters are used when reading the CATIALinearRepartition
properties.

Example:
The following example returns in parameters the rectangular pattern
parameters of the firstPattern rectangular pattern, and then sets it to
catUnequalSpacing, so that the unqual spacing will be defined in first
direction:

Set parameters = firstPattern.FirstCircularPatternParameters
Set firstPattern.FirstCircularPatternParameters = catUnequalSpacing
Returns:

enum cat_rectangular_pattern_parameters

Return type:

int

get_first_direction(io_first_direction: tuple) None

Note

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

Returns the first repartition direction. The first repartition direction is
returned as an array containing the direction vector components. Assume this
array is o1stDirRep. It contains:

o1stDirRep[0],o1stDirRep[1],o1stDirRep[2]
The X, Y, and Z direction vector components

Example:
The following example returns in FirstDir the first repartition
direction vector components of the rectangular pattern firstPattern and saves
them in variables:

Dim FirstDir()
Call firstPattern.GetFirstDirection(FirstDir)
x = FirstDir(0)
y = FirstDir(1)
z = FirstDir(2)
Parameters:

io_first_direction (tuple) –

Return type:

None

get_second_direction(io_second_direction: tuple) None

Note

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

Returns the second repartition direction. The second repartition direction
is returned as an array containing the direction vector components. Assume this
array is o2ndDirRep. It contains:

o2ndDirRep[0],o2ndDirRep[1],o2ndDirRep[2]
The X, Y, and Z direction vector components

Example:
The following example returns in SecondDir the second repartition
direction vector components of the rectangular pattern firstPattern and saves
them in variables:

Call firstPattern.GetSecondDirection(SecondDir)
x = SecondDir[0]
y = SecondDir[1]
z = SecondDir[2]
Parameters:

io_second_direction (tuple) –

Return type:

None

property second_direction_repartition: LinearRepartition

Note

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

Returns the linear repartition along the second direction.

Example:
The following example returns in repart2 the second linear repartition
of the rectangular pattern firstPattern:

Set repart2 = firstPattern.SecondDirectionRepartition
Return type:

LinearRepartition

property second_direction_row: IntParam

Note

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

Returns the position of the shape to be copied along the second linear
direction.

Example:
The following example returns in SecondDirPos the position of the shape
to be copied along the second linear direction in the rectangular pattern
firstPattern:

Set SecondDirPos = firstPattern.SecondDirectionRow
Return type:

IntParam

property second_orientation: bool

Note

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

Returns or sets whether the pattern is built towards the second direction
orientation.
True if the pattern is built towards the second direction
orientation.

Example:
The following example returns in aligned2 whether the rectangular
pattern firstPattern is built towards the second direction orientation, and
then sets its to False, meaning the pattern is built in the opposite
direction:

Set aligned2 = firstPattern.SecondOrientation
firstPattern.SecondOrientation = False
Return type:

bool

property second_rectangular_pattern_parameters: int

Note

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

Returns or sets the rectangular pattern parameters required to define the
pattern. These parameters are used when reading the CATIALinearRepartition
properties.

Example:
The following example returns in parameters the rectangular pattern
parameters of the secondPattern rectangular pattern, and then sets it to
catUnequalSpacing, so that the unqual spacing will be defined in second
direction:

Set parameters = secondPattern.SecondCircularPatternParameters
Set secondPattern.SecondCircularPatternParameters = catUnequalSpacing
Returns:

enum cat_rectangular_pattern_parameters

Return type:

int

set_first_direction(i_first_direction: Reference) None

Note

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

Sets the first repartition direction.

Parameters:

iFirstDirection
The first repartition direction. It is passed as a


Reference and can be valuated with a reference to a line or an
edge.
The following Boundary objects are supported: PlanarFace,
RectilinearTriDimFeatEdge and RectilinearBiDimFeatEdge.


Example:
The following example sets the first repartition direction of the
rectangular pattern firstPattern with the refToLine1 reference
:

firstPattern.SetFirstDirection refToLine1
Parameters:

i_first_direction (Reference) –

Return type:

None

set_instance_spacing(i_instance_number: int, i_spacing: float, i_direction: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetInstanceSpacing(long iInstanceNumber,
double iSpacing,
long iDirection)

Sets the InstanceSpacing.

Parameters:

iInstanceNumber
The Instance Number
iSpacing
The Spacing
iDirection
The Instance direction

Example:
The following example sets the InstanceSpacing in a direction for
unequal spacing
Parameters:
  • i_instance_number (int) –

  • i_spacing (float) –

  • i_direction (int) –

Return type:

None

set_second_direction(i_second_direction: Reference) None

Note

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

Sets the second repartition direction.

Parameters:

iSecondDirection
The second repartition direction. It is passed as a


Reference and can be valuated with a reference to a line or an
edge.
The following Boundary objects are supported: PlanarFace,
RectilinearTriDimFeatEdge and RectilinearBiDimFeatEdge.


Example:
The following example sets the second repartition direction of the
rectangular pattern firstPattern with the refToLine2 reference
:

firstPattern.SetSecondDirection refToLine2
Parameters:

i_second_direction (Reference) –

Return type:

None

set_unequal_instance_number(i_instance_number: int, i_direction: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetUnequalInstanceNumber(long iInstanceNumber,
long iDirection)

Sets the Instance Number.

Parameters:

iInstanceNumber
The Instance Number
iDirection
The Instance direction

Example:
The following example modifies the instance number for unequal spacing
Parameters:
  • i_instance_number (int) –

  • i_direction (int) –

Return type:

None