1 // TODO DEBUGGING
2 #define DWG_TYPE DWG_TYPE_NURBSURFACE
3 #include "common.c"
4
5 void
api_process(dwg_object * obj)6 api_process (dwg_object *obj)
7 {
8 int error, isnew;
9 _3DSOLID_FIELDS;
10 BITCODE_BS u_isolines;
11 BITCODE_BS v_isolines;
12 BITCODE_BL i;
13 // AcDbNurbSurface
14 BITCODE_BS short170;
15 BITCODE_B cv_hull_display; /* DXF 290 */
16 BITCODE_3BD uvec1;
17 BITCODE_3BD vvec1;
18 BITCODE_3BD uvec2;
19 BITCODE_3BD vvec2;
20
21 Dwg_Version_Type dwg_version = obj->parent->header.version;
22 #ifdef DEBUG_CLASSES
23 dwg_ent_nurbsurface *_obj = dwg_object_to_NURBSURFACE (obj);
24
25 CHK_ENTITY_TYPE (_obj, NURBSURFACE, acis_empty, B);
26 CHK_ENTITY_TYPE (_obj, NURBSURFACE, version, BS);
27 CHK_ENTITY_TYPE (_obj, NURBSURFACE, acis_data, TF);
28 CHK_ENTITY_TYPE (_obj, NURBSURFACE, wireframe_data_present, B);
29 CHK_ENTITY_TYPE (_obj, NURBSURFACE, point_present, B);
30 CHK_ENTITY_3RD (_obj, NURBSURFACE, point);
31 CHK_ENTITY_TYPE (_obj, NURBSURFACE, isoline_present, B);
32 CHK_ENTITY_TYPE (_obj, NURBSURFACE, isolines, BL);
33 CHK_ENTITY_TYPE (_obj, NURBSURFACE, num_wires, BL);
34 CHK_ENTITY_TYPE (_obj, NURBSURFACE, num_silhouettes, BL);
35 if (!dwg_dynapi_entity_value (_obj, "NURBSURFACE", "wires", &wires, NULL))
36 fail ("NURBSURFACE.wires");
37 else
38 {
39 for (i = 0; i < num_wires; i++)
40 printf ("NURBSURFACE.wires[%u]: " FORMAT_BLd "\n", i, wires[i].selection_marker);
41 }
42 if (!dwg_dynapi_entity_value (_obj, "NURBSURFACE", "silhouettes", &silhouettes, NULL))
43 fail ("NURBSURFACE.silhouettes");
44 else
45 {
46 for (i = 0; i < num_silhouettes; i++)
47 printf ("NURBSURFACE.silhouettes[%u]: " FORMAT_BL "\n", i, silhouettes[i].vp_id);
48 }
49 if (dwg_version >= R_2007 && _obj->history_id) // if it did not fail before
50 {
51 //CHK_ENTITY_TYPE (_obj, NURBSURFACE, unknown_2007, BL);
52 CHK_ENTITY_H (_obj, NURBSURFACE, history_id);
53 }
54
55 CHK_ENTITY_TYPE (_obj, NURBSURFACE, u_isolines, BS);
56 CHK_ENTITY_TYPE (_obj, NURBSURFACE, v_isolines, BS);
57
58 CHK_ENTITY_TYPE (_obj, NURBSURFACE, short170, BS);
59 CHK_ENTITY_TYPE (_obj, NURBSURFACE, cv_hull_display, BS);
60 CHK_ENTITY_3RD (_obj, NURBSURFACE, uvec1);
61 CHK_ENTITY_3RD (_obj, NURBSURFACE, vvec1);
62 CHK_ENTITY_3RD (_obj, NURBSURFACE, uvec2);
63 CHK_ENTITY_3RD (_obj, NURBSURFACE, vvec2);
64 #endif
65 }
66