Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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-Orient a plane

I would like to draw a rectangle on the end of an I beam. I have found the plane and the points for the sketched rectangle but the plane's axes are not parallel with the edges of the beam.
I have queried the beam edges, Is it possible to rotate the plane so that one of its axes is in the same direction as the queried lines?

0
Best Answer
-
konstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
say if your lines are in linesQuery, sketch plane is stored in planeQuery then:var skPlane = evPlane(context,{"face":planeQuery});skPlane.xAxis = evLine(context, {"edge":linesQuery}).direction;then skPlane should have xAxis aligned to one of the edges and you can transfrom 3d vertex coordinate vectors to 2d vectors in plane's coordinate system with worldToPlane() function
7
Answers