1 // TODO DEBUGGING
2 #define DWG_TYPE DWG_TYPE_ACSH_SWEEP_CLASS
3 #include "common.c"
4
5 void
api_process(dwg_object * obj)6 api_process (dwg_object *obj)
7 {
8 int error, isnew;
9 //Dwg_EvalExpr evalexpr;
10 //Dwg_ACSH_HistoryNode history_node;
11 BITCODE_BD *trans;
12 BITCODE_BL major;
13 BITCODE_BL minor;
14 BITCODE_3BD direction; /*!< DXF 10 */
15 BITCODE_BL bl92; /*!< DXF 92 */
16 BITCODE_BL shsw_text_size; /*!< DXF 90 */
17 BITCODE_TF shsw_text; /*!< DXF 310 */
18 BITCODE_BL shsw_bl93; /*!< DXF 93 */
19 BITCODE_BL shsw_text2_size; /*!< DXF 90 */
20 BITCODE_TF shsw_text2; /*!< DXF 310 */
21 BITCODE_BD draft_angle; /*!< DXF 42 0.0 */
22 BITCODE_BD start_draft_dist; /*!< DXF 43 0.0 */
23 BITCODE_BD end_draft_dist; /*!< DXF 44 0.0 */
24 BITCODE_BD scale_factor; /*!< DXF 45 1.0 */
25 BITCODE_BD twist_angle; /*!< DXF 48 0.0 */
26 BITCODE_BD align_angle; /*!< DXF 49 0.0 */
27 BITCODE_BD* sweepentity_transform; /*!< DXF 46 16x */
28 BITCODE_BD* pathentity_transform; /*!< DXF 47 16x */
29 BITCODE_RC align_option; /*!< DXF 70 2 */
30 BITCODE_RC miter_option; /*!< DXF 71 2 */
31 BITCODE_B has_align_start; /*!< DXF 290 1 */
32 BITCODE_B bank; /*!< DXF 292 1 */
33 BITCODE_B check_intersections; /*!< DXF 293 0 */
34 BITCODE_B shsw_b294; /*!< DXF 294 1 */
35 BITCODE_B shsw_b295; /*!< DXF 295 1 */
36 BITCODE_B shsw_b296; /*!< DXF 296 1 */
37 BITCODE_3BD pt2; /*!< DXF 11 0,0,0 */
38
39 Dwg_Version_Type dwg_version = obj->parent->header.version;
40 #ifdef DEBUG_CLASSES
41 dwg_obj_acsh_sweep_class *_obj = dwg_object_to_ACSH_SWEEP_CLASS (obj);
42
43 CHK_EVALEXPR (ACSH_SWEEP_CLASS);
44 CHK_ACSH_HISTORYNODE();
45
46 // AcDbShSweepBase
47 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, major, BL); /*!< DXF 90 */
48 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, minor, BL); /*!< DXF 91 */
49 CHK_ENTITY_3RD (_obj, ACSH_SWEEP_CLASS, direction); /*!< DXF 10 */
50 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, bl92, BL); /*!< DXF 92 */
51 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_text_size, BL); /*!< DXF 90 */
52 //if (!dwg_dynapi_entity_value (_obj, "ACSH_SWEEP_CLASS", "shsw_text", &shsw_text, NULL))
53 // fail ("ACSH_SWEEP_CLASS.shsw_text");
54 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_text, TF); /*!< DXF 310 */
55 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_bl93, BL); /*!< DXF 93 */
56 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_text2_size, BL); /*!< DXF 90 */
57 //if (!dwg_dynapi_entity_value (_obj, "ACSH_SWEEP_CLASS", "shsw_text2", &shsw_text2, NULL))
58 // fail ("ACSH_SWEEP_CLASS.shsw_text2");
59 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_text2, TF); /*!< DXF 310 */
60 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, draft_angle, BD); /*!< DXF 42 0.0 */
61 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, start_draft_dist, BD); /*!< DXF 43 0.0 */
62 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, end_draft_dist, BD); /*!< DXF 44 0.0 */
63 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, scale_factor, BD); /*!< DXF 45 1.0 */
64 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, twist_angle, BD); /*!< DXF 48 0.0 */
65 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, align_angle, BD); /*!< DXF 49 0.0 */
66 if (!dwg_dynapi_entity_value (_obj, "ACSH_SWEEP_CLASS",
67 "sweepentity_transform",
68 &sweepentity_transform, NULL))
69 fail ("ACSH_SWEEP_CLASS.sweepentity_transform");
70 else
71 if (!sweepentity_transform)
72 ok ("ACSH_SWEEP_CLASS.sweepentity_transform: NULL");
73 else
74 for (int i = 0; i < 16; i++)
75 {
76 if (sweepentity_transform[i] == _obj->sweepentity_transform[i])
77 ok ("ACSH_SWEEP_CLASS.sweepentity_transform[%d]: %f", i,
78 sweepentity_transform[i]);
79 else
80 fail ("ACSH_SWEEP_CLASS.sweepentity_transform[%d]: %f", i,
81 sweepentity_transform[i]);
82 }
83 if (!dwg_dynapi_entity_value (_obj, "ACSH_SWEEP_CLASS",
84 "pathentity_transform",
85 &pathentity_transform, NULL))
86 fail ("ACSH_SWEEP_CLASS.pathentity_transform");
87 else
88 if (!pathentity_transform)
89 ok ("ACSH_SWEEP_CLASS.pathentity_transform: NULL");
90 else
91 for (int i = 0; i < 16; i++)
92 {
93 if (pathentity_transform[i] == _obj->pathentity_transform[i])
94 ok ("ACSH_SWEEP_CLASS.pathentity_transform[%d]: %f", i,
95 pathentity_transform[i]);
96 else
97 fail ("ACSH_SWEEP_CLASS.pathentity_transform[%d]: %f", i,
98 pathentity_transform[i]);
99 }
100 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, align_option, RC); /*!< DXF 70 2 */
101 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, miter_option, RC); /*!< DXF 71 2 */
102 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, has_align_start, B); /*!< DXF 290 1 */
103 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, bank, B); /*!< DXF 292 1 */
104 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, check_intersections, B); /*!< DXF 293 0 */
105 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_b294, B); /*!< DXF 294 1 */
106 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_b295, B); /*!< DXF 295 1 */
107 CHK_ENTITY_TYPE (_obj, ACSH_SWEEP_CLASS, shsw_b296, B); /*!< DXF 296 1 */
108 CHK_ENTITY_3RD (_obj, ACSH_SWEEP_CLASS, pt2); /*!< DXF 11 0,0,0 */
109 #endif
110 }
111