pycatia.mec_mod_interfaces.constraints¶
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.mec_mod_interfaces.constraints.Constraints(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionConstraintsA collection of all geometric constraints set on a part, a sketch, or aproduct.A constraint collection is created with default values for its properties (suchas value, orientation, etc.). Use the constraint properties edition services toset them to appropriate values after constraint creation.See also:Constraint- add_bi_elt_cst(i_cst_type: int, i_first_elem: Reference, i_second_elem: Reference) Constraint ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddBiEltCst(CatConstraintType iCstType,Reference iFirstElem,Reference iSecondElem) As ConstraintCreates a new constraint applying to two geometric elements and adds it tothe Constraints collection.Parameters:iCstTypeThe constraint typeiFirstElemThe first constrained geometric elementThe followingBoundary object is supported: Boundary.iSecondElemThe second constrained geometric elementThe following Boundary object is supported: Boundary.Example:This example adds the NewCst tangency constraint in a sketch, between thetwo circles c1 and c2 using the value 4 forcatCstTypeTangency.Set newCst = skCstList.AddBiEltCst(4, c1, c2)
- Parameters:
- Return type:
- add_mono_elt_cst(i_cst_type: int, i_elem: Reference) Constraint ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddMonoEltCst(CatConstraintType iCstType,Reference iElem) As ConstraintCreates a new constraint applying to a single geometric element and adds itto the Constraints collection.Parameters:iCstTypeThe constraint typeiElemThe constrained geometric elementThe followingBoundary object is supported: Boundary.Example:This example creates the reference constraint NewCst to a part, statingthat the P1 point should remain fixed with respect to the part’s originelements using the value 0 for catCstTypeReference, and adds it to the cstListcollection.Set NewCst = cstList.AddMonoEltCst(0, P1)
- Parameters:
i_cst_type (int) – enum cat_constraint_type
i_elem (Reference) –
- Return type:
- add_tri_elt_cst(i_cst_type: int, i_first_elem: Reference, i_second_elem: Reference, i_third_elem: Reference) Constraint ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddTriEltCst(CatConstraintType iCstType,Reference iFirstElem,Reference iSecondElem,Reference iThirdElem) As ConstraintCreates a new constraint applying to three geometric elements and adds itto the Constraints collection.Parameters:iCstTypeThe constraint typeiFirstElemThe first constrained geometric elementThe followingBoundary object is supported: Boundary.iSecondElemThe second constrained geometric elementThe following Boundary object is supported: Boundary.iThirdElemThe third constrained geometric elementThe following Boundary object is supported: Boundary.Example:This example adds symCst symmetry constraint in a part, stating that thecylinders cyl1 and cyl2 are symmetric with respect to the plane symPlane usingthe value 15 for catCstTypeSymmetry.Set symCst = prtCstList.AddTriEltCst(15, cyl1, cyl2, symPlane)
- Parameters:
- Return type:
- property broken_constraints_count: int¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property BrokenConstraintsCount() As long (Read Only)Returns the number of broken constraints from the Constraintscollection.Example:The following example retrieves in BknCstNum the number of brokenconstraints from the myListofConstraints collection ofconstraints:BknCstNum = myListofConstraints.BrokenConstraintsCount
- Return type:
int
- item(i_index: cat_variant) Constraint ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Item(CATVariant iIndex) As ConstraintReturns a constraint using its index or its name from the Constraintscollection.Parameters:iIndexThe index or the name of the constraint to retrieve frm thecollection of constraints. As a numerics, this index is the rank of theconstraint in the collection. The index of the first constraint in thecollection is 1, and the index of the last constraint is Count. As a string, itis the name you assigned to the constraint using theAnyObject.Name property.Returns:The retrieved constraintExample:This example retrieves in cst1 the first constraint in the collectionand in cst2 the constraint Constraint.2.Set cst1 = cstList.Item(1)Set cst2 = cstList.Item(“Constraint.2”)
- Parameters:
i_index (cat_variant) –
- Return type:
- remove(i_index: cat_variant) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Remove(CATVariant iIndex)Removes a constraint from the Constraints collection.Parameters:iIndexThe index or the name of the constraint to remove from theConstraints collection. As a numerics, this index is the rank of the constraintin the collection. The index of the first constraint in the collection is 1,and the index of the last constraint is Count. As a string, it is the name youassigned to the constraint using theAnyObject.Name property.Example:This example removes the last constraint in thecollection.cstList.Remove(cstList.Count)
- Parameters:
i_index (cat_variant) –
- Return type:
None
- property un_updated_constraints_count: int¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property UnUpdatedConstraintsCount() As long (Read Only)Returns the number of unupdated constraints from the Constraintscollection.Example:The following example retrieves in UnUpdCstNum the number of unupdatedconstraints from the myListofConstraints collection ofconstraints:UnUpdCstNum = myListofConstraints.UnUpdatedConstraintsCount
- Return type:
int