zoukankan      html  css  js  c++  java
  • 使用XYZ创建点

    #include <NXOpen/Session.hxx>
    #include <NXOpen/BasePart.hxx>
    #include <NXOpen/Builder.hxx>
    #include <NXOpen/Expression.hxx>
    #include <NXOpen/ExpressionCollection.hxx>
    #include <NXOpen/Features_BaseFeatureCollection.hxx>
    #include <NXOpen/Features_PointFeatureBuilder.hxx>
    #include <NXOpen/NXObject.hxx>
    #include <NXOpen/Part.hxx>
    #include <NXOpen/PartCollection.hxx>
    #include <NXOpen/Point.hxx>
    #include <NXOpen/PointCollection.hxx>
    #include <NXOpen/Preferences_PartModeling.hxx>
    #include <NXOpen/Preferences_PartPreferences.hxx>
    #include <NXOpen/Scalar.hxx>
    #include <NXOpen/ScalarCollection.hxx>
    #include <NXOpen/Session.hxx>
    #include <NXOpen/SmartObject.hxx>
    #include <NXOpen/Unit.hxx>
    #include <NXOpen/UnitCollection.hxx>
    #include <NXOpen/Update.hxx>

    void create_point_by_XYZ(double X,double Y,double Z)
    {
      Session *theSession = Session::GetSession();
        Part *workPart(theSession->Parts()->Work());
        Part *displayPart(theSession->Parts()->Display());
        Point3d coordinates1(X, Y, Z);
        Point *point3;
        point3 = workPart->Points()->CreatePoint(coordinates1);
       
        point3->SetVisibility(SmartObject::VisibilityOptionVisible);
       
        Features::Feature *nullFeatures_Feature(NULL);
       
        Features::PointFeatureBuilder *pointFeatureBuilder1;
        pointFeatureBuilder1 = workPart->BaseFeatures()->CreatePointFeatureBuilder(nullFeatures_Feature);
       
        pointFeatureBuilder1->SetPoint(point3);
       
        NXObject *nXObject1;
        nXObject1 = pointFeatureBuilder1->Commit();
       
        pointFeatureBuilder1->Destroy();
    }

  • 相关阅读:
    Golang-单元测试
    Golang-Json序列化和反序列化
    Golang-文件操作
    Golang-demo
    Golang-demo练习
    Golang-类型断言
    Golang-面向对象编程三大特性-多态
    Golang-接口(interface)
    Golang-面向对象编程三大特性-继承、多重继承
    块状元素和内联元素 【转】
  • 原文地址:https://www.cnblogs.com/whiteIcrow/p/3678261.html
Copyright © 2011-2022 走看看