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();

    怡宁塑胶模具设计
  • 相关阅读:
    BigDecimal 类型数据比较大小
    list排序,顺序,倒序
    springboot添加log4j日志配置log4j.xml生成日志文件
    mybatis使用@param("xxx")注解传参和不使用的区别
    jetty 插件启动指定端口号
    javaweb项目静态资源被拦截的解决方法
    day15 Python全局变量和局部变量
    阿里云操作视频
    Python基础视频
    马哥Python视频
  • 原文地址:https://www.cnblogs.com/hqsalanhuang/p/14181522.html
Copyright © 2011-2022 走看看