1 #define DWG_TYPE DWG_TYPE_POLYLINE_MESH
2 #include "common.c"
3
4 void
api_process(dwg_object * obj)5 api_process (dwg_object *obj)
6 {
7 int error;
8 BITCODE_BS flag, curve_type, num_m_verts, num_n_verts, m_density, n_density;
9 BITCODE_BL num_owned;
10 BITCODE_H first_vertex, last_vertex, *vertex, seqend;
11 Dwg_Version_Type version = obj->parent->header.version;
12
13 dwg_ent_polyline_mesh *polyline_mesh = dwg_object_to_POLYLINE_MESH (obj);
14
15 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, flag, BS);
16 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, curve_type, BS);
17 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, num_owned, BL);
18 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, m_density, BS);
19 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, n_density, BS);
20 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, num_m_verts, BS);
21 CHK_ENTITY_TYPE_W_OLD (polyline_mesh, POLYLINE_MESH, num_n_verts, BS);
22
23 if (version >= R_13 && version <= R_2000)
24 {
25 CHK_ENTITY_H (polyline_mesh, POLYLINE_MESH, first_vertex);
26 CHK_ENTITY_H (polyline_mesh, POLYLINE_MESH, last_vertex);
27 }
28 if (version >= R_2004)
29 {
30 CHK_ENTITY_HV (polyline_mesh, POLYLINE_MESH, vertex, num_owned);
31 }
32 CHK_ENTITY_H (polyline_mesh, POLYLINE_MESH, seqend);
33 }
34