72{
73 unsigned int * nbelems = new unsigned int [*NUMELQ];
74 try {
75
76
77
78 unsigned int conn4[4] ;
79 H3D_ID elem_id ;
80 int i,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10;
81 int cpt_elem,nbelemwrite;
82 int elem_nodes = 0;
83 int elem_nodes_m1 = 0;
84 int j = 0;
85
86 char SKINPOOL[] = "SKIN";
89
90
91 unsigned int elem_count = 1;
92
93
94
95 for(i=0;i<*NUMELQ;i++) nbelems[i] = 0;
96
98
99 for(i=0;i<*NUMELQ;i++)
100 {
101 if(H3D_PART[IPARTQ[i] - 1] == 1)
102 {
103 if(IPARTQ[i] > 0)
104 {
105 elem_nodes = 4;
106
107 if(IPART[*LIPART1 * (IPARTQ[i] - 1) + 3] !=
comp_id)
108 {
109 comp_id = IPART[*LIPART1 * (IPARTQ[i] - 1) + 3];
110 j = i;
111 }
112 nbelems[j] = nbelems[j] + 1;
113 }
114 }
115 }
116
118 cpt_elem = 0;
119 nbelemwrite = 0;
120
121 for(i=0;i<*NUMELQ;i++)
122 {
123 if(IPARTQ[i] > 0)
124 {
125 if(H3D_PART[IPARTQ[i] - 1] == 1)
126 {
127 elem_id = IXQ[*NIXQ * i + *NIXQ - 1];
128 comp_id = IPART[*LIPART1 * (IPARTQ[i] - 1) + 3];
129
130 conn4[0] = IXQ[*NIXQ * i + 1];
131 conn4[1] = IXQ[*NIXQ * i + 2];
132 conn4[2] = IXQ[*NIXQ * i + 3];
133 conn4[3] = IXQ[*NIXQ * i + 4];
134
135
136
137 if(nbelems[i] != 0)
138 {
139 cpt_elem = 0;
140 nbelemwrite = nbelems[i];
141 comp_id = IPART[*LIPART1 * (IPARTQ[i] - 1) + 3];
142
143 if(conn4[3] == conn4[2])
144 {
146 H3D_ELEM_CONFIG_TRIA3,
comp_id,
148 }
149 else
150 {
152 H3D_ELEM_CONFIG_QUAD4,
comp_id,
154 }
156 }
157
158
159 cpt_elem++;
162
163
164
165
166 if (cpt_elem == nbelemwrite)
167 {
170 }
171
172 }
173 }
174 }
175
176
177
178 }
179
180 catch(...) {
182 }
183 delete [] nbelems;
184
185
186}
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)