×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Subtraction boolean operation

Subtraction boolean operation

Subtraction boolean operation

(OP)
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




 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources