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.

Options

Trim previous sketch entities with FS?

Evan_ReeseEvan_Reese Member Posts: 2,072 PRO
I'm working on a feature that—among many other steps—copies and trims some existing sketch curves. I want the output to look and behave just like a normal sketch entity. I'd asked previously about whether we can do something like "use" to convert an existing entity into my sketch that the feature is making (was told no). I'm still trying to solve the same thing here but with a different approach. Now the method looks like:
  1. opPattern() to copy the input sketch curve in place
  2. opSplitPart() to cut it into 2 wire bodies since opSplitEdges() does split the edge, but keeps it as 1 wire body somehow.
  3. opDeleteBodies() what I don't want to keep
My main issue, is that this resulting sketch curve looks right (minus end points), but doesn't work like a normal sketch entity with downstream features, like Extrude, which use evOwnerSketchPlane() to get a direction. The copied edge doesn't have one I guess. Is there a way I can manually assign it one, so that downstream features will work as expected?
Evan Reese / Principal and Industrial Designer with Ovyl
Website: ovyl.io

Answers

  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,514
    I think you're out of luck, but maybe @kevin_o_toole_1 or @ilya_baran know a trick or two?
    Senior Director, Technical Services, EMEAI
  • Options
    steve_shubinsteve_shubin Member Posts: 1,070 ✭✭✭✭
    edited March 2023
    @Evan_Reese

    Now I know nothing of featurescript shorthand such as opPattern()

    But maybe this approach might help

    So with regards to getting a curve to where it can enter the feature world, where the feature is dependent on direction, I wonder if this would work

    My idea is to combine the code of the following features - into your feature. I'm assuming you can look at and copy the code behind various custom featurescripts.

    For starters, you mentioned manually assigning a direction

    So to do this, if you could incorporate the code of MultiMateConnector to act as an IMPLICIT MATE inside your feature

    Next, you would need to make a CUSTOM EXTRUDE FEATURE, made up of the code of the following 3 features. Extrude Vertex, Curve Pattern, Loft - and these combined, would give the result of an extrude surface. See Part Studio — BETTER WAY

    So once you have a surface object, you could use all kinds of other features on it.

    Note - I’m pretty sure the curve that am starting with, is not planar

    I hope this made at least a tiny bit of sense LOL

    See the doc below

    https://cad.onshape.com/documents/3c6e446153b8ca5cf734a854/w/e4ffc0fe2ef0d0c8152a62a1/e/5778df09fee6a8a39c0ddfd1



  • Options
    Evan_ReeseEvan_Reese Member Posts: 2,072 PRO
    NeilCooke said:
    I think you're out of luck, but maybe @kevin_o_toole_1 or @ilya_baran know a trick or two?
    I'm wondering about maybe feature patterning the input sketch and working with that, since I assume it would still have a plane, but that option is about an order of magnitude more complex than I think it needs to be.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • Options
    Evan_ReeseEvan_Reese Member Posts: 2,072 PRO
    @steve_shubin
    Thanks for this. It's not that I can't personally get the curve to extrude—I can just pick a "real" sketch edge first, then my funny one, since extrude direction is determined by the first entity picked (as one example). My issue is that I want other people to be able to without having to think of it any differently than a normal sketch.

    As an aside, I did notice that even the new "extrude direction" option in extrude doesn't overcome this issue, but I feel like it could be updated to make that work. That's another topic though.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
Sign In or Register to comment.