iCAx开思工具箱
标题:
UF_POINT_create_at_intersection_of_two_curves
[打印本页]
作者:
zuoluock
时间:
2011-5-3 20:57
标题:
UF_POINT_create_at_intersection_of_two_curves
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));
}
作者:
zhangcanwei
时间:
2011-5-4 07:27
这两条线必须真正相交,而不是通过延长才相交。通过延长线相交需使用另外一个函数,好像在MODL名称空间内
作者:
zuoluock
时间:
2011-5-4 10:30
刚刚试了一下,确实如此,谢谢二楼了哈
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3