zoukankan      html  css  js  c++  java
  • NXOpen 两点建方体

    C++

    //用户头文件
    #include <NXOpen/Body.hxx>
    #include <NXOpen/Builder.hxx>
    #include <NXOpen/Expression.hxx>
    #include <NXOpen/ExpressionCollection.hxx>
    #include <NXOpen/Features_BlockFeatureBuilder.hxx>
    #include <NXOpen/Features_Feature.hxx>
    #include <NXOpen/Features_FeatureBuilder.hxx>
    #include <NXOpen/Features_FeatureCollection.hxx>
    #include <NXOpen/GeometricUtilities_BooleanOperation.hxx>
    #include <NXOpen/Part.hxx>
    #include <NXOpen/PartCollection.hxx>
    #include <NXOpen/Point.hxx>
    #include <NXOpen/PointCollection.hxx>
    #include <NXOpen/Unit.hxx>
    #include <NXOpen/UnitCollection.hxx>
    #include <NXOpen/Update.hxx>

    //用户代码
    Part *workPart = theSession->Parts()->Work();
    Part *displayPart = theSession->Parts()->Display();

    Features::Feature *nullFeatures_Feature(NULL);
    Features::BlockFeatureBuilder *blockFeatureBuilder1;
    blockFeatureBuilder1 = workPart->Features()->CreateBlockFeatureBuilder(nullFeatures_Feature);

    blockFeatureBuilder1->BooleanOption()->SetType(GeometricUtilities::BooleanOperation::BooleanTypeCreate);
    blockFeatureBuilder1->SetType(Features::BlockFeatureBuilder::TypesTwoPointsAndHeight); //设置两点建方体类型

    //获取UI选取的点
    Point3d point1 = point01->Point();
    Point3d point2 = point02->Point();

    //获取UI输入的高度转char*字符
    double Height = double0->Value();
    char H[256];
    sprintf(H,"%f",Height);

    blockFeatureBuilder1->SetTwoPointsAndHeight(point1, point2, H );

    Features::Feature *feature1;
    feature1 = blockFeatureBuilder1->CommitFeature();
    blockFeatureBuilder1->Destroy();

    怡宁塑胶模具设计
  • 相关阅读:
    迁移Veil:手工打造Windows下编译的免杀Payload
    设置快速的debian源的方法:
    最新织梦的一个延时注入
    关于web后门权限防删的一个新思路
    安全狗两个中危提权+NET提权
    python抓取中文网页乱码通用解决方法
    SSRF漏洞的挖掘经验
    Hive中自定义Map/Reduce示例 In Java
    Hive学习之Locking
    Cloudera Manager及CDH最新版本安装全程记录
  • 原文地址:https://www.cnblogs.com/hqsalanhuang/p/14181522.html
Copyright © 2011-2022 走看看