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.

Creating a Query from a Plane

graham_lockgraham_lock Member Posts: 142 PRO

Hi,

I have the following code:

var horizontalPartSketchPlane = evFaceTangentPlane(context, {
"face" : face,
"parameter" : vector(0.5, 0.5)
});

var skHorizontalPart = newSketch(context, id + faceIndex + "skHorizontalPart", {
"sketchPlane" : horizontalPartSketchPlane as Query
});

Which fails at the sketchPlane attribute.

What's the correct way to convert the plane entity to a query please?

Thank you.

Best Answer

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,680
    Answer ✓

    newSketchOnPlane (context is Context, id is Id, value is map) returns Sketch

    Create a new sketch on a custom plane, specified by a Plane object. The sketch coordinate system will match the coordinate system of the plane.

    Parameter

    Type

    Additional Info

    value

    map

    • sketchPlane

    Plane

    EXAMPLE

    plane(vector(0, 0, 0) * inch, vector(0, 0, 1))

     

    to sketch on the world XY plane.

    Senior Director, Technical Services, EMEAI

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,680
    Answer ✓

    newSketchOnPlane (context is Context, id is Id, value is map) returns Sketch

    Create a new sketch on a custom plane, specified by a Plane object. The sketch coordinate system will match the coordinate system of the plane.

    Parameter

    Type

    Additional Info

    value

    map

    • sketchPlane

    Plane

    EXAMPLE

    plane(vector(0, 0, 0) * inch, vector(0, 0, 1))

     

    to sketch on the world XY plane.

    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.