Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

(ISSUE) SetVisible can hide but not show robot from API

#2
Code:
// My visibility control functions in C#
public void HideVisuals() => _robot.SetVisible(false, 1); // Show only the tool frame
public void ShowVisuals() // Show robot but not joint frames
{
int jointNum = _robot.Joints . length ();
int mask = 2;

for (int i = 0; i < jointNum; i++)
{
mask = (mask << 2) + 2;
}
mask += 1; // Add mask for tool frame

_robot.SetVisible(true, mask);
}

Through experimentation, I found that you can set the visibility of specific joints in a mechanism. The joints to show are specified by a bit mask as the second argument to the .SetVisible(bool, mask) function. The first bit is always the tool frame, and then the bits alternate between joint visuals and joint frames.

Note, the frames will not appear visible unless the corresponding joint is visible as well.


Messages In This Thread
RE: (ISSUE) SetVisible can hide but not show robot from API - bythealenoid- 05-03-2019, 07:52 PM



Users browsing this thread:
1 Guest(s)