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.

Vectors different depending on which plane used to create part

Lee_HeskethLee_Hesketh Member, Developers Posts: 148 ✭✭✭
@ilya_baran
Since you are familiar with my script, I thought it best if you had a look at this problem I have. Everything works fine except when creating the tenon after specific creation of parts. Basically, depending on which plane I use to create the sketch that is used to make the part that has the tenon, it either goes in the right place, or the offset is inverted. If I use the top plane and extrude in the z direction, it works fine. However, when I use the right plane and extrude in the y direction, the enon is outside of the part. i.e.

I don't know why it does this because I am debugging the points and they are correct. Do you have any idea as to why it does this? One workaround is to simply enter in a negative offset, but I want to have a fully robust script.
There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Hi Lee, if you are using the Right Plane you should extrude in the X direction. Is that the problem?
    Senior Director, Technical Services, EMEAI
  • Lee_HeskethLee_Hesketh Member, Developers Posts: 148 ✭✭✭
    Sorry, I meant Front plane. I may have to rewrite the whole script because it breaks too easily. Even still though, it should be placing the enon where the red dots are.
    There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Don't forget that Planes have two sides and if you look at the view cube you can see that normal to Front is -Y. If you reference a model face rather than a plane you will not have to determine plane direction and always know which way the normal for the face is pointing.
    Senior Director, Technical Services, EMEAI
  • Lee_HeskethLee_Hesketh Member, Developers Posts: 148 ✭✭✭
    Well my script makes a new sketch on a selected face and then a rectangle is drawn starting from one of the corners of that face. i am then using worldToPlane and adding another vector to offset it. The coordinates of the offset changes depending on whether the corner's coordinates are greater than the centre of the face, ass seen by the red dots in the image I posted. However, the resulting geometry is inverted. i.e offset is -ve for the dots but is +ve for the tenon and I don't know why. 
    There are 10 types of people in the world. Those who know binary, those who don't and those who didn't expect base 3!
Sign In or Register to comment.