Hi Bart,
Thanks for the feedback, last week I didn't have much time to work on the project but this week I'll have plenty of time. Actually I just committed a revision where I stopped using my own gprim_factory and use k3d::gprim_factory as you told me (I also noticed the add_polygon had a line missing and I was getting assertion errors but I figured it out) Anyway, I'm going to keep working on it but I have a question about the way NURBS are created in k3d. I suck at explaining things like this so I made a little drawing :-) hehe (which I attached to the email).
To actually import a path from SVG the main problem is to convert the bezier curves from the svg file to k3d NURBS. This shouldn't be a difficult task and I almost have it right, you just need to change the knot, and weight vector accordingly (Figure 1 is how it's supposed to be). The problem is that when I do this in k3d no matter how I change the two middle control point weights, the curve always goes to the top (As shown in figure 2) even when I put a very little weight on them(the middle ones) like 0.01 which would mean that those control points have very little contribution, but in k3d it looks kind of like in figure 3 which made me suspect it is the way it is constructed because as of what I know (please correct me if I'm wrong) the curve should look more or less like figure 4 with that weights. What do you think I should do? Change the control points accordingly to match the original curve? or should the NURBS construction algorithm change? Thanks in advance!
Bests,
Carlos
On Sun, May 25, 2008 at 4:27 PM, Bart Janssens <
bart.janssens@...> wrote:
On Sat, May 17, 2008 at 8:41 PM, Carlos Dominguez <
carlosadc@...> wrote:
> I just solved the NURBS-Bezier convertion problem, and changed the functions
> as you told me, I hope I get the curve loading complete by today, I'll let
> you know.
Hi Carlos,
I tried your SVG plugin today, and it works great. I have a minor
concern over the gprim_factory, however. There is already a
gprim_factory in k3dsdk, and in my opinion it would be better to add
to that. I think putting it in the SDK is justified, since it is
already used by at least 3 plugins (obj_import, opencascade and CGAL)
and things were diverging already. Do wait for Tim's opinion on this
as well, though.
As a heads-up for the next steps in your project, I have added a
document_importer to opencascade. It might be useful as an example of
how to import a scene with multiple meshes, covering things like
creating FrozenMeshes to store data, set up MeshInstances, connect
render engines, ...
Cheers,
--
Bart
--
Carlos Andres Dominguez Caballero
TEL: (52 443) 3147845
CEL: (52 443) 2028344
fismat.umich.mx/~carlosadc
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development