Hi,
I am trying to import all type of supported sufaces using OpenNURBS. While working on surfaces of Revolution I found that paramterization along the angular parameter (U in most cases) is not expressed in a standar way. For example, I have created two brep object that each one represents a torus. The first one was generated via the “Torus” command and the second one by revolving a circle along the z axis. The U paramterization is expressed in radians for the first object and in length for the second one as follows:
Torus via “Torus” command
Surface of Revolution
U = angular parameter, V = curve parameter
"U": Periodic (0 <= U <= 6.28319)
“V”: Periodic (0 <= V <= 29.2412)
Manually created torus
Surface of Revolution
U = angular parameter, V = curve parameter
"U": Periodic (0 <= U <= 55.9316)
“V”: Periodic (0 <= V <= 18.4956)
Since for a surface of Revolution parameterization along U can be expressed in different ways (not only for torus), is there an explanation on this? Also, is there any function of ON_RevSurface class that returns if it is expressed in radians or lenth?
I should add that in the Rhino WIP, a torus is parameterized by length when made with Rhino’s Torus command.
This is generally better, as ideally the domain of a curve is close to it’s length and the domains of a surface are close to is average breadth in the appropriate direction.
Note, Length is just radians * radius.
Of course, you can reparameterize surfaces to whatever you like if it helps what you are trying to do.
Note, the ON_RevSurface::m_angle member is always expressed in radians.
First of all thank you for your reply! I have no access to the actual file at the moment, but here torus.3dm (40.2 KB)
is a similar one. The U Domain of the the first torus is [0, 6.28] and the second one is [0, 86.5274]. The file was created in the Rhinoceros 5 interface.
As I understand the parameterization can be expressed in any way for different surfaces of Revolution. Probably, I could use ON_RevSurface::m_angle to get the domain in radians and express the trim 2d curves data in that domain.