booleanBodies failure --

alan_1
alan_1 Member Posts: 14 ✭

My use of booleanBodies() is failing.  I think I am providing valid parameters.
Here's the code snippet.

            var asdf1 = evaluateQuery(context, qCreatedBy(A, EntityType.BODY));
            var asdf2 = evaluateQuery(context, qCreatedBy(B, EntityType.BODY));
            booleanBodies( context, id + ("boolean" ~ index), {
                    "tools" : qCreatedBy(A, EntityType.BODY),
                    "targets" : qCreatedBy(B, EntityType.BODY),
                    "operationType" : BooleanOperationType.SUBTRACTION
            });


An error is thrown at line 73 of feature.fs (version 376.0).
                if (!isTopLevelId(id))
                    throw error; // rethrow

The two bodies are real bodies and they do intersect at a non-zero volume.  Neither is entirely within the other.
The reason for the two "asdf" variables is to prove that the qCreatedBy() queries are valid.
Any idea what I might be doing wrong?

Comments

  • ilya_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,279 image
    A bit more context is needed to diagnose this -- even if the two bodies intersect in non-zero volume, their difference may still result in non-manifold (zero-thickness) geometry, which would cause the boolean to fail.  A link to a public document reproducing the problem should make it possible to diagnose.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc