71{
72 unsigned int * nbelems = new unsigned int [*NUMELC];
73 try {
74
75
76
77 unsigned int conn[4] ;
78 H3D_ID elem_id ;
79 int i,j,cpt_elem,nbelemwrite;
80
81 char SH4NPOOL[] = "SHELL";
84
85 char SHELLPOOL[] = "Shell";
88
89 unsigned int elem_count = 1;
90
92 j = 0;
93 for(i=0;i<*NUMELC;i++) nbelems[i] = 0;
94
95 for(i=0;i<*NUMELC;i++)
96 {
97 if(H3D_PART[IPARTC[i] - 1] == 1)
98 {
99 if(IPART[*LIPART1 * (IPARTC[i] - 1) + 3] !=
comp_id)
100 {
101 comp_id = IPART[*LIPART1 * (IPARTC[i] - 1) + 3];
102 j = i;
103 }
104 nbelems[j] = nbelems[j] + 1;
105 }
106 }
107
109 cpt_elem = 0;
110 nbelemwrite = 0;
111
112 for(i=0;i<*NUMELC;i++)
113 {
114 if(H3D_PART[IPARTC[i] - 1] == 1)
115 {
116 conn[0] = IXC[*NIXC * i + 1];
117 conn[1] = IXC[*NIXC * i + 2];
118 conn[2] = IXC[*NIXC * i + 3];
119 conn[3] = IXC[*NIXC * i + 4];
120 elem_id = IXC[*NIXC * i + *NIXC - 1];
121
122 if(nbelems[i] != 0)
123 {
124 cpt_elem = 0;
125 nbelemwrite = nbelems[i];
126 comp_id = IPART[*LIPART1 * (IPARTC[i] - 1) + 3] ;
127
129 H3D_ELEM_CONFIG_QUAD4,
comp_id,
132 }
133 cpt_elem++;
136
137 if (cpt_elem == nbelemwrite)
138 {
141 }
142 }
143 }
144
145
146 }
147
148 catch(...) {
150 }
151 delete [] nbelems;
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)