• 2024-07-27NX二次开发(python)-创建管(一)
    用UF函数创建管,下图为NXOpenPython的参考指南:1.创建管可以用线也可以用边,以下是用线创建管的代码,先创建一个非关联线后再创建一个管importNXOpen.UFsign=NXOpen.UF.Modl.FeatureSigns.ValueOf(0)line_coords=NXOpen.UF.Curve.Line()line_coords.StartPoint=[0.0,0.0
  • 2024-06-23NXopen 二次开发 NXOpen::CurveCollection类 创建椭圆CreateEllipse
    NXOpen::NXMatrix*wcsNXMatrix; wcsNXMatrix=workPart->WCS()->CoordinateSystem()->Orientation(); NXOpen::Point3dcenter={0.0,0.0,0.0}; double majorRadius=2; double minorRadius=1; double startAngle=0; double endAngle=PI; d
  • 2024-03-17UG NX二次开发(C#)-CAM-采用内部函数获取drill操作的进给
    CAM二次开发第一章UGNX二次开发(C#)-CAM-采用内部函数获取drill操作的进给文章目录CAM二次开发1、前言2、在高版本中打开drill加工模板3、读取drill加工操作3.1用NXOpen的FindObject实现3.2、通过Collection集合获取3.3通过选择工序导航器实现(Ufun和NXOpen
  • 2023-06-13UG二次开发NXOpen-Python(十三)内螺纹滚道干涉磨砂轮截形计算
    滚珠螺母内螺纹滚道在加工时,砂轮接杆偏摆角度为滚道螺旋升角,砂轮截形为滚道法向截形。当螺母导程较大时,比如说1616、2020等规格,螺旋升角较大,若按螺旋升角的大小调整砂轮接杆角度,则砂轮接杆会和螺母内孔产生干涉,此时就需要采用其它加工方法,比如说“以车代磨”、“软轴磨”、“
  • 2023-03-24NX二次开发:保存时导出PDF并打开
    该工程为在保存时执行开发的功能,函数入口点ufput。其他还有新建、打开、另存等都可以加入开发的操作,具体看UF_EXIT下的介绍。用户出口是一个可选特性,允许你在NX中某些预定
  • 2023-03-24Teamcenter_NX集成开发:通过NXOpen查询零组件是否存在
    之前用过NXOpenPDM的命名空间下的类,现在记录一下通过PDM命名空间下的类查询Teamcenter零组件的信息,也可以用来判断该零组件是否存在。1-该工程为DLL工程,直接在NX界面调用
  • 2023-03-10NXOPEN新建部件
    NXOpen::FileNew*fileNew1; fileNew1=theSession->Parts()->FileNew(); fileNew1->SetUseBlankTemplate(true); fileNew1->SetUnits(NXOpen::Part::UnitsMillimet
  • 2023-02-18创建TXT文字
    voidDZWEIZHI::CreaTxt(stringstr,doublenote_origin[3])////创建TXT文字{ try { //----Enteryourcallbackcodehere----- NXOpen::Session*theSession=NXO
  • 2023-02-18创建拉伸UFUN+nxopen
    voidDZWEIZHI::CreaExtrudeBuilder()//创建拉伸UFUN+nxopen{ try { //----Enteryourcallbackcodehere----- NXOpen::Session*theSession=NXOpen::Session::G
  • 2023-02-18去参
    voidDZWEIZHI::RemoveParam()//去参{ try { //----Enteryourcallbackcodehere----- NXOpen::Session*theSession=NXOpen::Session::GetSession(); NXOpen::
  • 2023-02-18创建拉伸nxopen方式
    voidDZWEIZHI::CreaExtrude(stringstr,doublenote_origin[3],tag_tObj)//创建拉伸nxopen方式{ try { //----Enteryourcallbackcodehere-----  NXOpen::Se
  • 2023-02-18删除对象
    voidDZWEIZHI::Dele()//删除对象{ try { //----Enteryourcallbackcodehere----- NXOpen::Session*theSession=NXOpen::Session::GetSession(); NXOpen::Par
  • 2023-02-18OpenMain()//主入口
    voidDZWEIZHI::OpenMain()//主入口{ try { //----Enteryourcallbackcodehere----- NXOpen::Session*theSession=NXOpen::Session::GetSession(); NXOpen::P
  • 2023-02-18测量距离(中心线到中心线)
    doubleDis_lineLine(tag_tObj1,tag_tObj2)//测量距离{ NXOpen::Session*theSession=NXOpen::Session::GetSession(); NXOpen::Part*workPart(theSession->Parts()-
  • 2023-02-18测量角度
    doubleAngle_faceFaec(tag_tObj1,tag_tObj2)//测量角度{ NXOpen::Session*theSession=NXOpen::Session::GetSession(); NXOpen::Part*workPart(theSession->Parts
  • 2023-02-18测量距离(面到面)
    doubleDis_faceFaec(tag_tObj1,tag_tObj2)//测量距离{ NXOpen::Session*theSession=NXOpen::Session::GetSession(); NXOpen::Part*workPart(theSession->Parts()-
  • 2023-01-29NXOpen遍历工作部件表达式
    //用户代码#include<uf_defs.h>#include<NXOpen/NXException.hxx>#include<NXOpen/Session.hxx>#include<NXOpen/BasePart.hxx>#include<NXOpen/Expression.hxx>#incl
  • 2022-11-25UG二次开发NXOpen-Python(十二) 通过命令行运行程序
    因为各种原因,有时候,我们不希望在UG程序界面通过人机交互来执行二次开发程序,我们希望可以在后台运行程序,例如我们自己做了一个UI界面,想通过点按钮生成一些部件文件。比如说
  • 2022-10-26遍历operation
    std::ostringstreamout;doublef8Value;NXOpen::CAM::CAMSetup*camSetup=displayPart->CAMSetup();NXOpen::CAM::OperationCollection*operCol
  • 2022-09-22nxopen ug8.5 vb.net 定位块底面打孔工具
    OptionStrictOffImportsSystemImportsNXOpenImportsNXOpen.BlockStylerImportsNXOpen.UFImportsSystem.Collections.Generic'----------------------------
  • 2022-09-20nxopen vb.net 底打孔工具
    OptionStrictOffImportsSystemImportsNXOpenImportsNXOpen.BlockStylerImportsNXOpen.UFImportsSystem.Collections.Generic'----------------------------