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.

opSplitFace - Invalid Input

emory_krallemory_krall Member Posts: 15 PRO
I hoping someone can explain to me why this script is failing:


Ultimately this is to be part of a more complicated script. I wrote this simple script to troubleshoot and apparently I don't understand what opSplitFace is expecting for "faceTargets" and "bodyTools". I've tried to specify the input faces a few different ways but haven't had any success yet.





Best Answer

Answers

  • emory_krallemory_krall Member Posts: 15 PRO
    This did work, although documentation for opExtractSurface was difficult to find. If anyone comes across this discussion in a search for help here is the code that worked:

     opExtractSurface(context, id + "extract", {"faces" : splittingFace});
     opSplitFace(context, id + "splitFace1", {
                    "faceTargets" : targetFace,
                    "bodyTools" : qCreatedBy(id + "extract", EntityType.BODY)
            });

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    edited September 2019
    Thanks for pointing out that `opExtractSurface` is hidden from documentation.  We will fix this up soon.
    Jake Rosenfeld - Modeling Team
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @emory_krall

    Instead of extracting you can actually use the "faceTools" field into opSplitFace rather than the "bodyTools" field.  I'll have to go update that documentation too...
    Jake Rosenfeld - Modeling Team
Sign In or Register to comment.