Pointer to next entity.

Bug #696222 reported by Bert Timmerman
6
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_number;
    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
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

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;
char *linetype;
char *layer;
int color;
int paperspace;
int acad_version_number;

} 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.

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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.