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 .
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.
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.
We don’t have the sample yet; you will need to write the code.
Please let us know if you have any question.
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?
Silvia is there a way to add more properties using the ObjectDefinition that you commented above?
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.
Yes, we can add more properties to the ObjectDefinition:
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register