Hi Everyone
I am trying to build one app base on Rhino inside and winform. but when I draw meshes in viewportcontrol, nothing change in the UI and no return error. This is my code as follow, Please give me some clue. thanks.
if (_forwardKinematics.Robot.Meshes != null)
{
// Initiate the display color and transparancy of the robot mesh
System.Drawing.Color color;
double trans;
// Set the display color and transparancy of the robot mesh
if (_forwardKinematics.InLimits == true)
{
color = System.Drawing.Color.FromArgb(225, 225, 225);
trans = 0.0;
}
else
{
color = System.Drawing.Color.FromArgb(150, 0, 0);
trans = 0.5;
}
for (int i = 0; i != _forwardKinematics.Robot.Meshes.Count; i++)
{
viewportControl1.Display.DrawMeshShaded(_forwardKinematics.Robot.Meshes[i], new Rhino.Display.DisplayMaterial(color, trans));
}
viewportControl1.Viewport.ZoomExtents();
viewportControl1.Refresh();
//UseWaitCursor = false;
}