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