国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

NX二次開發(fā)UF_UI_select_conehead 函數介紹

這篇具有很好參考價值的文章主要介紹了NX二次開發(fā)UF_UI_select_conehead 函數介紹。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

文章作者:里海
來源網站:https://blog.csdn.net/WangPaiFeiXingYuan


UF_UI_select_conehead

Defined in: uf_ui.h?
int UF_UI_select_conehead(char * message, int num, double origins [ ] , double directions [ ] , char * * labels, UF_DISP_conehead_attrb_s * attributes, double selection_point, int display_coneheads, int * selected_num, int * response )

overview 概述

Displays the given coneheads and allows the user to select one of
them. The coneheads are described using the standard conehead attributes.
Each conehead has a selection point. The location of the selection
point is set by the input parameter selection_point. The user is then
prompted for a screen location, and the conehead whose selection
point is closest, is returned to the caller.
The selection_point parameter may be any value in the range 0.0 to
1.0. A value of 0.0 sets the selection point to the base of each
conehead. 1.0 sets the selection point to the tips.
The display_coneheads flag determines if, all the coneheads, none of
the coneheads, or just the selected conehead, is left displayed when
the function ends. The selected coneheads selection point is marked
with a small circle.
The user can choose Back or Cancel without selecting a conehead.
UF_DISP_set_conehead_attrb describes how to set conehead attributes.

顯示給定的錐頭,并允許用戶選擇其中之一。使用標準的 conehead 屬性描述 conehead。每個錐頭都有一個選擇點。選擇點的位置由輸入參數 select _ point 設置。然后提示用戶輸入屏幕位置,并將選擇點最近的錐頭返回給調用者。Select _ point 參數可以是范圍在0.0到1.0之間的任何值。如果值為0.0,則將選擇點設置為每個錐頭的底部。0將選擇點設置為提示。Display _ conehead 標志確定在函數結束時是否顯示所有的 conehead,沒有任何 conehead,或者只顯示所選的 conehead。選定的錐頭選擇點用一個小圓圈標記。用戶可以選擇 Back 或 Cancel,而無需選擇 conehead。UF _ DISP _ set _ conehead _ attrb 描述了如何設置 conehead 屬性。

UFUN例子

歡迎訂閱《里海NX二次開發(fā)3000例專欄》https://blog.csdn.net/wangpaifeixingyuan/category_8840986.html,點擊鏈接掃碼即可訂閱(持續(xù)更新中)。已經有幾百人訂閱,訂閱是永久的,無限期閱讀,如需幫助請私信。

parameters 參數

char * message Input The cue line message. (80 character maximum)
提示線消息。(最多80個字符)
int num Input The number of coneheads to display.
要顯示的錐頭數量。
double origins [ ] Input An array of conehead origin points. Contains num3 entries.
錐頭原點的數組。包含 num3條目。
double directions [ ] Input An array of conehead directions. Contains num3 entries.
錐頭方向的數組。包含 num3條目。
char * * labels Input An array of pointers to character string labels to be placed on the coneheads. If no labels are desired this may be passed as NULL. Individual entries may also be set to NULL. Contains num entries.
指向要放置在錐頭上的字符串標簽的指針數組。如果不需要任何標簽,這可以作為 NULL 傳遞。單個條目也可以設置為 NULL。包含數字項。
UF_DISP_conehead_attrb_s * attributes Input An array of conehead attribute structures If this is set to NULL, the current conehead attributes are used for all the coneheads. For a description of this structure and how to set the current conehead attributes see UF_DISP_set_conehead_attrb. Contains num entries.
Conehead 屬性結構的數組如果設置為 NULL,則所有的 conehead 都使用當前的 conehead 屬性。有關此結構以及如何設置當前 conehead 屬性的說明,請參見 UF _ DISP _ set _ conehead _ attrb。包含數字項。
double selection_point Input Determines where the selection points are on the coneheads. This is given as a fraction of the total conehead length, 0.0 to 1.0.
確定選擇點在錐頭上的位置。這是作為總錐頭長度的一部分給出的,0.0到1.0。
int display_coneheads Input Which coneheads will remain displayed on ReturnUF_UI_DISP_NONE UF_UI_DISP_SELECTED UF_UI_DISP_ALL
哪些錐頭將繼續(xù)顯示在 Return nUF _ UI _ DISP _ NONE UF _ UI _ DISP _ SELECTED UF _ UI _ DISP _ ALL 上
int * selected_num Output The conehead that was selected. 1 to num. Only valid if response = UF_UI_OK.
選擇的 conehead。1到 num。只有當 response = UF _ UI _ OK 時才有效。
int * response Output Indication of the users response: UF_UI_OK UF_UI_BACK UF_UI_CANCEL
用戶響應的指示: UF _ UI _ OK UF _ UI _ Back UF _ UI _ CANCEL

>>> 返回目錄

NX二次開發(fā)UF_UI_select_conehead 函數介紹,NX二次開發(fā)-函數介紹,NX二次開發(fā),UG二次開發(fā),嵌入式硬件,C++

C++語言在UG二次開發(fā)中的應用及綜合分析

  1. C++ 是C語言的擴展,它既可以執(zhí)行C語言的過程化程序設計,也可以進行以抽象數據類型為特點的基于對象的設計,以及面向對象的程序設計。C++ 在處理問題規(guī)模上具有很大的適應性。
  2. C++不僅具有計算機高效運行的實用性特征,并且致力于提升大規(guī)模程序的編程質量以及程序設計語言的問題描述能力。

在UG二次開發(fā)中,C++語言具有以下特點

  1. C++語言支持多種程序設計風格
  2. C++的許多特性以庫的形式存在,保證了語言的簡潔和開發(fā)運行的效率
  3. 與C語言相比,C++引入了面向對象的概念,使得UG二次開發(fā)的人機交互界面更加簡潔
  4. 通過借助UG自帶的2000多種API函數,結合高級語言C++以及編程軟件Visual Studio,可以對UG進行二次開發(fā)
  5. 需要注意的是,市場上的Visual Studio和UG版本眾多,并非所有版本都能兼容

程序設計過程通常包括以下步驟:

  1. 問題分析:對要解決的問題進行深入的分析,理解問題的具體需求和限制。
  2. 需求定義:明確程序的目標和功能,包括用戶需求、系統(tǒng)需求等。
  3. 設計:根據需求進行設計,包括算法設計、數據結構設計、界面設計等。
  4. 編碼:根據設計的結果,使用一種編程語言將程序代碼實現出來。
  5. 測試:通過各種測試方法來確保程序的正確性,包括單元測試、集成測試、系統(tǒng)測試等。
  6. 維護:對程序進行修改和完善,以解決可能出現的問題或滿足新的需求。
  7. 文檔編寫:編寫程序文檔,描述程序的功能、操作方法、注意事項等。

以下是一個創(chuàng)建體素特征(塊、柱、錐、球)的二次開發(fā)例子

#include <stdio.h>
#include <stdarg.h>
#include <uf_modl_primitives.h>
#include <uf_ui_ugopen.h>
#include <uf.h>
#include <uf_defs.h>
//封裝打印函數,用于將信息打印到信息窗口
//QQ3123197280
int ECHO(const char* szFormat, ...)
{
	char szMsg[5000] = "";
	va_list arg_ptr;
	va_start(arg_ptr, szFormat);
	vsprintf_s(szMsg, szFormat, arg_ptr);
	va_end(arg_ptr);
	UF_UI_open_listing_window();
	
	UF_UI_write_listing_window(szMsg);
	return 0;
}
extern DllExport void ufusr(char* param, int* returnCode, int rlen)
{
	UF_initialize();
	//創(chuàng)建塊
	UF_FEATURE_SIGN sign = UF_NULLSIGN;
	//塊起點相對于ABS
	double block_orig[3] = { 0.0,0.0,0.0 };
	//方向相對于WCS
	char* block_len[3] = { "10", "30", "10" };
	tag_t blk_obj;//體特征
	UF_MODL_create_block1(sign, block_orig, block_len, &blk_obj);
	int iEdit = 0;  
	char* size[3];
	UF_MODL_ask_block_parms(blk_obj, iEdit, size);
	ECHO("%s,%s,%s\n", size[0], size[1], size[2]);//輸出: p6=10,p7=30,p8=10
	//創(chuàng)建圓柱
	UF_FEATURE_SIGN sign1 = UF_NULLSIGN;
	double origin[3] = { 10.0,0.0,10.0 };
	char  height[] = "20";
	char  diam[] = "10";
	double direction[3] = { 0,0,1 };//方向
	tag_t  cyl_obj_id;
	UF_MODL_create_cyl1(sign1, origin, height, diam, direction, &cyl_obj_id);
	int iEdit2 = 0;  
	char* cDiameter;
	char* cHeight;
	UF_MODL_ask_cylinder_parms(cyl_obj_id, iEdit2, &cDiameter, &cHeight);
	ECHO("%s,%s\n", cDiameter, cHeight);//輸出:p9=10,p10=20
	UF_free(cDiameter);
	UF_free(cHeight);
	//創(chuàng)建圓錐
	UF_FEATURE_SIGN sign2 = UF_NULLSIGN;
	double origin2[3] = { 0.0,0.0,10.0 };
	char  height2[] = "20";
	char* diam2[2] = { "10" ,"5" };
	double direction2[3] = { 0,0,1 };//方向
	tag_t  cone_obj_id;
	UF_MODL_create_cone1(sign2, origin2, height2, diam2, direction2, &cone_obj_id);
	int iEdit3 = 0;  
	char* cD1;
	char* cD2;
	char* cH;
	char* cAngle;
	UF_MODL_ask_cone_parms(cone_obj_id, iEdit3, &cD1, &cD2, &cH, &cAngle);
	ECHO("%s,%s,%s,%s\n", cD1, cD2, cH, cAngle);//輸出:p11=10,p12=5,p13=20,p14=7.1250163489018
	UF_free(cD1);
	UF_free(cD2);
	UF_free(cH);
	UF_free(cAngle);
	//創(chuàng)建球
	UF_FEATURE_SIGN sign3 = UF_NULLSIGN;
	double douCenter2[3] = { 0.0,0.0,30.0 };
	char  cDiam[] = "8";
	tag_t  sphere_obj_id;
	UF_MODL_create_sphere1(sign3, douCenter2, cDiam, &sphere_obj_id);
	int iEdit4 = 0;  
	char* cDiam_parm;
	UF_MODL_ask_sphere_parms(sphere_obj_id, iEdit4, &cDiam_parm);
	ECHO("%s\n", cDiam_parm);//輸出:p15=8
	UF_free(cDiam_parm);
	UF_terminate();
}
extern int ufusr_ask_unload(void)
{
	return (UF_UNLOAD_IMMEDIATELY);
}

效果:
NX二次開發(fā)UF_UI_select_conehead 函數介紹,NX二次開發(fā)-函數介紹,NX二次開發(fā),UG二次開發(fā),嵌入式硬件,C++文章來源地址http://www.zghlxwxcb.cn/news/detail-855312.html

到了這里,關于NX二次開發(fā)UF_UI_select_conehead 函數介紹的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • NX二次開發(fā)UF_UI_specify_screen_position 函數介紹

    NX二次開發(fā)UF_UI_specify_screen_position 函數介紹

    文章作者:里海 來源網站:https://blog.csdn.net/WangPaiFeiXingYuan Defined in: uf_ui.h? int UF_UI_specify_screen_position(char * message, UF_UI_motion_fn_t motion_cb, void * motion_cb_data, double screen_pos [ 3 ] , tag_t * view_tag, int * response ) This function allows you to indicate a screen position by pressing MB1 in the graphics window. Th

    2024年04月25日
    瀏覽(35)
  • NX二次開發(fā)UF_UI_set_usertool_menu_entry 函數介紹

    NX二次開發(fā)UF_UI_set_usertool_menu_entry 函數介紹

    文章作者:里海 來源網站:https://blog.csdn.net/WangPaiFeiXingYuan Defined in: uf_ui.h? int UF_UI_set_usertool_menu_entry(int option_number, char * label, char * filename ) Replaces the user tool definition file specified by a user tools menubar option. The option number range starts at one and its maximum is defined by the original length of the

    2024年04月23日
    瀏覽(19)
  • UG\NX二次開發(fā) 結構體UF_UI_mask_s、UF_UI_mask_t、UF_UI_mask_p_t解釋

    文章作者:里海 來源網站:里海NX二次開發(fā)3000例專欄 感謝\\\"小余努力變優(yōu)秀 \\\"訂閱本專欄,非常感謝。 在開發(fā)中我們會遇到一些函數例如 UF_UI_select_single UF_UI_select_by_class 會用到這些結構體 在 uf_ui_types.h 頭文件中有這樣的說明:

    2024年02月04日
    瀏覽(46)
  • UG/NX二次開發(fā) 選擇坐標系控件 UF_UI_specify_csys

    UG/NX二次開發(fā) 選擇坐標系控件 UF_UI_specify_csys

    文章作者:里海 來源網站: https://blog.csdn.net/WangPaiFeiXingYuan UG/NX二次開發(fā) 選擇坐標系控件 UF_UI_specify_csys 與 老函數uc1630相比,函數的第二個參數更豐富,如下圖所示。而且多一個坐標系的tag的輸出參數。 ? ? ??

    2024年02月12日
    瀏覽(48)
  • UG\NX二次開發(fā) 非模態(tài)消息對話框函數 UF_UI_display_nonmodal_msg

    UG\NX二次開發(fā) 非模態(tài)消息對話框函數 UF_UI_display_nonmodal_msg

    文章作者:里海 來源網站: https://blog.csdn.net/WangPaiFeiXingYuan ? ? ? ? uc1601函數提供了一個模態(tài)消息對話框,ufun函數中還有一個非模態(tài)消息對話框,運行一次彈出一個窗口,不點確定不消失,對話框顯示后不影響使用其他命令運行。 ????????UF_UI_display_nonmodal_msg的第二個參

    2024年02月15日
    瀏覽(18)
  • NX二次開發(fā) 轉置矩陣 UF_MTX3_transpose

    NX二次開發(fā) 轉置矩陣 UF_MTX3_transpose

    ? ? ? ? NX二次開發(fā) 轉置矩陣 UF_MTX3_transpose。 ? ? ?? ? me.hpp 內容: http://t.csdn.cn/QNPAi

    2024年02月12日
    瀏覽(26)
  • NX二次開發(fā)UF_MODL_add_thru_faces 函數介紹

    NX二次開發(fā)UF_MODL_add_thru_faces 函數介紹

    文章作者:里海 來源網站:https://blog.csdn.net/WangPaiFeiXingYuan Defined in: uf_modl.h? int UF_MODL_add_thru_faces(tag_t feature_eid, int number_of_faces, tag_t face_eids [ ] ) Adds thru faces to a hole or slot feature. A hole uses one thru face and a slot uses two. 增加通過面孔或插槽的功能。一個孔使用一個通過面孔和插槽

    2024年04月12日
    瀏覽(19)
  • NX二次開發(fā)UF_ASSEM_ask_used_arrangement 函數介紹

    NX二次開發(fā)UF_ASSEM_ask_used_arrangement 函數介紹

    文章作者:里海 來源網站:https://blog.csdn.net/WangPaiFeiXingYuan Defined in: uf_assem.h? int UF_ASSEM_ask_used_arrangement(tag_t component, tag_t * arrangement ) Get an explosion used in a view. Outputs the tag of the explosion which is displayed in the view, or a NULL_TAG if the view is displaying the real assembly. 在視野中制造爆炸。輸

    2024年04月16日
    瀏覽(39)
  • UG\NX二次開發(fā) 多個變換矩陣合并成符合變換矩陣 uf5942

    UG\NX二次開發(fā) 多個變換矩陣合并成符合變換矩陣 uf5942

    文章作者:里海 來源網站: https://blog.csdn.net/WangPaiFeiXingYuan ? ? ? ?UGNX二次開發(fā) 多個變換矩陣合并成復合變換矩陣 uf5942

    2024年02月12日
    瀏覽(26)
  • NX二次開發(fā)UF_VEC3_is_perpendicular 函數介紹

    NX二次開發(fā)UF_VEC3_is_perpendicular 函數介紹

    Defined in: uf_vec.h? void UF_VEC3_is_perpendicular(const double vec1 [ 3 ] , const double vec2 [ 3 ] , double tolerance, int * is_perp ) Determine if vectors are perpendicular an input tolerance. If the cosine of the angle between vec1 and vec2 is less than the tolerance, then a TRUE is returned. Otherwise FALSE is returned. To check perpendicularity with

    2024年01月15日
    瀏覽(48)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包