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.

What are the hidden arguments for opBoolean.

Jacob_CorderJacob_Corder Member Posts: 137 PRO
edited December 2020 in FeatureScript
opBoolean only shows the few arguments in the documentation and in the FS source code, however, I know there are more than that hidden. eraseImprintedEdges for example.

I need to merge 2 surfaces at specific edges. however, they do have other edges that are extremely close and they get merged also. 
I have attempted to supply the matches, but there are adjacent edges that also merge and I do not want this as it stretches those surfaces to make it hit merge.  The document and feature are not sharable besides to onshape support.  
I have set "recomputeMatches" to false and true with no changes in the merge.

Basically, what possible way do i have to merge surfaces ONLY at specific edges.

Here is the opBoolean call that i have
opBoolean(context, id, {
                "allowSheets" : true,
                "tools" : qUnion(tools),
                "operationType" : BooleanOperationType.UNION,
                "makeSolid" : makeSolid,
                "eraseImprintedEdges" : true,
                "matches" : matches,
                "recomputeMatches" : false
            });

i have also tried this with the same results
opBoolean(context, id, {
                "allowSheets" : true,
                "tools" : tools[0],
                "targets": tools[1],
                "operationType" : BooleanOperationType.UNION,
                "makeSolid" : makeSolid,
                "eraseImprintedEdges" : true,
                "matches" : matches,
                "recomputeMatches" : false,
                "targetsAndToolsNeedGrouping":true
            });

changing recomputeMatches does not seem to do anything. 

Thanks everyone.

the first picture below are the 2 surfaces before the merge.
the 2nd picture is after the merge. you can see that the top edge merges along with the left side surface.  I cannot have the top edge merged in this case.
the distance at the vertex where it merges is only 0.0033 mm so I do understand why its doing this, but I really need to avoid it.


Tagged:

Best Answers

Answers

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    Answer ✓
    there is also "accuracy" field wich takes enum BooleanAccuracy
  • Jacob_CorderJacob_Corder Member Posts: 137 PRO
    Answer ✓
    Wow @konstantin_shiriazdanov
    That really did change the results. 

    any other hidden arguments that you know?
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    any other hidden arguments that you know?
    you should actually ask @MBartlett21, I saw this tip in his Boolean Plus feature

  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    edited December 2020
    @Jacob_Corder

    There is only one other argument: localizedInFaces.

    It takes a boolean value, and if true, the tools and targets then have to be the specific faces that the operation happens on. This allows a lot of interesting things, such as only boolean trimming on one intersecting point.

    There are some other interesting things with boolean:
    opBoolean can actually operate on meshes, without them being a solid part.
    You can also give the operationType BooleanOperationType.SUBTRACT_COMPLEMENT, which is like intersecting only between the tools and targets.
    If you use intersection between two surfaces with eraseImprintedEdges set to false, it creates a curve representing the intersection. Note: this only allows creating one curve (see opBoolean on Surface Bodies — Onshape).


    I have a custom feature here that is built around opBoolean: Boolean Plus (MBartlett) | Mesh Geometry (onshape.com)
    I originally made it so that I could boolean surfaces together, it using an algorithm to compute each and every match (see the 'use old match computation' checkbox in the advanced section), since Onshape didn't support that then. 


    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • Jacob_CorderJacob_Corder Member Posts: 137 PRO
    Thank you @konstantin_shiriazdanov  and @MBartlett21
    . I was able to get much more control of the boolean functionality using your suggestions.  I think i will finally have a solution to this problem after nearly a year of on and off attempts to getting it to work.  Thank you both!!
Sign In or Register to comment.