On May 21, 2012, at 11:12 AM, plussai <[email protected]> wrote:

     I find that the function brep_trimleafs_plot() in brep/brep_debug.cpp looks like  polygonal approximation of trimming curves which is a step in tessellation. But the function don't think about the longest edge size.So I want to do some work on the function.

How do you plan on using the longest edge size to help with tessellation?  Just curious.


     However,computing the longest edge size is in the  bspile/nurb_tess.c and the nurbs is represented by the form of struct face_g_snurb that is different from the ON_BrepSurface.Is there some function which can convert face_g_snurb to ON_BrepSurface.

There isn't and there is BUT you shouldn't need it! :-)

The rt_nurb_brep() function will convert an rt_nurb_internal (and its constituent face_g_snurb objects) to an ON_Brep (as a set of ON_NurbsSurface objects), so that has the (very simple) logic to do the conversion.  You could use it as-is or create a function to do just one surface at a time, refactoring accordingly.  But... you don't need that.

The "bspline" interface (e.g., face_g_snurb and rt_nurb_*() functions) is our old NURBS implementation.  There is a LOT of useful functionality there (as you found), but we're not keeping that interface.  It'll scheduled for removal in 2015 or soon thereafter with rel8.

The newer "brep" interface uses the OpenNURBS data structures which are nearly identical to our old implementation.  The main difference is that the ON_NurbsSurfaces do not explicitly replicate the first and last uv knots

So to use most any of the old bspline/NURBS code in src/librt/primitives/bspline, you just have to account for the implicit knots and adjust iterators accordingly.  It'd be better to create a function in opennurbs_ext.cpp or in src/librt/primitives/brep that is a translation of the bspline implementation instead of filling in a bspline data structure to call the old function.

Cheers!
Sean

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to