Перейти к публикации

Создать дуги по 3-м точкам (NX Open)


i.m.p

Рекомендованные сообщения

Помогите с описанием переменных в команде extern UFUNEXPORT int UF_CURVE_create_arc_3point

(

tag_t point1, /* <I> tag of start point */

tag_t point2, /* <I> tag of end point */

tag_t point3, /* <I> tag of middle point */

UF_CURVE_limit_p_t limit_p[2], /* <I> extension limits */

tag_t support_plane, /* <I> tag of support plane of the arc */

logical is_asso, /* <I> true - if associative, false - if not associative */

tag_p_t arc_feature_id /* <O> if is_asso == TRUE - object identifier of new associative arc feature

if is_asso == FALSE - object identifier of new associative arc */

);

Интересует UF_CURVE_limit_p_t limit_p[2].

Напишите примерчик задания переменных.

Ссылка на сообщение
Поделиться на других сайтах


Попробовал так

/* TODO: Add your application code here */

	double point_coords[3];

	tag_t point1, point2, point3;

	UF_CURVE_limit_p_t limit[2];

	double origin_point[ 3 ];

	double plane_normal[ 3 ];

	tag_t plane_tag;

	logical is_asso = TRUE;

	tag_t arc_feature_id;



	point_coords[0] = 0.0; point_coords[1] = 0.0; point_coords[2] = 0.0;

	UF_CALL(UF_CURVE_create_point (point_coords, &point1 ));

	point_coords[0] = 100.0; point_coords[1] = 0.0; point_coords[2] = 0.0;

	UF_CALL(UF_CURVE_create_point (point_coords, &point2 ));

	point_coords[0] = 50.0; point_coords[1] = 30.0; point_coords[2] = 0.0;

	UF_CALL(UF_CURVE_create_point (point_coords, &point3 ));



	origin_point[0] = 0.0; origin_point[1] = 0.0; origin_point[2] = 0.0;

	plane_normal[0] = 0.0; plane_normal[1] = 0.0; plane_normal[2] = 1.0;

	UF_CALL(UF_MODL_create_plane (origin_point, plane_normal, &plane_tag ));



	limit[0] = (UF_CURVE_limit_p_t)malloc(sizeof(UF_CURVE_limit_t));

	limit[0]->limit_type = UF_CURVE_limit_value;

	limit[0]->limiting_obj = NULL_TAG;

	limit[0]->value = 0.0;

	limit[0]->help_data.help_data_type = UF_CURVE_help_data_none;

	limit[0]->help_data.parameter = 0.0;

	//limit[0]->help_data.value[0] = 0.0; limit[0].help_data.value[1] = 0.0; limit[0].help_data.value[2] = 0.0;

	limit[1] = (UF_CURVE_limit_p_t)malloc(sizeof(UF_CURVE_limit_t));

	limit[1]->limit_type = UF_CURVE_limit_value;

	limit[1]->limiting_obj = NULL_TAG;

	limit[1]->value = 0.0;

	limit[1]->help_data.help_data_type = UF_CURVE_help_data_none;

	limit[1]->help_data.parameter = 1.0;

	//limit[1]->help_data.value[0] = 0.0; limit[0].help_data.value[1] = 0.0; limit[0].help_data.value[2] = 0.0;



	UF_CALL(UF_CURVE_create_arc_3point (point1, point2, point3, limit, plane_tag, is_asso, &arc_feature_id ));

	free(limit);
При выполнении NX построил точки и плоскость и.... получил ошибку

*** ERROR code 1105004 at line 110 in c:\visual studio projects\arc_3point\arc_3point\arc_3point.cpp:

+++ The first parameter passed in was invalid

UF_CURVE_create_arc_3point (point1, point2, point3, limit, plane_tag, is_asso, &arc_feature_id );

Сильно удивился!

Ссылка на сообщение
Поделиться на других сайтах

Присоединяйтесь к обсуждению

Вы можете опубликовать сообщение сейчас, а зарегистрироваться позже. Если у вас есть аккаунт, войдите в него для написания от своего имени.
Примечание: вашему сообщению потребуется утверждение модератора, прежде чем оно станет доступным.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

  • Сейчас на странице   0 пользователей

    Нет пользователей, просматривающих эту страницу.




×
×
  • Создать...