[Soc-2014-dev] Weekly Report #10: NURBS Modernization

Jonathan deWerd jjoonathan at gmail.com
Sat Jul 26 21:16:53 CEST 2014


> Would it be possible to also include step as a format?

Yep. There's a great deal of overlap between the remaining tasks needed to implement basic STEP support and the remaining tasks needed to implement basic OpenNURBS support, so I'll continue to concentrate on the latter for now, but STEP is definitely on the radar.

> The mesh MOI produces has actual holes in it and it adds NGONS where possible.

Blender polygons don't support holes at the moment but they do support the ability to have more than 3 or 4 edges. This page has examples of the type of polygon I would be able to implement:

http://wiki.blender.org/index.php/User:Jjoonathan/Trim_Algorithms_(Update)

Compared to the ugly triangulation that is currently produced by convert-to-mesh, those n-gons seem like quite an improvement:

http://wiki.blender.org/index.php/File:NURBS_nofloatingverts.png


On Jul 26, 2014, at 11:58 AM, claas kuhnen <info at ckbrd.de> wrote:
> Would it be possible to also include step as a format? OpenNURBS is not used by many cad systems.
> 
> On Jul 26, 2014 10:16 AM, "claas kuhnen" <info at ckbrd.de> wrote:
> I see,
> 
> The mesh MOI produces has actual holes in it and it adds NGONS where possible.
> Maybe my understanding is wrong here but wouldn't this be sufficient and possible
> already with Blender?
> 
> The MOI mesh imports work great besides normal shading problems in Blender.
> 
> Claas
> 
> - - -
> 
> Claas Kuhnen
> 
> (715) 513-9118
> www.ckbrd.de
> info at ckbrd.de
> 
> 
> On Sat, Jul 26, 2014 at 9:41 AM, Dalai Felinto <dfelinto at gmail.com> wrote:
> > I use MOI as my main nurbs to mesh converter and it uses ngons a lot not for holes but surfaces.
> 
> I think ngons is a generic term, not necessarily always referring to
> the same data structure. (SketchUp ngons handles holes very nicely
> too).
> 
> What I mean is, the ngons implementation in Blender doesn't support
> holes. Blender's ngons is a Radial Edge implementation, so although it
> could support holes, it was never fully implemented.
> 
> Cheers,
> Dalai
> --
> blendernetwork.org/dalai-felinto
> www.dalaifelinto.com
> 
> 
> 2014-07-26 10:31 GMT-03:00 David Fenner <d4vidfenner at gmail.com>:
> > Moi is the best nurbs to poly converter i have ever found. Fast, robust,
> > flexible, clean... Definitely somewhere to aim to.
> >
> > El jul 26, 2014 9:27 a.m., "claas kuhnen" <info at ckbrd.de> escribió:
> >
> >> I use MOI as my main nurbs to mesh converter and it uses ngons a lot not
> >> for holes but surfaces.
> >>
> >> Claas
> >>
> >> On Jul 26, 2014 8:51 AM, "Dalai Felinto" <dfelinto at gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> > * Does anyone know of good example code for making a BMesh out of
> >>> > n-gons? N-gons would make the meshes produced by Alt+C *much* cleaner.
> >>>
> >>> Be aware that N-gons don't support holes (at the moment), so you may
> >>> get buggy meshes during this conversion. But as Sergey said, you don't
> >>> need to convert the nurbs to ngons.
> >>>
> >>> Cheers,
> >>> Dalai
> >>> --
> >>> blendernetwork.org/dalai-felinto
> >>> www.dalaifelinto.com
> >>>
> >>>
> >>> 2014-07-26 8:39 GMT-03:00 Sergey Sharybin <sergey.vfx at gmail.com>:
> >>> > Hi,
> >>> >
> >>> > It's cool to hear you're doing progress, but what about committing the
> >>> > stuff
> >>> > to Git? Last commit was done on Monday and in the report you claim
> >>> > having
> >>> > progress since that. Commit the stuff even if it's not production
> >>> > ready.
> >>> > I've asked about this several times already.
> >>> >
> >>> > Before you go to importing or making improvements to curve->mesh
> >>> > conversion
> >>> > i'll demand wrapping existing code up, making so it's used in blende
> >>> > (and
> >>> > commit everything!)r and preparing demo files for this.
> >>> >
> >>> > As for ngon examples, you just need to fill in mpoly and mloop arrays
> >>> > actually. MOD_boolean_util.c has examples (it operates with
> >>> > DerivedMesh, but
> >>> > it's almost the same as you need for curve->mesh conversion).
> >>> >
> >>> > Also, what are the plans for the next week?
> >>> >
> >>> >
> >>> > On Sat, Jul 26, 2014 at 1:43 PM, Jonathan deWerd <jjoonathan at gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> This week was largely eaten up by a task that I thought would be a
> >>> >> quick
> >>> >> copy/paste job but turned into a morass of debugging math code.
> >>> >> Fortunately
> >>> >> that part is done -- and the result is much prettier smooth curves:
> >>> >>
> >>> >> http://wiki.blender.org/index.php/User:Jjoonathan/New_NURBS_Eval
> >>> >>
> >>> >> Progress This Week:
> >>> >> * Finished the new evaluation code. Key features:
> >>> >> * Computes any number of partial derivatives analytically
> >>> >> * Immediate application 1: compute normals analytically = it looks
> >>> >> smooth
> >>> >> again :)
> >>> >> * No nasty lighting artifacts near trim edges
> >>> >> * No seams where curves touch/loop due to calculating normals at
> >>> >> polygon
> >>> >> corners
> >>> >> * Immediate application 2: handle (literal) edge cases of eval points
> >>> >> lying on knots correctly
> >>> >> * Immediate application 3: uses 1/2 as many divisions, so possibly
> >>> >> it's
> >>> >> faster, although I didn't check
> >>> >> * Future application: computing error bounds
> >>> >> * Performed extensive verification of the new eval code
> >>> >> * Mesh points coincide with Rhino surfaces
> >>> >> * All 1st, 2nd (partial) derivatives agree with Mathematica's NURBS
> >>> >> implementation (direction, amplitude correct).
> >>> >> * Made progress on the trim curve tessellator.
> >>> >> * NOTE: last week I mistakingly said that I had finished the trim
> >>> >> curve
> >>> >> tessellator when I actually meant to say that I had finished the
> >>> >> surface
> >>> >> tessellator.
> >>> >> * Refactored the import code so that it can make detatched curves
> >>> >> * Adjusted memory management & blenloader
> >>> >> * The trim curve tessellator isn't a sticking point, I only got around
> >>> >> to
> >>> >> working on it again today. The eval code was the sticking point.
> >>> >>
> >>> >> Things that were done that don't officially constitute progress:
> >>> >> * Spent Thursday finishing rotation surface & interpolation surface
> >>> >> chapters in P&T
> >>> >>
> >>> >> Things that must be done before I can import the sample .3dm files:
> >>> >> * Finish the trim curve tessellator
> >>> >> * Rotation surfaces
> >>> >>
> >>> >> Things I could use help on:
> >>> >> * Does anyone know of good example code for making a BMesh out of
> >>> >> n-gons?
> >>> >> N-gons would make the meshes produced by Alt+C *much* cleaner.
> >>> >>
> >>> >>
> >>> >>
> >>> >> On Jul 19, 2014, at 1:28 PM, claas kuhnen <info at ckbrd.de> wrote:
> >>> >>
> >>> >> So agree I am very excited about this
> >>> >>
> >>> >> On Jul 19, 2014 1:27 PM, "Sergey Sharybin" <sergey.vfx at gmail.com>
> >>> >> wrote:
> >>> >>>
> >>> >>> Seems to be rather nice progress. Would be cool if all the bits are
> >>> >>> committed and some .blend in shared which demonstrates the stuff.
> >>> >>>
> >>> >>>
> >>> >>> On Sat, Jul 19, 2014 at 4:31 PM, Jonathan deWerd
> >>> >>> <jjoonathan at gmail.com>
> >>> >>> wrote:
> >>> >>>>
> >>> >>>> Progress:
> >>> >>>> * Finished code to tessellate trim curves!
> >>> >>>>         see:
> >>> >>>> http://wiki.blender.org/index.php/User:Jjoonathan/NURBS_In_Blender
> >>> >>>> * Rewrote knot code to match the conventions in the math literature,
> >>> >>>> tested for compatibility by comparing meshes
> >>> >>>> * Worked on adapting a better NURBS evaluation algorithm that can
> >>> >>>> produce first and second derivatives (for normals and error bounds,
> >>> >>>> respectively).
> >>> >>>>         it's still buggy.
> >>> >>>> * Worked further on the NurbEdge interface to handle imported trim
> >>> >>>> curves
> >>> >>>>         still working on code to match endpoints that are separated
> >>> >>>> in
> >>> >>>> UV space but coincide in R3 due to either wrapping in UV space
> >>> >>>> (cyclic
> >>> >>>> NURBS) or coving
> >>> >>>>
> >>> >>>> Todo:
> >>> >>>> * Finish tracking down the NaN-producing bugs in the new surface
> >>> >>>> evaluator
> >>> >>>>         From there, should be easy to implement good normals
> >>> >>>> * Finish NurbEdge so that it at least handles wrapping in UV space.
> >>> >>>> This
> >>> >>>> will allow importing of most .3dm files.
> >>> >>>> * Implement revolution surfaces.
> >>> >>>>         Demo Claas's hairdryer model!
> >>> >>>>
> >>> >>>> On Jul 12, 2014, at 11:14 AM, Jonathan deWerd <jjoonathan at gmail.com>
> >>> >>>> wrote:
> >>> >>>>
> >>> >>>> > (Apologies if this is a duplicate email. I see a copy of this
> >>> >>>> > email in
> >>> >>>> > gmail's "sent" folder but I don't see one in my inbox, so I'm
> >>> >>>> > sending
> >>> >>>> > again.)
> >>> >>>> >
> >>> >>>> > Progress:
> >>> >>>> > * Finished the code that traverses BReps from 3dm files and cuts
> >>> >>>> > them
> >>> >>>> > into surfaces
> >>> >>>> > * 2D Trim curves import as Nurb objects that are appended to a
> >>> >>>> > NurbList in their parent surface
> >>> >>>> >       Just curves currently, I still have to get multi-part loops
> >>> >>>> > working
> >>> >>>> >       Also they don't seem to be preserved by DNA even after
> >>> >>>> > calling
> >>> >>>> > makesdna...
> >>> >>>> > * Moved surf_gridmesh into bf_blenkernel, promoted curve.c to
> >>> >>>> > curve.cpp (for future OpenNurbs use), fixed a few small bugs that
> >>> >>>> > caused,
> >>> >>>> > moved the GLUT debug code into blender/tests, convinced CMake to
> >>> >>>> > build and
> >>> >>>> > link it
> >>> >>>> > * Wrote, debugged the method that builds the displist from the
> >>> >>>> > gridmesh
> >>> >>>> > * Timed it, see pretty graph a few emails back
> >>> >>>> > * Started writing NurbEdge structure to handle in general the
> >>> >>>> > sewing
> >>> >>>> > of trim edges and cyclic edges (e.g. so that spheres don't have
> >>> >>>> > seams)
> >>> >>>> >
> >>> >>>> > Next up:
> >>> >>>> > * I still need to finish the code that tessellates the trim
> >>> >>>> > curves. I
> >>> >>>> > didn't get much time to work on it today, so I'm planning to work
> >>> >>>> > on it
> >>> >>>> > tomorrow as well.
> >>> >>>> > * Get trim curves to load/save from .blend files by figuring out
> >>> >>>> > what
> >>> >>>> > I'm doing wrong with makesdna
> >>> >>>> > * Finish NurbEdge interface for defining edges to sew, get it in
> >>> >>>> > DNA
> >>> >>>> > as well
> >>> >>>> > * Use NurbEdge to implement revolution surfaces
> >>> >>>> >
> >>> >>>>
> >>> >>>> _______________________________________________
> >>> >>>> Soc-2014-dev mailing list
> >>> >>>> Soc-2014-dev at blender.org
> >>> >>>> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>> --
> >>> >>> With best regards, Sergey Sharybin
> >>> >>>
> >>> >>> _______________________________________________
> >>> >>> Soc-2014-dev mailing list
> >>> >>> Soc-2014-dev at blender.org
> >>> >>> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>> >>>
> >>> >> _______________________________________________
> >>> >> Soc-2014-dev mailing list
> >>> >> Soc-2014-dev at blender.org
> >>> >> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>> >>
> >>> >>
> >>> >>
> >>> >> _______________________________________________
> >>> >> Soc-2014-dev mailing list
> >>> >> Soc-2014-dev at blender.org
> >>> >> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > With best regards, Sergey Sharybin
> >>> >
> >>> > _______________________________________________
> >>> > Soc-2014-dev mailing list
> >>> > Soc-2014-dev at blender.org
> >>> > http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>> >
> >>> _______________________________________________
> >>> Soc-2014-dev mailing list
> >>> Soc-2014-dev at blender.org
> >>> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>
> >>
> >> _______________________________________________
> >> Soc-2014-dev mailing list
> >> Soc-2014-dev at blender.org
> >> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >>
> >
> > _______________________________________________
> > Soc-2014-dev mailing list
> > Soc-2014-dev at blender.org
> > http://lists.blender.org/mailman/listinfo/soc-2014-dev
> >
> _______________________________________________
> Soc-2014-dev mailing list
> Soc-2014-dev at blender.org
> http://lists.blender.org/mailman/listinfo/soc-2014-dev
> 
> _______________________________________________
> Soc-2014-dev mailing list
> Soc-2014-dev at blender.org
> http://lists.blender.org/mailman/listinfo/soc-2014-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2014-dev/attachments/20140726/5192e1e7/attachment-0001.htm 


More information about the Soc-2014-dev mailing list