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.

Featurescript to create plane from an edge and a direction

gauthier_östervallgauthier_östervall Member Posts: 28 EDU
edited June 22 in FeatureScript
I'm only just learning about Featurescript.

This is (a step towards) what I want: from an edge, create a plane that contains the edge and is vertical. Here is my attempt.

I've tried opPlane, but that requires a point and a normal. I don't have the normal (yet).

I've tried cPlane (seems like a logical choice, this what I want is practically the builtin "Line-angle" plane), but I can't find the documentation for the map it expects (auto-complete in the editor only says "definition").

My questions are:

- which one is the right way? opPlane, cPlane, something else, and why?
- how do I find out what the "definition" for cPlane should look like? I don't even know the name of the keys for that map.
- while trying opPlane, I noticed I couldn't even create a normal, that is a vector perpendicular to edge, and horizontal. I couldn't even extract the vertices at the end of Edge.
- isn't there an easier way to get a plane from an edge and a direction?

Some background: the plane is going to have a sketch with the projection of a face, then I'll do an Extrude between that face and the original face.


  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,112
    edited June 22
    In FeatureScript you can take a face at any angle and extrude it by any vector by a distance. So you don’t need a sketch or a plane. 

    If you want to do it your way, use opPlane. You can use qAdjacent to find the ends of a curve and evEdgeTangent (sic) to get the normal. 
  • gauthier_östervallgauthier_östervall Member Posts: 28 EDU
    @NeilCooke That seems appropriate! I also want the extrude to end as a vertical face, rather than parallel to the original face. This is why I wanted to go with the plane, but maybe there's another way to control the end of the extrude?
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 3,112
    You’re right. You will need a plane but you can use up to face in the extrude. 
Sign In or Register to comment.