73{
74 char *cname,*cname1,*ccomment;
75 int cname_len,cname_len1,ccomment_len;
76 int i,cpt_size;
77 float node[3];
78 H3D_ID node_id;
79 unsigned int elem_count = 1;
80
81 cname_len = *size + 1;
82 cname=(char*) malloc(sizeof(char)*cname_len);
83 for(i=0;i<*size;i++) cname[i] = name[i];
84
85
86 cname_len1 = *size1 + 1;
87 cname1=(char*) malloc(sizeof(char)*cname_len1);
88 for(i=0;i<*size1;i++) cname1[i] = name1[i];
89 cname1[*size1]='\0';
90
91 cpt_size = 0;
92 for(i=0;i<*size;i++)
93 {
94 if(name[i] != ' ') cpt_size = i;
95 }
96 cname[cpt_size+1]='\0';
97
98 ccomment_len = *s_comment + 1;
99 ccomment=(char*) malloc(sizeof(char)*ccomment_len);
100 for(i=0;i<*s_comment;i++) ccomment[i] = comment[i];
101 ccomment[*s_comment]='\0';
102
103
104 char * LAYERPOOL = new char [100];
105 LAYERPOOL[0] ='\0';
106 char * IPT_STRING = new char [100];
107 IPT_STRING[0] ='\0';
108
109
110
111 H3D_ID layer_pool_id = H3D_NULL_ID;
112
113
114
115
116 if( *ipt > 0 )
117 {
118 sprintf(IPT_STRING, "IPT %d" ,*ipt);
119#ifdef _WIN64
120 strcat_s(LAYERPOOL,100,IPT_STRING);
121#else
122 LAYERPOOL = strcat(LAYERPOOL,IPT_STRING);
123#endif
124
125 }
126 else
127 {
128 sprintf(LAYERPOOL, "%s %d" ,cname1,*info1);
129#ifdef _WIN64
130 strcat_s(LAYERPOOL,100,IPT_STRING);
131#else
132 LAYERPOOL = strcat(LAYERPOOL,IPT_STRING);
133#endif
134
135 }
136
138
140
141
142
143
144
145 try {
146
147 char TRUSSPOOL[] = "TRUSS";
150
151 char BEAMPOOL[] = "BEAM";
154
155 char SPRINGPOOL[] = "SPRING";
158
159
161
164
166
168
169
174
175 if (strlen(ccomment) != 0)
176 {
179 }
180
181
182
186
190
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
212
213 }
214
215 catch(...) {
217 }
218 delete [] LAYERPOOL;
219 delete [] IPT_STRING;
220
221 free(cname);
222 free(cname1);
223 free(ccomment);
224
225}
H3D_ID spring_poolname_id
H3D_TENSOR_TYPE tensor_type
bool Hyper3DDatatypePools(H3DFileInfo *h3d_file, H3D_ID dt_id, H3D_ID poolname_id, unsigned int num_layers, H3D_ID *layername_ids, bool corners, H3D_TENSOR_TYPE tensor_type, float poisson)
bool Hyper3DAddString(H3DFileInfo *h3d_file, const char *const string, H3D_ID *const str_id)
bool Hyper3DDatatypeEnd(H3DFileInfo *h3d_file)
bool Hyper3DExportClearError(H3DFileInfo *h3d_file)
bool Hyper3DDatatypeDescriptionWrite(H3DFileInfo *h3d_file, H3D_ID dt_id, const char *description)
bool Hyper3DDatatypeWrite(H3DFileInfo *h3d_file, const char *label, H3D_ID dt_id, H3D_DS_FORMAT format, H3D_DS_TYPE type, unsigned int num_pools)
bool Hyper3DDatatypeBegin(H3DFileInfo *h3d_file, unsigned int count)