Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Boolean and end up with same part ID?

Nick_JenksNick_Jenks Member Posts: 5 PRO
Is it possible to write a feature script that would allow a Boolean unite operation between two bodies to result in the same file name as the original (first selected body) tool used in the query?

Any help would be appreciated. 



  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646

    This is how our boolean works now.  Is it not the behavior you are seeing? Do you have an example?

    When passing "tools" into opBoolean, the first tool should determine the identity of the result part (and therefore the name in the parts list).  Query evaluation order for UI selections will match the order of the selection, so if you pass a query from the definition into "tools" of opBoolean, you should see the correct behavior.

    Otherwise, if you are constructing the queries manually, note that qUnion respects the order of its inputs, so if you want body1 to control the identity of the result, you could use qUnion([body1, body2])
    Jake Rosenfeld - Modeling Team
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646

    Sanity check as proof that this is how the built-in boolean tool already works:

    Jake Rosenfeld - Modeling Team
  • Nick_JenksNick_Jenks Member Posts: 5 PRO
    Thanks for the quick reply Jake, I am using the assembly configurations for a robotic gripper finger.

    The gripping area of the finger is in its own parts studio, as well as the finger body, the module and the workpiece.

    On the gripping area I am wanting to use a flat pad profile that is extruded from a pocket in the finger and also use a radial cut profile that is extruded from a radial cut into the finger when those configurations are called. They both use the move face operation to extrude the pad that way I can just select, or configure the selected faces depending on the flat pad or the radial pad cuts.

    I insert the gripping area part into the assembly, when I go to change the configuration from the assembly to flat pad they show up but when I change the configuration to radial pad, it throws the gripping area part into an error state. It seems as though even though the cuts are using the same move face operation, that since the cut faces are different they are showing up as different ID's. My thought was that I could somehow reverse this by performing a final boolean operation with a non-essential 800x800x800 box but it would just use the first ID as well I guess which would be the flat pad or the radial pad...

    Base on what you just said, assuming the move face works the same way, I may need to focus more on the first operation of the move face and the cuts it is reading in as inputs. This is probably what is causing the issue...

    I hope this made sense. Any thoughts?

  • Nick_JenksNick_Jenks Member Posts: 5 PRO
    You can see below that the bodies created by the move face end up being two different bodies. When I go to the assembly and change the config, it can't find the other radial pad bodies. I would prefer not to have to insert both into the assembly and then control another suppress function with the configurations as I will have multiply cut/pad types like this.

  • Nick_JenksNick_Jenks Member Posts: 5 PRO
    I guess because the cuts are made with different profiles, my original question should be amended to: 

    can I make a change to the way the move face works so that when I extrude the face from the flat pocket or from the radial pocket, the resulting part has the same ID no matter the face selected to use as the input for the move face?

    If I'm not mistaken, I think this would solve the linking issue in the assembly because the resulting part would have the same ID for the flat extrude and the radial extrude. 

    I appreciate your time on this...
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646

    This may be better suited to the "Contact Support" button in the "?" menu of the part studio, that way someone can play around with the studio and see what's going on.

    My first thought is a bit of confusion about how the bodies are created.  How are you using move face to create new bodies?  Body identity is assigned at creation, so if these parts are created with a different feature, or using a different profile sketch, they will not be the same body when you switch configs.
    Jake Rosenfeld - Modeling Team
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,860 PRO
    This happens to me once in a while. Now that replace part is available, many times it will come back in position, and add itself to a group mate its in.
  • Nick_JenksNick_Jenks Member Posts: 5 PRO
    Thanks guys, I will reach out to support. I really appreciate you taking a look. 
Sign In or Register to comment.