bugLibreDWG - Bugs: bug #32186, Dwg_Object list iteration always...

 
 

bug #32186: Dwg_Object list iteration always returns the first entity (in Python)

Submitted by:  Rodrigo Rodrigues da Silva <pitanga>
Submitted on:  Thu 20 Jan 2011 07:35:39 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 20 Jan 2011 07:36:49 AM UTC, comment #1:

Fixed:

.dwg version: 3
Num objects: 61
Supertype: 2
Type: 48
Supertype: 2
Type: 50
Supertype: 2
Type: 52
Supertype: 2
Type: 56
Supertype: 2
Type: 60
Supertype: 2
Type: 62
Supertype: 2
Type: 64
Supertype: 2
Type: 66
Supertype: 2
Type: 68
Supertype: 2
Type: 42
Supertype: 2
Type: 42
Supertype: 2
Type: 500
Supertype: 2
Type: 501
Supertype: 2
Type: 51
Supertype: 2
Type: 53
Supertype: 2
Type: 67
Supertype: 2
Type: 57
Supertype: 2
Type: 57
Supertype: 2
Type: 57
Supertype: 2
Type: 42
Supertype: 2
Type: 73
Supertype: 2
Type: 42
Supertype: 2
Type: 42
Supertype: 2
Type: 49
Supertype: 1
Type: 4
Supertype: 1
Type: 5
Supertype: 2
Type: 502
Supertype: 2
Type: 69
Supertype: 2
Type: 49
Supertype: 2
Type: 502
Supertype: 1
Type: 4
Supertype: 1
Type: 5
Supertype: 2
Type: 49
Supertype: 2
Type: 502
Supertype: 1
Type: 4
Supertype: 1
Type: 5
Supertype: 2
Type: 42
Supertype: 2
Type: 503
Supertype: 2
Type: 503
Supertype: 2
Type: 42
Supertype: 2
Type: 42
Supertype: 2
Type: 70
Supertype: 2
Type: 51
Supertype: 2
Type: 69
Supertype: 1
Type: 18
Supertype: 1
Type: 1
Supertype: 1
Type: 77
Supertype: 1
Type: 19
Supertype: 1
Type: 19
Supertype: 1
Type: 19
Supertype: 2
Type: 65
Supertype: 2
Type: 42
Supertype: 2
Type: 79
Supertype: 2
Type: 79
Supertype: 2
Type: 42
Supertype: 2
Type: 79
Supertype: 2
Type: 42
Supertype: 2
Type: 79
Supertype: 2
Type: 42
Supertype: 2
Type: 79
Supertype: 2
Type: 503

Rodrigo Rodrigues da Silva <pitanga>
Project Administrator
Thu 20 Jan 2011 07:35:39 AM UTC, original submission:

I'm trying to use the libreDWG with python binding on my debian machine but I get some troubles..
I'm trying to open a dwg file and read the content of it for creating the entites on PythonCAD.

I'm doing as following:

from libredwg import *dwg=Dwg_Data()dwg_read_file("example.dwg",dwg)

#loop on entities for i in range(0,dwg.num_objects): dwg.object.index=i print "-> " , dwg.object.supertype
print "-> " , dwg.object.type

but it loop always on the some entity ..supertype is always 2 and type is 48

I Also try dwg.object[i] but this method fails as suggest in dwg_ps.c

Dwg_Object *obj; for (i = 0; i < dwg->num_objects; i++) { obj = &dwg->object[i]; if (obj->supertype = DWG_SUPERTYPE_UNKNOWN) // unknown continue; if (obj->type = DWG_SUPERTYPE_OBJECT) // not entity continue;

(reported by Matteo Boscolo)

Rodrigo Rodrigues da Silva <pitanga>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pitanga (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Jan 2011 07:36:49 AM UTCpitangaOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1