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.

opCreateCurvesOnFace() for parameters 0 and 1 fail?

EvanReese
EvanReese Member, Mentor Posts: 3,059 PRO

Even the native Isoparametric Curve feature can't do a parameter of 0 or 1 on a periodic surface (for example: to get the circular end of a cylinder). Does anyone know a decent workaround?

Evan Reese
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com

Best Answer

  • EvanReese
    EvanReese Member, Mentor Posts: 3,059 PRO
    Answer ✓

    Thanks fellas. Here's what I ended up coming up with. Since my case is somewhat narrow I don't have to worry about dealing with trimmed surfaces and I know that the only 2 edges a periodic surface will have are the ones I need.

    function getEdgesOfPeriodicSurface(context is Context, face is Query) returns array
    {
    var paramPoints = evFaceTangentPlanes(context, {
            "face" : face,
            "parameters" : [vector(0, 0), vector(1, 1)]
        });
    
    return [qContainsPoint(edges, paramPoints[0].origin), qContainsPoint(edges, paramPoints[1].origin)];
    }
    
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com

Answers

  • S1mon
    S1mon Member Posts: 4,510 PRO

    A guess: split the cylinder in halves, and create two curves?

    Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn

  • MichaelPascoe
    MichaelPascoe Member Posts: 2,944 PRO
    edited February 2025

    Could you use evFacePeriodicity and evApproximateBSplineSurface to get the underlying surface then get get the curve from that?


    RENDERCAD
    rendercad.ai - Photorealistic product rendering.

    ▚▞▚▞▚▞▚▞▚
    ________________________________________________________________________
  • EvanReese
    EvanReese Member, Mentor Posts: 3,059 PRO
    Answer ✓

    Thanks fellas. Here's what I ended up coming up with. Since my case is somewhat narrow I don't have to worry about dealing with trimmed surfaces and I know that the only 2 edges a periodic surface will have are the ones I need.

    function getEdgesOfPeriodicSurface(context is Context, face is Query) returns array
    {
    var paramPoints = evFaceTangentPlanes(context, {
            "face" : face,
            "parameters" : [vector(0, 0), vector(1, 1)]
        });
    
    return [qContainsPoint(edges, paramPoints[0].origin), qContainsPoint(edges, paramPoints[1].origin)];
    }
    
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com