NXOpen::Features::BlockFeatureBuilder *FeatureBuilder1;//声名体名称
NXOpen::Features::Feature *nullNXOpen_Features_Feature(NULL);//初始化空变量
FeatureBuilder1= workPart->Features()->CreateBlockFeatureBuilder(nullNXOpen_Features_Feature);//先创建一个空的
FeatureBuilder1->BooleanOption()->SetType(NXOpen::GeometricUtilities::BooleanOperation::BooleanTypeCreate);//设置布尔方式为创建体:BooleanTypeCreate
//布尔运算分为以下几种类型
//BooleanTypeCreate Create. //创建
//BooleanTypeUnite Unite.//求和
//BooleanTypeSubtract Subtract.// 求差
//BooleanTypeIntersect Intersect. //求交
FeatureBuilder1->SetOriginAndLengths(top_plate_origin1, platewidth, platelength, topplatethick);//设置长方体的原点、长、宽、高
//其中top_plate_origin1是原点变量,NXOpen::Point3d
//platelength:const char * 字符串
//platewidth:const char * 字符串
//topplatethick:const char * 字符串
NXOpen::Features::Feature *Feature1 = FeatureBuilder1->CommitFeature();//做出特征
FeatureBuilder1->Destroy();//清除内存
//这是NXOPEN中创建长方体的方法,“//”后面是解释
//需要用到类:
后期将分享更多的方法,希望对大家有用。
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!