Question about temporary bodies
Posted: Fri Dec 27, 2024 9:43 pm
Hi, everyone, Merry Christmas. I got a question about temporary bodies. When I get a reference to Body2 in an assembly (from part type component) and call Body2.Copy2 to create a temporary body from it, where does that temporary body reside in? What is hosting it?
Since Copy2 call does not allow specifying target component for that temporary body, I thought it should be hosted by the same component where the original body is, especially because Body2.Display3 documentation also seems to imply this:
However... Bear with me here... After temporary body is created, it is out of position if the original body component and assembly origins do not match. To get it into position, you have to get Transform2 from that component and apply it to the temporary body to fix the position. This implies that the temporary body was created in the assembly coordinate system, so most likely it is hosted by the assembly itself, not the component that has the original body.
I also found that I can call Body2.Display3 and pass reference to ANY component in the assembly, even an unrelated one, and it still works and displays the temporary body. Temporary body remains visible even if I open that unrelated component document separately. Moving that component appears to move the temporary body too. This implies that the graphics of the temporary body are hosted by whatever component you pass as a parameter to Body2.Display3, but that might be just the graphics - the temporary body itself is probably hosted somewhere else. The coordinate issue implies that the temporary body is hosted by the assembly itself, but that contradicts the documentation.
I am totally confused. Can anyone please clarify how this works exactly?
Since Copy2 call does not allow specifying target component for that temporary body, I thought it should be hosted by the same component where the original body is, especially because Body2.Display3 documentation also seems to imply this:
However... Bear with me here... After temporary body is created, it is out of position if the original body component and assembly origins do not match. To get it into position, you have to get Transform2 from that component and apply it to the temporary body to fix the position. This implies that the temporary body was created in the assembly coordinate system, so most likely it is hosted by the assembly itself, not the component that has the original body.
I also found that I can call Body2.Display3 and pass reference to ANY component in the assembly, even an unrelated one, and it still works and displays the temporary body. Temporary body remains visible even if I open that unrelated component document separately. Moving that component appears to move the temporary body too. This implies that the graphics of the temporary body are hosted by whatever component you pass as a parameter to Body2.Display3, but that might be just the graphics - the temporary body itself is probably hosted somewhere else. The coordinate issue implies that the temporary body is hosted by the assembly itself, but that contradicts the documentation.
I am totally confused. Can anyone please clarify how this works exactly?