int CreatePath1A_XOffset(double dX, double dY, double dZ) { int res; // //Clear the segment list and initialize the starting point for the path // g_stage.ClearSegList(dX, dY, dZ); //Clear the segment list and set the // starting point for the path // at X = 0, Y = 1, Z = 0 // //Add line and arc segments to the path module's segment list for first move // res = g_stage.AddLineSeg(dX, dY+1.0, dZ+0.0); //Add a segment to move to x=0, y=2, z=0 if (res<0) return -1; res = g_stage.AddArcSeg( dX+1.0, dY+2.0, dZ+0.0, //end point of arc: x=1, y=3, z=0 dX+1.0, dY+1.0, dZ+0.0, //center point of arc: x=1, y=2, z = 0 0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1 if (res<0) return -1; res = g_stage.AddLineSeg(dX+2.0, dY+2.0, dZ+0.0); //line segment endpoint: x=4, y=3, z=0 if (res<0) return -1; // ServoInf::m_pNMCServo->ClearSegList(4.0, 3.0, 0.0); //Clear the segment list and set the // ExecutePath3Axis(); res = g_stage.AddArcSeg( dX+3.0, dY+1.0, dZ+0.0, //end point of arc: x=5, y=2, z=0 dX+2.0, dY+1.0, dZ+0.0, //center point of arc: x=4, y=2, z = 0 0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1 if (res<0) return -1; res = g_stage.AddLineSeg(dX+3.0, dY+0.0, dZ+0.0); //line segment endpoint: x=5, y=0, z=0 if (res<0) return -1; res = g_stage.AddStart(dX+3.0, dY+0.0, dZ+0.0); //line segment endpoint: x=5, y=0, z=0 if (res<0) return -1; res = g_stage.AddLineSeg(dX+0.0, dY+0.0, dZ+0.0); //line segment endpoint: x=5, y=0, z=0 if (res<0) return -1; }
int CreatePath1() { int res; // //Clear the segment list and initialize the starting point for the path // g_stage.ClearSegList(0.0, 0.0, 0.0); //Clear the segment list and set the // starting point for the path // at X = 0, Y = 1, Z = 0 // //Add line and arc segments to the path module's segment list for first move // res = g_stage.AddLineSeg(0.0, 1.0, 0.0); //Add a segment to move to x=0, y=2, z=0 if (res<0) return -1; res = g_stage.AddArcSeg( 1.0, 2.0, 0.0, //end point of arc: x=1, y=3, z=0 1.0, 1.0, 0.0, //center point of arc: x=1, y=2, z = 0 0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1 if (res<0) return -1; res = g_stage.AddLineSeg(2.0, 2.0, 0.0); //line segment endpoint: x=4, y=3, z=0 if (res<0) return -1; res = g_stage.AddArcSeg( 3.0, 1.0, 0.0, //end point of arc: x=5, y=2, z=0 2.0, 1.0, 0.0, //center point of arc: x=4, y=2, z = 0 0.0, 0.0, -1.0 ); //normal vector to arc plane: x = 0, y = 0, z = -1 if (res<0) return -1; res = g_stage.AddLineSeg(3.0, 0.0, 0.0); //line segment endpoint: x=5, y=0, z=0 if (res<0) return -1; }