OpenGL : Knot vector

Hi,

In my learning about OpenNURBS, I am trying to display what I read in from *.3DM files in OpenGL.

The knot vector values and the size of the vector is a little different from the OpenGL example I am basing my development on.

Is there some notes I should read up about knot vector in OpenNURBS and how it may differ from how OpenGL may expect them.

Cheers

Hi @Nicholas_Yue,

See the following:

– Dale

1 Like

Using the Dump() method to print out what I have read in, I see the following

m_S Count = 1
ON_NurbsSurface dim = 3 is_rat = 0
        order = 4 X 4 cv_count = 6 X 4
Knot Vector 0 ( 8 knots )
index                     value  mult       delta
    0                        0     3
    3       26.204626279365588     1        26.2
    4       51.579166320603207     1       25.37
    5       77.267240891895867     3       25.69
Knot Vector 1 ( 6 knots )
index                     value  mult       delta
    0                        0     3
    3        63.74243228932707     3       63.74
Control Points  24 non-rational points

From the document where it says m = n + p, I was expecting 10 knots and 8 knots for the 3DM formulation but the Dump() method says 8 knots and 6 knots.

Cheers

Apologies, I miss read the document. It says m = n + p - 2, which is consistent with the data from Dump().

Cheers