def second_tension(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property SecondTension() As RealParam (Read Only)
                | 
                |     Returns the tension on the second curve making up the connect
                |     curve.
                | 
                |     Example:
                | 
                |           This example retrieves the tension of the second curve that makes
                |           up
                |          the connect curve hybConnect.
                |          
                | 
                |          Dim secondCurveTension As CATIARealParam
                |          secondCurveTension = hybConnect.SecondTension

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_connect.SecondTension)
    def ratio(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property Ratio() As RealParam (Read Only)
                | 
                |     Returns the distance ratio to the reference point.
                |     This is a real parameter which corresponds to the ratio of the distance
                |     from the reference point with respect to the length of the supporting curve.
                |     The ratio can be null. In this case, the reference point is the curve end point
                |     defined using the Orientation parameter.
                | 
                |     Example:
                | 
                |           This example retrieves in oRatio the distance ratio from the
                |           reference point
                |          on the supporting curve for the pointOnCurve hybrid shape
                |          object.
                |          
                | 
                |          Dim oRatio As  CATIALength  
                |          Set oRatio = PointOnCurve.Ratio

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_point_on_curve.Ratio)
    def get_tangent_norm(self, i_pos: int) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
                | o Func GetTangentNorm(long iPos) As RealParam
                | 
                |     Returns the tension for each point of the spline.
                |     The tension is the tangent norm at the given point.
                | 
                |     Parameters:
                | 
                |         iPos
                |             The position of the point in the spline.
                |             Legal values: first position is 1. The position cannot be 0.
                |             
                |         oTension
                |             The tension at this point

        :param int i_pos:
        :return: RealParam
        :rtype: RealParam
        """
        return RealParam(self.hybrid_shape_spline.GetTangentNorm(i_pos))
示例#4
0
    def item(self, index: cat_variant) -> any_parameter:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic help
                | Item
                | o Func Item(    CATVariant    iIndex) As Parameter
                |
                | Retrieves a parameter  using its index or its name from the from the
                | Parameters collection.
                | Parameters:
                | iIndex
                |    The index or the name of the parameter to retrieve from
                |    the collection of parameters.
                |    As a numeric, this index is the rank of the parameter
                |    in the collection.
                |    The index of the first parameter in the collection is 1, and
                |    the index of the last parameter is Count.
                |    As a string, it is the name you assigned to the parameter using
                |    the
                |
                |  activateLinkAnchor('AnyObject','Name','AnyObject.Name')  property or when
                |  creating the parameter.
                | Examples:
                | This example retrieves the last parameter in the parameters
                | collection:
                |
                | Set lastParameter = parameters.Item(parameters.Count)


        :param cat_variant index:
        :return: any_parameter
        :rtype: any_parameter
        """

        p: any_parameter

        if not self.is_parameter(index):
            raise CATIAApplicationException(
                f'Could not find parameter name "{index}".')

        if isinstance(self.parameters.Item(index).value, bool):
            p = BoolParam(self.parameters.Item(index))

        elif isinstance(self.parameters.Item(index).value, int):
            p = IntParam(self.parameters.Item(index))

        elif isinstance(self.parameters.Item(index).value, str):
            p = StrParam(self.parameters.Item(index))

        elif isinstance(self.parameters.Item(index).value, float):
            p = RealParam(self.parameters.Item(index))

        else:

            raise CATIAApplicationException(
                f'Could not assign parameter name "{index}".')

        return p
    def revol_number(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property RevolNumber() As RealParam
                | 
                |     Reads / Changes the revolution number of the Spiral.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_spiral.RevolNumber)
    def distance_to_satisfaction(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
                | o Property DistanceToSatisfaction() As RealParam (Read Only)
                | 
                |     Returns the parameter containing the distance to constraint satisfaction.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.optimization_constraint.DistanceToSatisfaction)
示例#7
0
    def center_tension(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property CenterTension() As RealParam
                | 
                |     Returns or sets the tension center parameter.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_bump.CenterTension)
    def ratio(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property Ratio() As RealParam (Read Only)
                | 
                |     Returns the scaling ratio.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_scaling.Ratio)
示例#9
0
    def target_value(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
                | o Property TargetValue() As RealParam (Read Only)
                | 
                |     Returns the objective parameter target value. (used only if the
                |     optimization type is a target value search)

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.optimization.TargetValue)
示例#10
0
    def parameter(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
                | o Property Parameter() As RealParam
                | 
                |     Returns or sets which parameter (CATIAParameter) is linked to this object.
                |     The parameter must be real.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.free_parameter.Parameter)
示例#11
0
    def objective_parameter(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
                | o Property ObjectiveParameter() As RealParam
                | 
                |     Returns or sets the objective parameter of the optimization. This parameter
                |     can not exist (in this case the get method returns E_FAIL) when the
                |     optimization contains only constraints and uses Simulated Annealing, or if the
                |     optimization feature doesn't contain all information necessary to be run.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.optimization.ObjectiveParameter)
示例#12
0
    def revol_number(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property RevolNumber() As RealParam (Read Only)
                | 
                |     Reads the revolution number of the Helix.
                | 
                |     Parameters:
                | 
                |         oNbRevol
                |             Revolutions.

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_helix.RevolNumber)
示例#13
0
    def factor(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property Factor() As RealParam (Read Only)
                | 
                |     Returns the scaling factor.
                | 
                |     Example:
                |         The following example returns in factor the scaling factor of the
                |         scaling firstScaling:
                | 
                |          Set factor = firstScaling.Factor

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.scaling.Factor)
示例#14
0
    def get_z(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
                | o Func GetZ() As RealParam
                | 
                |     Returns the direction Z component. This method succeeds only when direction
                |     is specified using components. It fails when direction is specified using a
                |     geometrical element i.e Line, Plane. In such cases use GetZVal method
                |     instead.
                | 
                |     Parameters:
                | 
                |         oCoordinates
                |             The direction Z component

        :return: RealParam
        :rtype: RealParam
        """
        return RealParam(self.hybrid_shape_direction.GetZ())
示例#15
0
    def ratio(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property Ratio() As RealParam (Read Only)
                | 
                |     Get the ratio. Role:
                |     if d1 is the distance between the first point and the created point, and d2 is the distance
                |     between the first point and the second point, then ratio = d1/d2.
                | 
                |     Example:
                |         This example retrieves in ratio the orientation for the PointBetween
                |         hybrid shape feature.
                | 
                |          Dim ratio  As CATIARealParam
                |          Get ratio = PointBetween.Ratio

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_point_between.Ratio)
示例#16
0
    def create_real(self, i_name: str, i_value: float) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
                | o Func CreateReal(CATBSTR iName,
                | double iValue) As RealParam
                | 
                |     Creates a real parameter and adds it to the part's collection of
                |     parameters.
                | 
                |     Parameters:
                | 
                |         iName
                |             The parameter name 
                |         iValue
                |             The parameter value 
                | 
                |     Example:
                |         This example creates the ReliabilityRate real parameter and adds it to
                |         the newly created part:
                | 
                |         Dim CATDocs As Documents
                |          Set CATDocs = CATIA.Documents
                |          Dim part1 As Document
                |          Set part1   = CATDocs.Add("CATPart")
                |          Dim rate As RealParam
                |           Set rate = part1.Part.Parameters.CreateReal ("ReliabilityRate", 2.5 )

        :param str i_name:
        :param float i_value:
        :return: RealParam
        :rtype: RealParam
        """
        return RealParam(self.parameters.CreateReal(i_name, i_value))
示例#17
0
    def z_ratios(self) -> RealParam:
        """
        .. note::
            :class: toggle

            CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
                | o Property ZRatios() As RealParam (Read Only)
                | 
                |     Returns the affinity ratio along the Z Direction of the reference
                |     coordinate system.
                | 
                |     Example:
                |         This example retrieves in Z the ratio of the affinity along the Z
                |         Direction of the reference coordinate system used by the Affinity hybrid shape
                |         feature.
                | 
                |          Dim Z As RealParam 
                |          Set Z = Affinity.ZRatios

        :return: RealParam
        :rtype: RealParam
        """

        return RealParam(self.hybrid_shape_affinity.ZRatios)