opSplitPart not behaving like UI split part

graham_lock
graham_lock Member Posts: 277 PRO

Hi,

Referring to the image below:

Screenshot 2024-11-30 192334.png

I want to split the part with the surface to give inner and outer parts.

I'm using

opSplitPart(context, id + "splitPart1", {
"targets" : targetPart,
"tool" : qCreatedBy(id + "extrudeOuterEdges", EntityType.FACE),
"keepTools" : true
});

As you can see at the front left, the split is splitting the part full length below the surface giving me an upper and lower part, rather than the required central and outer parts.

If I manually split the part using the surface it works absolutely fine.

Any thoughts appreciated.

Thank you.

Best Answer

  • GregBrown
    GregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 412 image
    edited November 2024 Answer ✓

    The tool you are trying to split with is specified as EntityType.FACE, which is not what you want. You'll need to construct your query such that it returns a BODY…

Answers

  • GregBrown
    GregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 412 image
    edited November 2024 Answer ✓

    The tool you are trying to split with is specified as EntityType.FACE, which is not what you want. You'll need to construct your query such that it returns a BODY…

  • graham_lock
    graham_lock Member Posts: 277 PRO

    Thank you!