quilt-cut

// // // QuiltCutTest.cpp : Defines the initialization routines for the DLL. // #include "stdafx.h" #include "QuiltCutTest.h" #include "TKCheckInterference.h" #include "TKQuiltCut.h" #include #include #include #include #include #include #ifdef _DEBUG #define new DEBUG_NEW #endif // //TODO: If this DLL is dynamically linked against the MFC DLLs, // any functions exported from this DLL which call into // MFC must have the AFX_MANAGE_STATE macro added at the // very beginning of the function. // // For example: // // extern "C" BOOL PASCAL EXPORT ExportedFunction() // { // AFX_MANAGE_STATE(AfxGetStaticModuleState()); // // normal function body here // } // // It is very important that this macro appear in each // function, prior to any calls into MFC. This means that // it must appear as the first statement within the // function, even before any object variable declarations // as their constructors may generate calls into the MFC // DLL. // // Please see MFC Technical Notes 33 and 58 for additional // details. // // CQuiltCutTestApp BEGIN_MESSAGE_MAP(CQuiltCutTestApp, CWinApp) END_MESSAGE_MAP() // CQuiltCutTestApp construction CQuiltCutTestApp::CQuiltCutTestApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } // The one and only CQuiltCutTestApp object CQuiltCutTestApp theApp; // CQuiltCutTestApp initialization BOOL CQuiltCutTestApp::InitInstance() { CWinApp::InitInstance(); return TRUE; } static uiCmdAccessState TestFunAccessFn(uiCmdAccessMode access_mode) { return (ACCESS_AVAILABLE); } ProError QuiltCutTestMenuFn() { ProError status; ProSelection *quiltSels; int selCount; status = ProSelect("dtmqlt", 1, NULL, NULL, NULL, NULL, &quiltSels, &selCount); if (status != PRO_TK_NO_ERROR || selCount <= 0) { return PRO_TK_NO_ERROR; } ProMdl currMdl; status = ProMdlCurrentGet(&currMdl); if (status != PRO_TK_NO_ERROR) { return status; } InterferenceFindStruct cutpartData(currMdl); ProSelectionCopy(quiltSels[0], &cutpartData.check_sel); ProAsmcomppath tempComppath; status = ProSelectionAsmcomppathGet(quiltSels[0], &tempComppath); status = ProAsmcomppathMdlGet(&tempComppath, &cutpartData.comp_model); cutpartData.mdl_sel_arr = NULL; status = ProArrayAlloc(0, sizeof(ProSelection), 1, (ProArray*)&cutpartData.mdl_sel_arr); status = ProSolidFeatVisit((ProSolid)currMdl, CheckQuiltInterference, NULL, (ProAppData)&cutpartData); if (status != PRO_TK_NO_ERROR) { return status; } status = ProWindowRepaint(-1); int cuppartCount(0); status = ProArraySizeGet((ProArray)cutpartData.mdl_sel_arr,&cuppartCount); for (int i = 0; i < cuppartCount; i++) { AfxMessageBox("good job!"); ProFeature cutFeat; status = TKSolidifyCreate(cutpartData.mdl_sel_arr[i], quiltSels[0], PRO_FEAT_CUT, &cutFeat); } return PRO_TK_NO_ERROR; } // Toolkit extern "C" int user_initialize( int argc, char *argv[], char *version, char *build, wchar_t errbuf[80]) { ProError status; ProFileName MsgFile; ProStringToWstring(MsgFile, "QuiltCutTest.txt"); uiCmdCmdId TestFunMenuId; status = ProCmdActionAdd("QuiltCutTest", (uiCmdCmdActFn)QuiltCutTestMenuFn, uiProeImmediate, TestFunAccessFn, PRO_B_TRUE, PRO_B_TRUE,&TestFunMenuId); status = ProMenubarmenuPushbuttonAdd ("Help", "QuiltCutTest", "QuiltCutTest", "QuiltCutTest_Help", NULL, PRO_B_TRUE, TestFunMenuId, MsgFile); return (PRO_TK_NO_ERROR); } extern "C" void user_terminate() { return; } // // // QuiltCutTest.h : main header file for the QuiltCutTest DLL // #pragma once #ifndef __AFXWIN_H__ #error "include 'stdafx.h' before including this file for PCH" #endif #include "resource.h" // main symbols // CQuiltCutTestApp // See QuiltCutTest.cpp for the implementation of this class // class CQuiltCutTestApp : public CWinApp { public: CQuiltCutTestApp(); // Overrides public: virtual BOOL InitInstance(); DECLARE_MESSAGE_MAP() }; ================================================================== // // // TKCheckInterference.cpp // 干涉判斷 // #include "stdafx.h" #include "TKCheckInterference.h" #include "TKSelection.h" #include #include #include #include #include #include #include #include #include #include ProError CheckQuiltInterference(ProFeature *p_feature,ProError err,ProAppData app_data) { ProError status; ProFeatStatus feat_status; ProFeattype feat_type; ProMdl comp_model; InterferenceFindStruct *p_quilt_data = (InterferenceFindStruct*)app_data; // check only active features status = ProFeatureStatusGet(p_feature,&feat_status); if (status!=PRO_TK_NO_ERROR || feat_status != PRO_FEAT_ACTIVE) { return PRO_TK_NO_ERROR; } status = ProFeatureTypeGet(p_feature,&feat_type); if (feat_type == PRO_FEAT_COMPONENT) { status = ProAsmcompMdlGet(p_feature,&comp_model); if(status!=PRO_TK_NO_ERROR) { return PRO_TK_NO_ERROR; } // dont compare model itself if(comp_model==p_quilt_data->comp_model) { return PRO_TK_NO_ERROR; } // build selection of this component ProSelection comp_sel; status = ProSelectionAlloc(&p_quilt_data->asmcomppath, p_feature, &comp_sel); if(status==PRO_TK_NO_ERROR) { // check interference between 'p_quilt_data->check_sel' and 'akt_quilt_sel' Select3d sel_recs[2]; Prohandle *interf_vol_surfs; int n_surfs=0; ProselectionToSelect3d(p_quilt_data->check_sel,&(sel_recs[1])); sel_recs[1].part_ptr=(Prohandle)p_quilt_data->comp_model; ProselectionToSelect3d(comp_sel,&(sel_recs[0])); sel_recs[0].part_ptr=(Prohandle)comp_model; int status = pro_compute_interference(sel_recs,PROINTERF_ALL_VIS_GEOM,&interf_vol_surfs,&n_surfs); if (n_surfs > 0 && status == PRODEV_NO_ERROR) { p_quilt_data->asmcomppath.comp_id_table[p_quilt_data->asmcomppath.table_num] = p_feature->id; p_quilt_data->asmcomppath.table_num++; ProModelitem mi; ProMdlToModelitem(comp_model, &mi); status = ProSelectionAlloc(&p_quilt_data->asmcomppath, &mi, &comp_sel); p_quilt_data->asmcomppath.table_num--; p_quilt_data->asmcomppath.comp_id_table[p_quilt_data->asmcomppath.table_num] = -1; status = ProArrayObjectAdd((ProArray*)&(p_quilt_data->mdl_sel_arr), -1, 1, (void*)&comp_sel); pro_display_interf_volume(interf_vol_surfs,n_surfs,HIGHLITE_COLOR); pro_interference_volume_release(interf_vol_surfs,n_surfs); } } // handle acp for components p_quilt_data->asmcomppath.comp_id_table[p_quilt_data->asmcomppath.table_num] = p_feature->id; p_quilt_data->asmcomppath.table_num++; // search recursively status = ProSolidFeatVisit((ProSolid)comp_model,CheckQuiltInterference,NULL,(ProAppData)p_quilt_data); // handle acp for components p_quilt_data->asmcomppath.table_num--; p_quilt_data->asmcomppath.comp_id_table[p_quilt_data->asmcomppath.table_num] = -1; } return PRO_TK_NO_ERROR; } // // // TKCheckInterference.h // 干涉判斷 // #include #include typedef struct InterferenceFindStruct { ProAsmcomppath asmcomppath; ProSelection check_sel; ProMdl comp_model; ProSelection *mdl_sel_arr; InterferenceFindStruct(ProMdl asmMdl) { ProIdTable comp_id_tab; comp_id_tab[0] = -1; ProAsmcomppathInit((ProSolid)asmMdl, comp_id_tab, 0, &asmcomppath); } } InterferenceFindStruct; ProError CheckQuiltInterference(ProFeature *p_feature,ProError status,ProAppData app_data); ================================================================== // // // TKQuiltCut.cpp // 曲面Solidfy // #include "stdafx.h" #include "TKQuiltCut.h" #include #include #include #include #include #include #include // // 使用Quilt實體化,通過參數feat_type確定是CUTOUT還是拉伸特徵 // 輸入參數: // model_sel:目標檔案 // p_quilt_sel:Quilt // feat_type:PRO_FEAT_CUT/PRO_FEAT_PROTRUSION // 輸出參數: // feature:新增特徵 // ProError TKSolidifyCreate(ProSelection model_sel, ProSelection p_qiult_sel, int feat_type, ProFeature *feature) { ProElement pro_e_feature_tree; ProElement pro_e_feature_type; ProElement pro_e_feature_form; ProElement pro_e_patch_quilt; ProElement pro_e_patch_type; ProElement pro_e_patch_material_side; ProElement pro_e_std_feature_name; ProError status; // ProName wide_string; ProValue value; ProValueData value_data; ProBoolean is_interactive = PRO_B_TRUE; //Populating root element PRO_E_FEATURE_TREE status = ProElementAlloc ( PRO_E_FEATURE_TREE, &pro_e_feature_tree ); //Populating element PRO_E_FEATURE_TYPE status = ProElementAlloc ( PRO_E_FEATURE_TYPE, &pro_e_feature_type ); value_data.type = PRO_VALUE_TYPE_INT; value_data.v.i = feat_type; //PRO_FEAT_CUT status = ProValueAlloc ( &value ); status = ProValueDataSet ( value, &value_data ); status = ProElementValueSet ( pro_e_feature_type, value ); status = ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_feature_type ); //Populating element PRO_E_FEATURE_FORM status = ProElementAlloc ( PRO_E_FEATURE_FORM, &pro_e_feature_form ); value_data.type = PRO_VALUE_TYPE_INT; value_data.v.i = PRO_USE_SURFS; status = ProValueAlloc ( &value ); status = ProValueDataSet ( value, &value_data ); status = ProElementValueSet ( pro_e_feature_form, value ); status = ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_feature_form ); //Populating element PRO_E_PATCH_QUILT status = ProElementAlloc ( PRO_E_PATCH_QUILT, &pro_e_patch_quilt ); value_data.type = PRO_VALUE_TYPE_SELECTION; value_data.v.r = p_qiult_sel; status = ProValueAlloc ( &value ); status = ProValueDataSet ( value, &value_data ); status = ProElementValueSet ( pro_e_patch_quilt, value ); status = ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_patch_quilt ); //Populating element PRO_E_PATCH_TYPE status = ProElementAlloc ( PRO_E_PATCH_TYPE, &pro_e_patch_type ); value_data.type = PRO_VALUE_TYPE_INT; value_data.v.i = feat_type; //PRO_FEAT_CUT status = ProValueAlloc ( &value ); status = ProValueDataSet ( value, &value_data ); status = ProElementValueSet ( pro_e_patch_type, value ); status = ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_patch_type ); //Populating element PRO_E_PATCH_MATERIAL_SIDE status = ProElementAlloc ( PRO_E_PATCH_MATERIAL_SIDE, &pro_e_patch_material_side ); status = ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_patch_material_side ); //Populating element PRO_E_STD_FEATURE_NAME status = ProElementAlloc ( PRO_E_STD_FEATURE_NAME, &pro_e_std_feature_name ); status = ProElemtreeElementAdd ( pro_e_feature_tree, NULL, pro_e_std_feature_name); // ³Ð«ØSOLIDIFY¯S©º ProErrorlist errors; ProFeatureCreateOptions opts[1]; opts[0] = PRO_FEAT_CR_INCOMPLETE_FEAT; status = ProFeatureCreate (model_sel, pro_e_feature_tree, opts, 1, feature, &errors); if (status != PRO_TK_NO_ERROR) { ProElementFree(&pro_e_feature_tree); return status; } status = ProElementFree (&pro_e_feature_tree ); return PRO_TK_NO_ERROR; } // // // TKQuiltCut.h // 曲面Solidfy // #include #include // // 使用Quilt實體化,通過參數feat_type確定是CUTOUT還是拉伸特徵 // 輸入參數: // model_sel:目標檔案 // p_quilt_sel:Quilt // feat_type:PRO_FEAT_CUT/PRO_FEAT_PROTRUSION // 輸出參數: // feature:新增特徵 // ProError TKSolidifyCreate(ProSelection model_sel, ProSelection p_qiult_sel, int feat_type, ProFeature *feature); ================================================================== // // // TKSelection.cpp // 選擇WF2和WF3轉換 // #include "stdafx.h" #include "TKSelection.h" #include #include // Pro/TOOLKIT includes #include #include #include #include #include #include #include #include #include #include #include // convert Proselection to old select3d int ProselectionToSelect3d(ProSelection in_selection, Select3d *out_select3d) { int i, n_refs; Object_element subject, *ref; ProError err; ProModelitem mdl_item; ProAsmcomppath asm_comppath; ProFeature feature; asm_comppath.table_num=-1; err = ProSelectionModelitemGet(in_selection, &mdl_item); err = ProSelectionAsmcomppathGet(in_selection, &asm_comppath); if(asm_comppath.table_num>0) { out_select3d->assembly_ptr = (Prohandle)(asm_comppath.owner); } else { out_select3d->assembly_ptr = (Prohandle)(mdl_item.owner); } out_select3d->memb_num = asm_comppath.table_num; if (asm_comppath.table_num == 0) out_select3d->memb_id_tab[0] = -1; { for(i=0;i memb_id_tab[i] = asm_comppath.comp_id_table[i]; out_select3d->memb_id_tab[asm_comppath.table_num] = -1; } out_select3d->part_ptr = (Prohandle)mdl_item.owner; if (mdl_item.type == PRO_SURFACE) { out_select3d->selected_id = mdl_item.id; out_select3d->sel_type = SEL_3D_SRF; subject.type = SEL_3D_SRF; subject.id = mdl_item.id; n_refs = pro_element_info(out_select3d->part_ptr,&subject, PRO_IDENTIFY, -1, &ref); out_select3d->selected_ptr = ref[0].ptr; out_select3d->sel_elem_id = -1; } else if (mdl_item.type == PRO_CURVE) { out_select3d->selected_id = mdl_item.id; out_select3d->sel_type = SEL_3D_CURVE; subject.type = SEL_3D_CURVE; subject.id = mdl_item.id; n_refs = pro_element_info(out_select3d->part_ptr,&subject, PRO_IDENTIFY, -1, &ref); out_select3d->selected_ptr = ref[0].ptr; } else if (mdl_item.type == PRO_AXIS) { out_select3d->selected_id = mdl_item.id; out_select3d->sel_type = SEL_3D_AXIS; subject.type = SEL_3D_AXIS; subject.id = mdl_item.id; n_refs = pro_element_info(out_select3d->part_ptr,&subject, PRO_IDENTIFY, -1, &ref); out_select3d->selected_ptr = ref[0].ptr; } else if (mdl_item.type == PRO_CSYS) { out_select3d->selected_id = mdl_item.id; out_select3d->sel_type = SEL_3D_CSYS; err = ProGeomitemToCsys(&mdl_item,(ProCsys*)&(out_select3d->selected_ptr)); } else if (mdl_item.type == PRO_POINT) { out_select3d->sel_type = SEL_3D_PNT; out_select3d->sel_elem_id = mdl_item.id; err = ProGeomitemFeatureGet(&mdl_item,&feature); out_select3d->selected_id = feature.id; subject.type = SEL_3D_PNT; subject.id = mdl_item.id; n_refs = pro_element_info(out_select3d->part_ptr,&subject, PRO_IDENTIFY, -1, &ref); out_select3d->selected_ptr = ref[0].ptr; } else if (mdl_item.type == PRO_PART) { out_select3d->sel_type = SEL_3D_PART; } return 1; } // convert old select3d to Proselection int Select3dToProselection(Select3d in_select_3d, ProSelection* p_out_selection) { ProError err; ProModelitem sel_modelitem; ProAsmcomppath sel_acp; // Modelitem Initialisieren // ------------------------ if (in_select_3d.sel_type == SEL_3D_SRF) err = ProModelitemInit((ProSolid)in_select_3d.part_ptr,in_select_3d.selected_id,PRO_SURFACE,&sel_modelitem); else if (in_select_3d.sel_type == SEL_3D_CURVE) err = ProModelitemInit((ProSolid)in_select_3d.part_ptr,in_select_3d.selected_id,PRO_CURVE,&sel_modelitem); else if (in_select_3d.sel_type == SEL_3D_AXIS) err = ProModelitemInit((ProSolid)in_select_3d.part_ptr,in_select_3d.selected_id,PRO_AXIS,&sel_modelitem); else if (in_select_3d.sel_type == SEL_3D_CSYS) err = ProModelitemInit((ProSolid)in_select_3d.part_ptr,in_select_3d.selected_id,PRO_CSYS,&sel_modelitem); else if (in_select_3d.sel_type == SEL_3D_PNT) err = ProModelitemInit((ProSolid)in_select_3d.part_ptr,in_select_3d.sel_elem_id,PRO_POINT,&sel_modelitem); if (err!=PRO_TK_NO_ERROR) { return FALSE; } // Asmcpmppath Initialisieren if (in_select_3d.memb_num >= 0) { err = ProAsmcomppathInit((ProSolid)in_select_3d.assembly_ptr,in_select_3d.memb_id_tab,in_select_3d.memb_num,&sel_acp); if (err!=PRO_TK_NO_ERROR) { return FALSE; } err = ProSelectionAlloc(&sel_acp,&sel_modelitem,p_out_selection); if (err!=PRO_TK_NO_ERROR) { return FALSE; } } else { err = ProSelectionAlloc(NULL,&sel_modelitem,p_out_selection); if (err!=PRO_TK_NO_ERROR) { return FALSE; } } return TRUE; } // // // TKSelection.cpp // 選擇WF2和WF3轉換 // #include #include // convert Proselection to old select3d int ProselectionToSelect3d(ProSelection in_selection, Select3d *out_select3d) ; // convert old select3d to Proselection int Select3dToProselection(Select3d in_select_3d, ProSelection* p_out_selection);
以下是对提供的参考资料的总结,按照要求结构化多个要点分条输出: 4G/5G无线网络优化与网规案例分析: NSA站点下终端掉4G问题:部分用户反馈NSA终端频繁掉4G,主要因终端主动发起SCGfail导致。分析显示,在信号较好的环境下,终端可能因节能、过热保护等原因主动释放连接。解决方案建议终端侧进行分析处理,尝试关闭节电开关等。 RSSI算法识别天馈遮挡:通过计算RSSI平均值及差值识别天馈遮挡,差值大于3dB则认定有遮挡。不同设备分组规则不同,如64T和32T。此方法可有效帮助现场人员识别因环境变化引起的网络问题。 5G 160M组网小区CA不生效:某5G站点开启100M+60M CA功能后,测试发现UE无法正常使用CA功能。问题原因在于CA频点集标识配置错误,修正后测试正常。 5G网络优化与策略: CCE映射方式优化:针对诺基亚站点覆盖农村区域,通过优化CCE资源映射方式(交织、非交织),提升RRC连接建立成功率和无线接通率。非交织方式相比交织方式有显著提升。 5G AAU两扇区组网:与三扇区组网相比,AAU两扇区组网在RSRP、SINR、下载速率和上传速率上表现不同,需根据具体场景选择适合的组网方式。 5G语音解决方案:包括沿用4G语音解决方案、EPS Fallback方案和VoNR方案。不同方案适用于不同的5G组网策略,如NSA和SA,并影响语音连续性和网络覆盖。 4G网络优化与资源利用: 4G室分设备利旧:面对4G网络投资压减与资源需求矛盾,提出利旧多维度调优策略,包括资源整合、统筹调配既有资源,以满足新增需求和提质增效。 宏站RRU设备1托N射灯:针对5G深度覆盖需求,研究使用宏站AAU结合1托N射灯方案,快速便捷地开通5G站点,提升深度覆盖能力。 基站与流程管理: 爱立信LTE基站邻区添加流程:未提供具体内容,但通常涉及邻区规划、参数配置、测试验证等步骤,以确保基站间顺畅切换和覆盖连续性。 网络规划与策略: 新高铁跨海大桥覆盖方案试点:虽未提供详细内容,但可推测涉及高铁跨海大桥区域的4G/5G网络覆盖规划,需考虑信号穿透、移动性管理、网络容量等因素。 总结: 提供的参考资料涵盖了4G/5G无线网络优化、网规案例分析、网络优化策略、资源利用、基站管理等多个方面。 通过具体案例分析,展示了无线网络优化中的常见问题及解决方案,如NSA终端掉4G、RSSI识别天馈遮挡、CA不生效等。 强调了5G网络优化与策略的重要性,包括CCE映射方式优化、5G语音解决方案、AAU扇区组网选择等。 提出了4G网络优化与资源利用的策略,如室分设备利旧、宏站RRU设备1托N射灯等。 基站与流程管理方面,提到了爱立信LTE基站邻区添加流程,但未给出具体细节。 新高铁跨海大桥覆盖方案试点展示了特殊场景下的网络规划需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值