Hi all, I want to seek some suggestions for designing the basic data structure for B-rep primitives.
If we want to integrate 'plate mode' into NURBS, the first step is about how to store these data, like thickness value array etc implemented in BoT primitives, into the internal NURBS data structure. Presently, the already defined data structure is *rt_brep_internal* (about line 298 in geom.h), which includes a magic number and brep pointer defined with openNURBS built-in class. Similar to BoT (*rt_bot_internal*), I want to add some extra information like BoT mode(unsigned char mode), thickness value array(fastf_t *thickness), face mode flag(struct bu_bitv *face_mode) into *rt_brep_internal* as follows:
/* modes for brep */
#define RT_BREP_SURFACE 1
#define RT_BREP_SOLID 2
#define RT_BREP_PLATE 3
#define RT_BREP_PLATE_NOCOS 4
/* flags for bot_flags: reusing similar definitions for BoT */
/* ID_BREP */
/* additional information I want to add here! */
unsigned char mode;
unsigned char bot_flags;
struct bu_bitv *face_mode;
Besides, another data structure related to BoT is *bot_specific*(about line 57 in bot.h), similarly, there is a *brep_specific* (about line 32 in brep_local.h), what I think is to map all the extra information defined in the *rt_brep_internal* directly into this category specific data structure. Is this acceptable?
What I want to know is that, if my solution is reasonable? Do I miss something important or need to make some changes to my basic design? It would be much appreciated if someone could give any suggestions? Cause this is the very first step to dive into my project further, so I want to make sure it works well at the very beginning. Thank you very much. :)