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.

Using FS can we create a sketch on a face of a part or only on Planes?

owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
Hi Folks.

I'm playing with my first FS.

Using FS can we create a sketch on a face of a part or only on Planes?

More broadly I have an input of a single vertex (from a sketch on the surface of a solid part).  I wish to create a sketch here then add some geometry to work with.

What's the easiest way to accomplish this please?  (The Slot Tutorial has us creating new planes but from a coordinate system and a line.  I just have a point to start with.)

Many thanks for your help,

Owen S.

Business Systems and Configuration Controller
HWM-Water Ltd

Best Answers

Answers

  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Hi Cody, thanks for the info.  That sounds perfect.

    Sorry to be a PITA but would you mind helping with the syntax?

    I have this in the precondition:-

    // Target Point(s)
                    annotation { "Name" : "Select Sketch Point(s)", "Filter" : EntityType.VERTEX, "MaxNumberOfPicks" : 1 }
                                   
                                    // or for unlimited picks
                                   
                    // annotation { "Name" : "Select Sketch Point(s)", "Filter" : EntityType.VERTEX  }
                       
                        definition.targetpoint is Query;

    ...and then later in the function:-

    var sketch2 = newSketch(context, id, {
                            "sketchPlane" : evOwnerSketchPlane(definition.targetpoint)
                    });

    which is incorrect, throwing the error "Function evOwnerSketchPlane with 1 argument(s) not found".

    What is the correct method to evaluate this point and use it to create the sketch?

    -----------------------------------------------------------------------------------------------------
    The help file tells us we can use a vertex:-

    evOwnerSketchPlane (context is Context, arg is map) returns Plane

    Return the plane of the sketch that created the given entity.

    ParameterTypeAdditional Info
    arg map
    • entity
    Query

    The sketch entity. May be a vertex, edge, face, or body.

    ------------------------------------------------------------------------------------------------------

    Many thanks,

    Owen S.






    Business Systems and Configuration Controller
    HWM-Water Ltd
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    Thanks Gents.

    Extra filter added to precondition and:-

    var sketch1 = newSketchOnPlane(context, id, {
                            "sketchPlane" : evOwnerSketchPlane(context, {
                                    "entity" : definition.targetpoint
                            })
                    });

    Did exactly what was required.

    Your help is appreciated :)

    Cheers,

    Owen S

    Business Systems and Configuration Controller
    HWM-Water Ltd
Sign In or Register to comment.