当前位置: 首页>>代码示例>>C++>>正文


C++ Stage::AddLineSeg方法代码示例

本文整理汇总了C++中Stage::AddLineSeg方法的典型用法代码示例。如果您正苦于以下问题:C++ Stage::AddLineSeg方法的具体用法?C++ Stage::AddLineSeg怎么用?C++ Stage::AddLineSeg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stage的用法示例。


在下文中一共展示了Stage::AddLineSeg方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CreatePath1A_XOffset

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;

}
开发者ID:duchiy,项目名称:CNCMillwithGCodeInterpreter,代码行数:45,代码来源:Motion.cpp

示例2: CreatePath1

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;

}
开发者ID:duchiy,项目名称:CNCMillwithGCodeInterpreter,代码行数:36,代码来源:Motion.cpp

示例3: CreatePath1_2

int CreatePath1_2()
{
	int res;

//
//Clear the segment list and initialize the starting point for the path
//
	g_stage.ClearSegList(3.0, 0.0, 0.0);    //Clear the segment list and set the
									//  starting point for the path
									//  at X = 5, Y = 0, Z = 0
//
//Add line and arc segments to the path module's segment list for first move
//
	res = g_stage.AddLineSeg(0.0, 0.0, 0.0);    //Add a segment to move to x=0, y=2, z=0
	if (res<0) return -1;

}
开发者ID:duchiy,项目名称:CNCMillwithGCodeInterpreter,代码行数:17,代码来源:Motion.cpp


注:本文中的Stage::AddLineSeg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。