pycatia.hybrid_shape_interfaces.hybrid_shape_trim

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384

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.hybrid_shape_interfaces.hybrid_shape_trim.HybridShapeTrim(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
MecModInterfaces.HybridShape
HybridShapeTrim

Represents the hybrid shape trim object.
Role: To access the data of the hybrid shape trim object. This data
includes:

The first element (surface or curve) to be trimmed
The second element (surface or curve) to be trimmed
The orientation corresponding to the first element
The orientation corresponding to the second element

Use the CATIAHybridShapeFactory to create a HybridShapeTrim
object.

See also:
HybridShapeFactory
add_element_to_keep(i_element: Reference) None

Note

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

Adds an element to specifications. This element will be
kept.

Parameters:

iElement
Element to keep.
Parameters:

i_element (Reference) –

Return type:

None

add_element_to_remove(i_element: Reference) None

Note

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

Adds an element to specifications. This element will be
removed.

Parameters:

iElement
Element to remove.
Parameters:

i_element (Reference) –

Return type:

None

add_piece_cutter(i_rank: int, i_cutter_elem: int, i_orientation: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub AddPieceCutter(long iRank,
long iCutterElem,
long iOrientation)

Add piece Cutting element and its orientation. Used for trim pieces of
shells only

Parameters:

iRank
Index of the trimmed element (piece)
iCutterElemIdx
index is the index of input shell except in case of multiple intersection between shells
where Index=IndexInputShell+NbInputShells*(1-iw)
(with iw=1… : wire index in case of multiple intersection)
iOrientation
cutter element orientation
Parameters:
  • i_rank (int) –

  • i_cutter_elem (int) –

  • i_orientation (int) –

Return type:

None

property automatic_extrapolation_mode: bool

Note

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

Gets or sets the automatic extrapolation mode status. AutomaticExtrapolationMode
TRUE : Automatic extrapolation mode is on.
FALSE : Automatic extrapolation mode is off.

This example retrieves in AutoExtrapolMode the automatic extrapolation mode status for the
Trim hybrid shape feature.

Dim AutoExtrapolMode As boolean
AutoExtrapolMode = Trim.AutomaticExtrapolationMode
Return type:

bool

property connex: bool

Note

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

Gets or sets connected mode.
Connex
TRUE : the check of connexity is enable. Connex
FALSE : the check of connexity is disable.

This example retrieves in Connex the connected mode for the Trim hybrid shape feature.

Dim Connex As boolean
Connex = Trim.Connex
Return type:

bool

property first_elem: Reference

Note

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

Deprecated:
V5R17 CATIAHybridShapeTrim#GetElem Returns or sets the first element to
be trimmed.
Example:

This example retrieves in Surface1 the first element to be trimmed

for the hybTrim hybrid shape feature.


Dim Surface1 As Reference
Set Surface1 = hybTrim.FirstElem
Return type:

Reference

property first_orientation: int

Note

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

Deprecated:
V5R17 CATIAHybridShapeTrim#GetPreviousOrientation Returns or sets the
first orientation used to compute the trim.
Role: The orientation specifies the kept parts of the first element to
be trimmed.

When trimming surfaces:
If orientation value is 1: kept parts are specified by the
“natural” normal to the second object
If orientation value is -1: kept parts are specified by the
inverse of the “natural” normal to the second
object
When trimming curves:
If orientation value is 1: kept parts are from the beginning of
the curve to the first intersection, and, if there is one, from the second to
the third intersection and so on until the end of the
curve
If orientation value is -1: kept parts are from the first
intersection to the second (if there is one), and, if there is one, from the
third to the fourth and so on until the end of the
curve.

Example:

This example retrieves in firstOrient the orientation
of
the first element used by the hybTrim hybrid shape
feature.

Dim firstOrient As long
Set firstOrient = hybTrim.FirstOrientation
Return type:

int

get_elem(i_rank: int) Reference

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetElem(long iRank) As Reference

Gets the trimmed feature at a given index.

Parameters:

iRank
Index of one of the trimmed features
oElem
trimmed feature
Parameters:

i_rank (int) –

Return type:

Reference

get_kept_elem(i_rank: int) Reference

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetKeptElem(long iRank) As Reference

Gets the kept feature at a given index.

Parameters:

oElem
Kept feature
iRank
Index of one of the kept features
Parameters:

i_rank (int) –

Return type:

Reference

get_nb_elem() int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetNbElem() As long

Gets the number of elements: couple(element, index of portion to keep on
element).

Parameters:

oNbElem
Number of elements
Return type:

int

get_nb_elements_to_keep() int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetNbElementsToKeep() As long

Gets the number of elements to keep.

Parameters:

oNbElementsToKeep
Number of elements to keep
Return type:

int

get_nb_elements_to_remove() int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetNbElementsToRemove() As long

Gets the number of elements to remove.

Parameters:

oNbElementsToRemove
Number of elements to remove
Return type:

int

get_next_orientation(i_rank: int) int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetNextOrientation(long iRank) As long

Gets Orientation used to compute the feature, referring to the next trimmed
element.

Parameters:

iRank
index (of one of the trimmed features) - 1 iRank must be greater
than 1 and lower than the number of elements - 1
oOrientation
Orientation
Parameters:

i_rank (int) –

Return type:

int

get_piece_cutter(i_rank: int, i_cutter_index: int, o_cutter_elem_idx: int, o_orientation: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetPieceCutter(long iRank,
long iCutterIndex,
long oCutterElemIdx,
long oOrientation)

Gets piece Cutting element and its orientation. Used for trim pieces of
shells only

Parameters:

iRank
Index of the trimmed element (piece)
oCutterElemIdx
index is the index of input shell except in case of multiple intersection between shells
where Index=IndexInputShell+NbInputShells*(1-iw)
(with iw=1… : wire index in case of multiple intersection)
oCutterElem
cutter element
oOrientation
cutter element orientation
Parameters:
  • i_rank (int) –

  • i_cutter_index (int) –

  • o_cutter_elem_idx (int) –

  • o_orientation (int) –

Return type:

None

get_piece_discrimination_index(i_rank: int, o_index: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetPieceDiscriminationIndex(long iRank,
long oIndex)

Gets the discrimination index. Used for the trim pieces of shells
only

Parameters:

iRank
Index of the trimmed element (piece)
oIndex
Discrimination Index Used to discrimine pieces when cutters
orientations are not enough
Parameters:
  • i_rank (int) –

  • o_index (int) –

Return type:

None

get_piece_nb_cutters(i_rank: int) int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetPieceNbCutters(long iRank) As long

Gets the number of cutters of a piece. Used for trim pieces of shells
only

Parameters:

oNbCutters
Number of cutters (except in case of multiple intersection between
shells)
Parameters:

i_rank (int) –

Return type:

int

get_portion_to_keep(i_rank: int) int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetPortionToKeep(long iRank) As long

Gets a portion to keep number, giving the index of the element. Used for
trim pieces of wires

Parameters:

oPortionNumber
Index of portion to keep on the element
iRank
Index of the trimmed element
Parameters:

i_rank (int) –

Return type:

int

get_previous_orientation(i_rank: int) int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetPreviousOrientation(long iRank) As long

Gets Orientation used to compute the feature, referring to the previous
trimmed element.

Parameters:

iRank
index (of one of the trimmed features) - 1 iRank must be greater
than 1 and lower than the number of elements - 1
oOrientation
Orientation
Parameters:

i_rank (int) –

Return type:

int

get_removed_elem(i_rank: int) Reference

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func GetRemovedElem(long iRank) As Reference

Gets the removed feature at a given index.

Parameters:

oElem
Removed feature
iRank
Index of one of the removed features
Parameters:

i_rank (int) –

Return type:

Reference

property intersection_computation: bool

Note

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

Gets or sets Intersection computation mode.
IntersectionComputation
TRUE : Intersection is computed.
FALSE : Intersection is not computed.

This example retrieves in Intersection the Intersection computation mode for the Trim hybrid
shape feature.

Dim Intersection As boolean
Intersection = Trim.IntersectionComputation
Return type:

bool

invert_first_orientation() None

Note

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

Deprecated:
V5R17 CATIAHybridShapeTrim#SetPreviousOrientation Inverts the first
orientation used to compute the trim.
Example:

This example inverts the first orientation to
compute
the hybTrim hybrid shape trim object.

hybTrim.InvertFirstOrientation
Return type:

None

invert_second_orientation() None

Note

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

Deprecated:
V5R17 CATIAHybridShapeTrim#SetPreviousOrientation Inverts the second
orientation used to compute the trim. This example inverts the first
orientation to compute the hybTrim hybrid shape trim
object.

hybTrim.InvertSecondOrientation
Return type:

None

property keep_all_pieces: bool

Note

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

Gets or Sets keep all pieces mode. Used for the trim pieces of shells only KeepAllPieces=
TRUE : all the pieces are kept during update, KeepAllPieces=
FALSE : only chosen pieces are kept during update (default).

This example retrieves in KeepAllPieces the Keep All Pieces mode for the Trim hybrid shape
feature.

Dim bKeepAllPieces As boolean
bKeepAllPieces = Trim.KeepAllPieces
Return type:

bool

property manifold: bool

Note

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

Gets or sets manifold mode.
Manifold = TRUE : the check of manifold is enable.
Manifold = FALSE : the check of manifold is disable.

This example retrieves in Manifold the manifold mode for the Trim hybrid shape feature.

Dim Manifold As boolean
Connex = Trim.Manifold
Return type:

bool

property mode: int

Note

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

Gets or sets Trim mode. Mode =
1 : Standard. =
2 : Pieces.

This example retrieves in Mode the mode for the Trim hybrid shape feature.

Dim Mode As long
Mode = Trim.Mode
Return type:

int

remove_element_to_keep(i_rank: int) None

Note

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

Removes an element from specifications.

Parameters:

iRank
Index of the kept element.
Parameters:

i_rank (int) –

Return type:

None

remove_element_to_remove(i_rank: int) None

Note

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

Removes an element from specifications.

Parameters:

iRank
Index of the removed element.
Parameters:

i_rank (int) –

Return type:

None

remove_piece_cutter(i_rank: int, i_cutter_index: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub RemovePieceCutter(long iRank,
long iCutterIndex)

Remove piece Cutting element and its orientation. Used for trim pieces of
shells only

Parameters:

iRank
Index of the trimmed element (piece)
iCutterIndex
Index in cutters list
Parameters:
  • i_rank (int) –

  • i_cutter_index (int) –

Return type:

None

property second_elem: Reference

Note

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

Deprecated:
V5R17 CATIAHybridShapeTrim#GetElem Returns or sets the second element
to be trimmed.
Example:

This example retrieves in Surface2 the second element to be trimmed

for the hybTrim hybrid shape trim object.


Dim Surface2 As Reference
Set Surface2 = hybTrim.SecondElem
Return type:

Reference

property second_orientation: int

Note

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

Deprecated:
V5R17 CATIAHybridShapeTrim#GetPreviousOrientation Returns or sets the
second orientation used to compute the trim.
Role: The orientation specifies the kept parts of the second element to
be trimmed.

When trimming surfaces:
If orientation value is 1: kept parts are specified by the
“natural” normal to the first object
If orientation value is -1: kept parts are specified by the
inverse of the “natural” normal to the first
object
When trimming curves:
If orientation value is 1: kept parts are from the beginning of
the curve to the first intersection, and, if there is one, from the second to
the third intersection and so on until the end of the
curve
If orientation value is -1: kept parts are from the first
intersection to the second (if there is one), and, if there is one, from the
third to the fourth and so on until the end of the
curve.

Example:

This example retrieves in secondOrient the orientation
of
the second element used by the hybTrim hybrid shape trim
object.

Dim secondOrient As long
Set secondOrient = hybTrim.SecondOrientation
Return type:

int

set_elem(i_rank: int, i_elem: Reference) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetElem(long iRank,
Reference iElem)

Modifies the trimmed feature at a given index. Use AddElem method to
specify a new trimmed element

Parameters:

iRank
Index of one of the trimmed features
iElem
trimmed feature
Parameters:
Return type:

None

set_next_orientation(i_rank: int, i_orientation: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetNextOrientation(long iRank,
long iOrientation)

Sets the orientation used to compute the feature, referring to the next
trimmed element.

Parameters:

iRank
index (of one of the trimmed features) - 1 iRank must be greater
than 1 and lower than the number of elements - 1
iOrientation
Orientation
Parameters:
  • i_rank (int) –

  • i_orientation (int) –

Return type:

None

set_piece_discrimination_index(i_rank: int, i_index: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetPieceDiscriminationIndex(long iRank,
long iIndex)

Sets the discrimination index. Used for the trim pieces of shells
only

Parameters:

iRank
Index of the trimmed element (piece)
iIndex
Discrimination Index Used to discrimine pieces when cutters
orientations are not enough
Parameters:
  • i_rank (int) –

  • i_index (int) –

Return type:

None

set_portion_to_keep(i_rank: int, i_portion_number: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetPortionToKeep(long iRank,
long iPortionNumber)

Sets a portion to keep number in Pieces mode. Used for trim pieces of
wires

Parameters:

iRank
Index of the trimmed element
iPortionNumber
Index of portion to keep on the element
Parameters:
  • i_rank (int) –

  • i_portion_number (int) –

Return type:

None

set_previous_orientation(i_rank: int, i_orientation: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetPreviousOrientation(long iRank,
long iOrientation)

Sets the orientation used to compute the feature, referring to the previous
trimmed element.

Parameters:

iRank
index (of one of the trimmed features) - 1 iRank must be greater
than 1 and lower than the number of elements - 1
iOrientation
Orientation
Parameters:
  • i_rank (int) –

  • i_orientation (int) –

Return type:

None

property simplify: bool

Note

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

Returns or sets whether the simplification of the resulting topology is or
should be activated.
Legal values: True to activate the simplification, and False
otherwise.

Example:

This example activates the simplification of the resulting topology
of
the hybTrim hybrid shape trim object.


hybTrim.Simplify = True
Return type:

bool

property support: Reference

Note

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

Returns or sets the support element.
This support element may not exist.
Sub-element(s) supported (see Boundary object): Face.

Example:

This example retrieves in supportElement the support
element
of the hybTrim hybrid shape trim object.


Dim supportElement As Reference
Set supportElement = hybTrim.Support
Return type:

Reference