Main question: what tolerance is used by the isPeriodic method of a Part.BSplineCurve object and what tolerance by the isUPeriodic and isVPeriodic methods of a Part.BSplineSurface object?
Experiment: Let us create a sphere, for which the usual parametrization provides periodicity in the u parametric direction. Convert this sphere to a B-spline surface, and the same method reports non-periodicity in the u direction.
Code: Select all
>>> sphere = Part.Sphere()
>>> sphere.isUPeriodic()
True
>>> sphere.isVPeriodic()
False
>>> sphere_as_spline = sphere.toBSpline()
>>> sphere_as_spline.isUPeriodic()
False
>>> sphere_as_spline.isVPeriodic()
False
Code: Select all
>>> import numpy as np
>>> cps = np.array(sphere_as_spline.getPoles())
>>> np.alltrue(np.isclose(cps[0, :, :], cps[-1, :, :])) # u direction
True
>>> np.alltrue(np.isclose(cps[:, 0, :], cps[:, -1, :])) # v direction
False