Beispiel #1
0
    def check_params(self, u=None, v=None, is_uclosed=False, is_vclosed=False):
        """
        Check that the parameter is within the global domain of the knot vector
        or is within tolerance of a unique knot value. Use
        :class:`.CompareFloats` to compare floats.

        :param float u: Global parameter in u-direction.
        :param float v: Global parameter in v-direction.
        :param bool is_uclosed: Is surface closed in u-direction.
        :param bool is_vclosed: Is surface closed in v-direction.

        :return: Parameters within global domain. Returns same value if
            already within domain. Returns *None* if parameter isn't provided.
        :rtype: tuple
        """
        if u is not None:
            u = check_param(self._n, self._p, self._uk, u, is_uclosed)
        if v is not None:
            v = check_param(self._m, self._q, self._vk, v, is_vclosed)
        return u, v
Beispiel #2
0
    def check_param(self, u):
        """
        Check that the parameter is within the global domain of the knot vector
        or is within tolerance of a unique knot value. Use
        :class:`.CompareFloats` to compare floats.

        :param float u: Global parameter.

        :return: Parameter within global domain or near interior knot value.
        :rtype: float
        """
        return check_param(self._n, self._p, self._uk, u)