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.
problems with "x-axis" key in Plane object
adamohern
Member, OS Professional Posts: 216 PRO
I'm trying to retrieve the X axis vector for a Plane.
Huzzah! Except that I can't access the "x-axis" key in the map.
What am I missing?
var sketchPlane = plane(origin, normal, xDirection);
println(sketchPlane);
// result:
// normal(0, 0.7071067811865476, -0.7071067811865476)
// origin(-0.3048 meter, -0.6096 meter, 1.2192 meter)
// x-axis(1, 0, 0)
Huzzah! Except that I can't access the "x-axis" key in the map.
println(sketchPlane.x-axis);
// result:
// Variable axis not found.
// Using "-" in a map key is probably a bad idea for this reason. println(sketchPlane["x-axis"]); // result: // undefined // What the wha? It's clearly defined, as you can see in the original println() above.
What am I missing?
0
Comments