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.
planeToWorld is off
skywinner26
Member Posts: 5 ✭
I'm using planeToWorld in my feature script to get the coordinates of a 2d point in 3d space but what the function returns is off from what it should be.
please help.
i'm trying to generate a bevel gear using only feature script(a bit like the official spur gear feature scipt) and i have 2 planes ,one the generate the cone and shape of the gear and an other plane to generate the gear tooth.I'm trying to use a point of the tooth plane in my cone plane but when changing a point coordinates to world coordinates the values given by planeToWorld are off.
document link(scripted bevel gear wip is the document with the problem): https://cad.onshape.com/documents/216704f1329f78fdec9132f2/w/3fee40f22fb2ff02f5a58658/e/66402d8518f150a673a6e1f1?renderMode=0&uiState=6251ee5004c9be7dde60bd86
please help.
i'm trying to generate a bevel gear using only feature script(a bit like the official spur gear feature scipt) and i have 2 planes ,one the generate the cone and shape of the gear and an other plane to generate the gear tooth.I'm trying to use a point of the tooth plane in my cone plane but when changing a point coordinates to world coordinates the values given by planeToWorld are off.
document link(scripted bevel gear wip is the document with the problem): https://cad.onshape.com/documents/216704f1329f78fdec9132f2/w/3fee40f22fb2ff02f5a58658/e/66402d8518f150a673a6e1f1?renderMode=0&uiState=6251ee5004c9be7dde60bd86
0
Answers
sketchPlane.origin[0]-point3_3D[0],
sketchPlane.origin[1]-point3_3D[1],
sketchPlane.origin[2]-point3_3D[2]);
point2_3D[0]-point3_3D[0],
point2_3D[1]-point3_3D[1],
point2_3D[2]-point3_3D[2]);
If you want to look at the original problem you should look at the v3 of the document.
Thank you Toshimichi_Oda for your feedback,you were on the updated version of the script(i fixed the original problem on that one),the problem you reported was me copy-pasting things to quickly.
To summarize,if planeToWorld is off just check if your plane has his axis normal to one another.