Fri, 12/22/2023 - 13:26
Hi, everyone!
I have two questions. The first one is about assembly display.
I can read the assembly of the model through XDE, but I encountered a situation where when the assembly of the model only has 1, it will display the Solid or Compound of the model.ex:(CAD assistant display effect),Sometimes it will be the same number as Solid, and sometimes it will be different. I want to know why.
Another question is how do I get the number of Parts and what does Parts represent?
Thanks for your reply!
Fri, 12/22/2023 - 13:53
Parts means assembly part. It is flexible parts that connected to the assembly root with some transfromation. It is not compound itself, it is assembly consturction.
Best regards, Dmitrii.
Mon, 12/25/2023 - 06:55
Thanks for your reply!
I can read its root node a (0) through XDE. According to the code you provided, no assembly was detected, but in the CAD assistant it shows that it has 8 parts.
I traversed the related properties of Compounds and got the number to be 1.
Do you have any relevant thoughts and ideas?
I uploaded the model data. If necessary, you can download it for testing.
Looking forward to your reply again!
Mon, 12/25/2023 - 09:41
The number you see is correct - this IGES model has only one object. What is confusing is CAD Assistant behavior - it implicitly expands document (
XCAFDoc_Editor::Expand()
) if it contains only a single root.Note that for preserving model structure it is better using STEP format instead of archaic IGES.
Mon, 12/25/2023 - 11:48
Thanks for your reply!
Due to my lack of technical knowledge, I do not understand what you are saying,There are a few points:
First, When you say that there is only one IGES object, you mean that the number of Compounds is one, right?
Second, According to your pseudocode, this is what I understand
But, II still can't get the same number of Parts as in CAD assistant.
Last, The STEP model uses STEPCAFControl_Reader, and the IGES model uses IGESCAFControl_Reader. They should not affect each other, right?
Looking forward to your reply!
Wed, 12/27/2023 - 10:30
Thanks for your reply, now i can get assembly name. Next, I will continue to advance other work!