#263 Convert NMG Model to BOT

Zhao Anqing

According to the tip in TODO file:
"nmg_bot() and nmg_from_bot() only work with shells. verify that all callers iterate over all shells or write a model version that does a complete conversion correctly."

I write a new patch to add a function 'nmg_bot_list' which convert [model*] to [rt_bot_list*]. I hope this patch could meet the requirement. If so, I will continue to improve it then.

What's more, I wonder that some function just work on the first shell of nmgregion, and the first nmgregion of model. In my opinion, it should deal with all of them(shells/nmgregions). Is there any special purpose for that?

Thank you.

1 Attachments


  • Daniel Roßberg

    Daniel Roßberg - 2014-04-11

    Zhao, you just dicovered one reason why I want you to remove the model and nmgregion structs: Some functions run into trouble if an NMG has more than one shell. That's because we in fact need only one shell (in BRL-CAD context). The internal structure with nmgregion and model is completely invisible to the generic BRL-CAD functions (e.g the ray-trace).

    Therefore, nmg_bot() and nmg_from_bot() would work well if the nmg primitive would be the shell struct.


  • Zhao Anqing

    Zhao Anqing - 2014-04-12

    Hi, Daniel

    Thanks for your patient explanation which makes me gain a deeper understanding of the reason for removing this two struct.^-^

    I hope to consult you some more details about NMG parts in BRL-CAD. If I haven't made a mistake here, a model with several regions is usually used to deal with detached body; a region with several shells is used to deal with kinds of hollow situation. So, after removing the two structs, *.g file and BRL-CAD region as the substitute could achieve the same function perfectly?

    That means, all functions will be changed/removed, just leave the shell(only one shell) as the top struct of NMG part?

    And, according to my professor's opinion, Weiler's paper published in 1980s is maybe a bit obsolete. I am familiar with ACIS's data structure which selectively absorbed the advantages of Weiler's work, and it can represent non-manifold well. Using so much XXXUse structure rather than only splitting edge into edgeuses may make things complicated.



Log in to post a comment.