This is how to create a rectangular parallelepiped in NXOPEN, and the “//” is followed by an explanation
NXOpen::Features::BlockFeatureBuilder *FeatureBuilder1;//declared body name
NXOpen::Features::Feature *nullNXOpen_Features_Feature(NULL);//Initialize empty variables
FeatureBuilder1= workPart->Features()->CreateBlockFeatureBuilder(nullNXOpen_Features_Feature);//First create an empty
FeatureBuilder1->BooleanOption()->SetType(NXOpen::GeometricUtilities::BooleanOperation::BooleanTypeCreate);//Set the Boolean method to the creation body: BooleanTypeCreate
//Boolean operations are divided into the following types
//BooleanTypeCreate Create. //Create
//BooleanTypeUnite Unite.//Sum
//BooleanTypeSubtract Subtract.// Difference
//BooleanTypeIntersect Intersect. //Intersect
FeatureBuilder1->SetOriginAndLengths(top_plate_origin1, platewidth, platelength, topplatethick);//Set the origin, length, width, and height of the cuboid
//Where top_plate_origin1 is the origin variable, NXOpen::Point3d
//platelength: const char * string
//platewidth: const char * string
//topplatethick: const char * string
NXOpen::Features::Feature *Feature1 = FeatureBuilder1->CommitFeature();//Make features
FeatureBuilder1->Destroy();//Clear memory
//This is the method of creating a cuboid in NXOPEN, and the explanation behind “//”
//Need to use the class:
Features_BlockFeatureBuilder.hxx
More methods will be shared later, I hope it will be useful to everyone.
Please keep the source and address of this article for reprinting:NX OPEN C++ secondary development: create cuboid
Reprint Statement: If there are no special instructions, all articles on this site are original. Please indicate the source for reprinting.:Cnc Machine Wiki,Thanks!^^