Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtraction boolean operation

Status
Not open for further replies.

viger

Mechanical
Joined
Apr 25, 2008
Messages
1
Location
PL
I've already try to use journal but, is there a possibility to replace "name of object" in juornal to a feature id?
Body *body1(dynamic_cast<Body *>(wp2->Bodies()->FindObject(name2)));

Body *body1(dynamic_cast<Body *>(feature2));

NXOpen::DisplayableObject *featd (dynamic_cast <NXOpen::DisplayableObject *> (feature2));
//Body *body1(dynamic_cast<Body *>(featd));
std::vector<NXObject *>featd(1);

bool added1;

added1 = booleanBuilder1->Targets()->Add(body1);


NXOpen::DisplayableObject *impd (dynamic_cast <NXOpen::DisplayableObject *> (imp));
bool added2;
//Body *body2(dynamic_cast<Body *>(wp2->Bodies()->FindObject(name1)));
Body *body2(dynamic_cast<Body *>(impd));

added2 = booleanBuilder1->Tools()->Add(impd);

Session::UndoMarkId markId2;
markId2 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Subtract");

NXObject *nXObject1;
nXObject1 = booleanBuilder1->Commit();

Session2->DeleteUndoMark(markId1, NULL);

Session2->SetUndoMarkName(markId1, "Subtract");

booleanBuilder1->Destroy();

or maybe someone have idea or exemple of code for subtract boolean operation of two objects (solids) one is imported from part file in that case,

target id was taken from hire:
Features::Feature *feature2;
feature2 = BlockFeatureBuilder->CommitFeature();


imported tool was taken from hire:

imp = partImporter1->Commit();

erros:
No object found with this name
or
Invalid target body




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top