Thin Extrude in FS

viamarkable
viamarkable Member Posts: 10 EDU
Hi there. I am trying to extrude the lines/edges of a sketch (baseSketch) that i have previously created.

First, I tried to use this:

extrude(context, id + "extrude1", {
                "bodyType" : ExtendedToolBodyType.THIN,
                // "oppositeDirection" : true,
                "depth" : baseHeight,
                // "wallShape" : qCreatedBy(id + "baseSketch", EntityType.BODY),
                "wallShape" : qSketchRegion(id + "baseSketch"),
                "thickness1" : strut / 2,
                "thickness2" : strut / 2
        });

But it throws an error that reads: throw OFFSET_WIRE_SELECT_WALL_PATH

Then I read online that I need to break down the steps, and start with an opExtrude, so I tried this:

opExtrude(context, id + "extrude1", {
                // "entities" : sketchEntityQuery(id + "baseSketch", EntityType.EDGE, baseSketch),
                "entities" : qCreatedBy(id + "baseSketch", EntityType.EDGE),
                // "direction" : evOwnerSketchPlane(context, {"entity" : sketchEntityQuery(id + "baseSketch", EntityType.EDGE, "baseSketch")}).normal,
                // "direction" : qCreatedBy(newId() + "Top", EntityType.FACE),
                // "direction" : evOwnerSketchPlane(context, {"entity" : qCreatedBy(newId() + "Top", EntityType.FACE)}).normal,
                // "direction" : evPlane(context, {"face" : qCreatedBy(newId() + "Top")}),
                // "direction" : evOwnerSketchPlane(context, {"entity" : qCreatedBy(id + "baseSketch", EntityType.EDGE)}).normal,
                "direction" : evPlane(context, {
                        "face" : qCreatedBy(id + "baseSketch", EntityType.FACE)
                }),
                "endBound" : BoundingType.BLIND,
                "endDepth" : 1 * inch
        });

(Please ignored the commented out entities and directions, I was testing out(?) different combinations in hopes that it would work, but it didn't)
The error that this current code throw is: @evPlane: CANNOT_RESOLVE_ENTITIES

I think that I am supposed to query the plane for the "direction" param, but I doubt I'm doing that correctly and I'm not sure how to approach this. I'm pretty new to FS coding, so thanks for any help!

Comments

  • GregBrown
    GregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 412 image
    Welcome! It will make it lot easier for us to help you out if you share a link to a public document you are working on… 
  • viamarkable
    viamarkable Member Posts: 10 EDU
    Thanks for letting me know. Adding a link completely slipped my mind, but I'll make sure to do that in the future. As for now, I've figured it out with tinkering around- it was an issue with my sketch I believe