Hi Patrik, Mathias, Dirk and other possibly interested parties ;),
Sorry I was away for a couple of days that's why this somewhat-late reply.
On Sat, 2004-11-06 at 07:05, Patrik Müller wrote:
I've started using Nurbs for my CAD formats. Can I use it also for
Splines? At the moment I traignulate the CAD surfaces - but how can I
add single curves?
Curves are not supported directly -- we didn't think it was necessary, and
it would be fairly trivial to add them anyway: should only be a couple
hours of work based on e.g. the TessellationCubes example. The students of
our OpenSG-praktikum had to implement a BezierCurve NodeCore some time
ago, and they didn't have much difficulty with it. A simple class/function
that takes the CPs for a Beziercurve and some criteria for the
tessellation, and returns a Geometry NodeCore that has the "tessellated"
curve should be even easier to implement.
Essentially what you do is that you evaluate your curve at a number of
equidistant points (the number of points depends on how fine you want to
approximate your curve) and just use these points as a basis for a series
of connected linesegments (GL_LINE_STRIP). You could also do some kind of
adaptive tessellation based on e.g. the curvature or whatever. This
applies to any parametric curve, although the specifics of the evaluation
will of course be different for each type (Bezier, BSpline, etc.)
OK, as this is AFAIR not the 'geometric modelling for dummies' list I will
just shut up here. :)
On Sat, 6 Nov 2004, Matthias Stiller wrote:
sorry do not have an answer but a question instead. Can you please share
some of your experiences regarding the use of the tesselator (speed,
quality of tesselation (especially neighbourhood recognition) ? What
formats can you import ?
If you mean the (now) integrated OpenSG tessellator, I think it's pretty
good (but obviously I'm a bit biased :) the only major drawback is the
current lack of support for rational surfaces (it's in the works, but for
technical reasons it's not as straightforward as one would think, and I
don't get much time to work on it at the moment). Both the speed and the
quality is good IMHO, plus you get appearance preserving tessellation and
to my knowledge it's the only tessellator currently that supports this.
Neighbourhood recognition is not supported, we solve this problem during
rendering via the Fat Borders method.
On Tue, 9 Nov 2004, Dirk Reiners wrote:
Internally the NURBS are split into BSplines, and those are tesselated.
...this is a bit more complicated in reality. :-) I guess you mean
BSplines are split into Beziers, but that's only true now for the
trimmingcurves, the surface itself is tessellated "directly".
Akos can give you all the dirty details, if you need them. These
interfaces are not very generalized or cleaned up, though, that's why
they're not exported.
Plus they're not really needed from the user's point of view anyway IMHO.
So right now we don't have direct support for Splines curves/surfaces,
sorry.
Uhhm, you _can_ easily specify any kind of BSpline/Bezier surface, and
curves are not a big deal as I wrote above -- or do I misunderstand you
here?
Hope this helps,
Akos