zoukankan      html  css  js  c++  java
  • NXOpen测量柱面两条边的最近距离

    #include <NXOpen/MeasureDistanceBuilder.hxx>
    #include <NXOpen/MeasureManager.hxx>
    #include <NXOpen/SelectDisplayableObject.hxx>
    #include <NXOpen/SelectDisplayableObjectList.hxx>
    #include <NXOpen/Unit.hxx>
    #include <NXOpen/UnitCollection.hxx>
    #include <NXOpen/MeasureDistance.hxx>
    #include <NXOpen/MeasureDistanceBuilder.hxx>

       NXObject *nullNXObject(NULL);
       MeasureDistanceBuilder *measureDistanceBuilder1;
       measureDistanceBuilder1 = workPart->MeasureManager()->CreateMeasureDistanceBuilder(nullNXObject);
       measureDistanceBuilder1->SetMtype(MeasureDistanceBuilder::MeasureTypeMinimum);
       Edge *edge1(dynamic_cast<Edge *>(NXObjectManager::Get(edges[0]->Tag())));
       measureDistanceBuilder1->Object1()->SetValue(edge1);
       Edge *edge2(dynamic_cast<Edge *>(NXObjectManager::Get(edges[1]->Tag())));
       measureDistanceBuilder1->Object2()->SetValue(edge2);
       measureDistanceBuilder1->SetInfoWindow(true);
       Unit *unit1(dynamic_cast<Unit *>(workPart->UnitCollection()->FindObject("MilliMeter")));
       MeasureDistance *measureDistance1;
       measureDistance1 = workPart->MeasureManager()->NewDistance(unit1, MeasureManager::MeasureTypeMinimum, edge1, edge2);
       measureDistance1->Information();
       measureDistance1->MeasurementType();
       delete measureDistance1;
       measureDistanceBuilder1->Destroy(); 

    怡宁塑胶模具设计
  • 相关阅读:
    【笔记】Maven使用入门
    【笔记】c++文件
    【笔记】IntelliJ IDEA配置Hibernate
    【HTML5校企公益课】第四天
    【c++习题】【17/4/16】动态分配内存
    C#
    C#
    C#
    C#
    C#
  • 原文地址:https://www.cnblogs.com/hqsalanhuang/p/14460384.html
Copyright © 2011-2022 走看看