DWF

Reply
Member
Majd_Zoubi
Posts: 4
Registered: ‎02-23-2012
Message 1 of 13 (1,672 Views)

how to get geometry data from DWF file

1672 Views, 12 Replies
02-24-2012 02:22 AM

Hello,

I'm trying to make new importer in SimLab Composer reads DWF file so I need object geomety data .

I could not find any examples on how to extract object geometry data. is there any example helps me ? if not , would it possible to get small code shows how to get DWFModel and object geometry data from DWF File .

 

regards

Majd

Contributor
geotavros
Posts: 15
Registered: ‎03-27-2012
Message 2 of 13 (1,620 Views)

Re: how to get geometry data from DWF file

03-27-2012 07:56 AM in reply to: Majd_Zoubi

You need to look at W3D samples. All 3D data is stored inside .w3d file which is inside .dwf file.

Member
Majd_Zoubi
Posts: 4
Registered: ‎02-23-2012
Message 3 of 13 (1,614 Views)

Re: how to get geometry data from DWF file

03-27-2012 01:19 PM in reply to: geotavros

thanks for your reply,

now i have get geometry data through BStreamFileToolKit parsing, now I'm trying to read node names for each node , the structure in ObjectDefinitionReader example is clear to traversing around nodes and reading names but i can't see how to match between objects and names in BStreamFileToolKit parsing.

 

regards,

Majd

Employee
SilviaCao
Posts: 136
Registered: ‎06-07-2009
Message 4 of 13 (1,569 Views)

Re: how to get geometry data from DWF file

04-05-2012 10:59 PM in reply to: Majd_Zoubi

Thank you for your question.

 

You use the ObjectDefinitionReader to get the node’s name and node’s id; the node id is used to match the geometry object, which is the tag id (TK_Tag).

 

Please let us know if you have any further questions.



Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Member
Majd_Zoubi
Posts: 4
Registered: ‎02-23-2012
Message 5 of 13 (1,552 Views)

Re: how to get geometry data from DWF file

04-08-2012 05:11 AM in reply to: SilviaCao

thank you for your reply

can you show me small code example .

Employee
SilviaCao
Posts: 136
Registered: ‎06-07-2009
Message 6 of 13 (1,538 Views)

Re: how to get geometry data from DWF file

04-09-2012 07:01 PM in reply to: Majd_Zoubi

We don’t have the sample yet; you will need to write the code.

 

Please let us know if you have any question.



Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Contributor
geotavros
Posts: 15
Registered: ‎03-27-2012
Message 7 of 13 (1,057 Views)

Re: how to get geometry data from DWF file

02-10-2013 07:13 AM in reply to: SilviaCao

Using ReadContentDefinition sample I got all DWFInstance objects. Using DWFInstance::getNodeID() I got ID of each instance. The IDs are: 1, 2, 3, 4 for my sample file. 

When parsing 3D stream using SimpleW3DStreamProcessor sample I get TKE_Tag opcode and handle it using TK_Tag's subclass TkTagHandler. In TkTagHandler::Execute() I increase the counter. 

In my sample file I get like 12 TKE_Tag opcodes. 

 

I want to get the extended attributes of TK_Shell entities. And can't find a way to match the ID obtained from DWFInstance::getNodeID() with TK_Shell entity. You say I need to use the count of TK_Tag entities, but when do I need to start counting them? Do I need to count them from the start of 3D stream parsing or from the TK_Open_Segment?

Member
emanuel.ceballos
Posts: 4
Registered: ‎01-29-2013
Message 8 of 13 (1,033 Views)

Re: how to get geometry data from DWF file

02-13-2013 07:45 AM in reply to: Majd_Zoubi

Silvia is there a way to add more properties using the ObjectDefinition that you commented above?

Emanuel Ceballos
ENGworks - Software Developer
Employee
SilviaCao
Posts: 136
Registered: ‎06-07-2009
Message 9 of 13 (1,011 Views)

Re: how to get geometry data from DWF file

02-15-2013 07:23 PM in reply to: geotavros

Count the TK_Tag; and the current segment (TK_Open_Segment) which contains the TK_Tag will be map to the DWGInstance by the node id and tag id.

 

Thanks,

Silvia



Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Employee
SilviaCao
Posts: 136
Registered: ‎06-07-2009
Message 10 of 13 (1,009 Views)

Re: how to get geometry data from DWF file

02-15-2013 07:31 PM in reply to: emanuel.ceballos

Yes, we can add more properties to the ObjectDefinition:

  1. Read the DWF and the ObjectDefinition (please refer to the toolkit sample ObjectDefinitionReader);
  2. Add more properties to the ObjectDefinition;
  3. Save the DWF file and the ObjectDefinition.


Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.