马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
int UF_POINT_create_at_intersection_of_two_curves
(
const tag_t curve1,
const tag_t curve2,
const tag_t help_point1,
const tag_t help_point2,
tag_p_t point_feature_id
)
请问这个函数怎么用啊,特别是help_point1和help_point2是什么意思,为什么使用时老是报内存非法访问?
代码如下:
//选两直线
char sCue[] = "按类选择对话框";
char sTitle[] = "按类选择对话框";
int iSope = UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY;
int iResponse = 0;
int iCount = 0;
tag_t *atObject = NULL;
UF_UI_select_with_class_dialog(sCue, sTitle, iSope, init_proc, NULL, &iResponse, &iCount, &atObject);
tag_t tPointGet = NULL_TAG;
int iPointNum = 0;
double *adPointPara;
double adTempPoint[3] = {0};
tag_t tPointStart = NULL_TAG;
tag_t tPointEnd = NULL_TAG;
if (2 == iCount)
{
//构造第一条直线的一个端点
UF_MODL_ask_curve_points(atObject[0], 0, 0, 0, &iPointNum, &adPointPara);
adTempPoint[0] = adPointPara[0];
adTempPoint[1] = adPointPara[1];
adTempPoint[2] = adPointPara[2];
UF_CURVE_create_point(adTempPoint , &tPointStart);
//构造第二条直线的一个端点
UF_MODL_ask_curve_points(atObject[1], 0, 0, 0, &iPointNum, &adPointPara);
adTempPoint[0] = adPointPara[0];
adTempPoint[1] = adPointPara[1];
adTempPoint[2] = adPointPara[2];
UF_CURVE_create_point(adTempPoint , &tPointEnd);
//求两直线的交点
UF_CALL(UF_POINT_create_at_intersection_of_two_curves(atObject[0], atObject[1], tPointStart, tPointEnd, &tPointGet));
} |