71{
72 unsigned int * nbelems = new unsigned int [*NUMELTG];
73 try {
74
75
76
77 unsigned int conn[3] ;
78 H3D_ID elem_id ;
79 int i,j,cpt_elem,nbelemwrite;
80 char SH3NPOOL[] = "SH3N";
83
84 char SHELLPOOL[] = "Shell";
87
88 unsigned int elem_count = 1;
89
90
91
93 j = 0;
94 for(i=0;i<*NUMELTG;i++) nbelems[i] = 0;
95
96 for(i=0;i<*NUMELTG;i++)
97 {
98 if(H3D_PART[IPARTTG[i] - 1] == 1)
99 {
100 if(IPART[*LIPART1 * (IPARTTG[i] - 1) + 3] !=
comp_id)
101 {
102 comp_id = IPART[*LIPART1 * (IPARTTG[i] - 1) + 3];
103 j = i;
104 }
105 nbelems[j] = nbelems[j] + 1;
106 }
107 }
108
110 cpt_elem = 0;
111 nbelemwrite = 0;
112
113 for(i=0;i<*NUMELTG;i++)
114 {
115 if(H3D_PART[IPARTTG[i] - 1] == 1)
116 {
117 conn[0] = IXTG[*NIXTG * i + 1];
118 conn[1] = IXTG[*NIXTG * i + 2];
119 conn[2] = IXTG[*NIXTG * i + 3];
120 elem_id = IXTG[*NIXTG * i + *NIXTG - 1];
121
122 if(nbelems[i] != 0)
123 {
124 cpt_elem = 0;
125 nbelemwrite = nbelems[i];
126 comp_id = IPART[*LIPART1 * (IPARTTG[i] - 1) + 3] ;
127
129 H3D_ELEM_CONFIG_TRIA3,
comp_id,
132 }
133 cpt_elem++;
136
137 if (cpt_elem == nbelemwrite)
138 {
141 }
142 }
143 }
144
145 }
146
147 catch(...) {
149 }
150 delete [] nbelems;
151
152
153}
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DElementWrite(H3DFileInfo *h3d_file, H3D_ID id, H3D_ID *connectivity)
bool Hyper3DElementEnd(H3DFileInfo *h3d_file)
bool Hyper3DElementBegin(H3DFileInfo *h3d_file, unsigned int count, H3D_ID poolname_id, H3D_ElementConfig config, H3D_ID parent_id, H3D_ID parent_poolname_id, H3D_ID node_poolname_id)