On Jul 9, 2012, at 5:19 PM, plussai wrote:

>     Next step for my project is to triangulate 'TrimLoop' which is a polygon 
> in uv region. I'v found a algorithm  for the Triangulation.
>     Now,the question is in what form to represent the result of 
> triangulation?Is there a data structure for mesh that is implement in BRLCAD?
>     Opennurbs API has 'ON_Mesh' and 'ON_MeshFace' which may be useful.Can I 
> use them?

I'd avoid using ON_Mesh as that would introduce yet another meshing structure 
among three or four being used within BRL-CAD.  Only if there was some strong 
compelling reason like it converting seamlessly and automatically with ON_Brep 
would it even be considered.

You could just keep track of the triangulation using a vertex and face array 
(similar to what you'd do for OpenGL).  That happens to be the same data 
structure used by our BoT primitive if you later need to put it into an 
"object" (see the mk_bot() routine for a helper function).  You won't get 
explicit connectivity between faces, but it's simple and depending on what 
you're doing may be sufficient.

Alternatively, the usual way for storing a generalized 3D mesh triangulation is 
to use our extensive nmg API.  See any of the rt_*_tess() callback functions in 
LIBRT for examples on using that for stashing a tessellation (as that is 
exactly what those functions do).  The rt_arb_tess() function is probably the 
simplest example.

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
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to