Pointer to next entity.
Bug #696222 reported by
Bert Timmerman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libDXF |
Fix Committed
|
Medium
|
Bert Timmerman |
Bug Description
I'm thinking of adding a pointer to the next entity inside the entity struct.
Like so:
typedef struct
dxf_arc
{
int id_code;
char *linetype;
char *layer;
double x0;
double y0;
double z0;
double extr_x0;
double extr_y0;
double extr_z0;
double thickness;
double radius;
double start_angle;
double end_angle;
int color;
int paperspace;
int acad_version_
DxfArcPtr next_arc;
} DxfArc, * DxfArcPtr;
This is to allow for linking together all arcs in the ENTITIES table by pointing to the first arc (a DxfArcPtr).
In the last arc in the list (of arcs) this pointer would be NULL.
Changed in libdxf: | |
assignee: | nobody → Bert Timmerman (bert-timmerman) |
status: | New → In Progress |
Changed in libdxf: | |
milestone: | none → 0.0.2 |
Changed in libdxf: | |
importance: | Undecided → Medium |
Changed in libdxf: | |
milestone: | 0.0.2 → 0.0.1 |
Changed in libdxf: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
gass wrote on August 12, 2010:
how about a new hearder struct, and then some arc and other derivating from that:
typedef struct
dxf_entity
{
int id_code; number;
char *linetype;
char *layer;
int color;
int paperspace;
int acad_version_
} DxfEntity;
and then an arc should be:
typedef struct
dxf_arc
{
DxfEntity entity; double x0;
double y0;
double z0;
double extr_x0;
double extr_y0;
double extr_z0;
double thickness;
double radius;
double start_angle;
double end_angle;
}
Then you can easily cast entities to arc and others, and still refer to entities.