internal RobotCell(string name, Manufacturers manufacturer, List <MechanicalGroup> mechanicalGroups, IO io, Plane basePlane, Mesh?environment) : base(name, manufacturer, io, basePlane, environment, GetDefaultPose(mechanicalGroups)) { MechanicalGroups = mechanicalGroups; foreach (var group in mechanicalGroups) { var movesRobot = group.Externals.Find(m => m.MovesRobot); var robotDisplay = group.Robot.DisplayMesh; if (movesRobot is not null) { var movableBase = movesRobot.Joints.Last().Plane; movableBase.Orient(ref movesRobot.BasePlane); robotDisplay.Transform(movableBase.ToTransform()); } DisplayMesh.Append(robotDisplay); foreach (var external in group.Externals) { DisplayMesh.Append(external.DisplayMesh); } } DisplayMesh.Transform(BasePlane.ToTransform()); }
// public URRealTime URRealTime { get; set; } internal RobotSystemUR(string name, RobotUR robot, IO io, Plane basePlane, Mesh?environment) : base(name, Manufacturers.UR, io, basePlane, environment, GetDefaultPose(robot)) { Remote = new RemoteUR(); Robot = robot; DisplayMesh.Append(robot.DisplayMesh); DisplayMesh.Transform(BasePlane.ToTransform()); }
Mesh CreateDisplayMesh() { var mesh = new Mesh(); mesh.Append(BaseMesh); foreach (var joint in Joints) mesh.Append(joint.Mesh); mesh.Transform(BasePlane.ToTransform()); return mesh; }
Mesh CreateDisplayMesh() { var mesh = new Mesh(); if (BaseMesh is null) { return(mesh); } mesh.Append(BaseMesh); foreach (var joint in Joints) { mesh.Append(joint.Mesh); } mesh.Transform(BasePlane.ToTransform()); return(mesh); }