Straighten imported model (STEP file)
Hiya,
:help: I'm receiving STEP files of objects that we're rendering for a client (I don't normally work in Maya), but it seems they end up standing on edge somehow. My suspicion is that the pivot point is not reset angle-wise to 0 degrees. I have been able to get the client to at least get the pivot point to XYZ zeroed, which means that the object (imagine a 1x1x3 box, regardless of unit) is standing at zero XYZ but on its edge basically. I have still been unable to get the client to "fix" this problem (I believe they're working in Inventor, but they're located in Poland and not fluent in English either, so I can't pay them a visit), so I'm wondering if there is any way or script I can use to "straighten" the model based on a known straight part of the model? Ideally, if I could select a single nurbshape (a plane) in the model that I know should be aligned along X and Z axis (i.e. flat on the ground) and run a script that either a) straightens the whole model (it's grouped in root) or b) gives me the X, Y and Z rotation to use to straighten it I would be eternally greatful. :) Ask away if there's anything else you might need to know. Oh, it's Maya 2012 on OS X btw. |
Alright, seems no one here could be bothered to point me to "Snap Align Object" -> "3 Points to 3 Points", but luckily I found the answer elsewhere...
Anywho, I ended up writing a small script (works for me at least) that may be of help for someone else, here goes: Code:
// this finds the name of the group the selected object belongs to Depending on the model, you may have to rotate it anyways, but it should now be a question of 90 degree angles only. After the straightening is done you should remove the "leftover" refOrig and refPlan objects. I will not provide any further support for this script, but it may be of help to someone out there :) |
The reason your imported files are rotated by 90 degrees is that inventor, like many true engineering CAD apps, uses the Z-axis as the up axis. Maya uses the Y-axis as the up axis by default.
You can fix this in three ways. 1. change the up axis in maya by going to windows > settings / preferences > settings and making the up axis the Z-axis for your clients files. 2. Have your client set the up axis in Inventor or his CAD surfacing app to be the Y-axis. I cannot recall where this is done in Inventor but I know it can be done. 3. create a mel as you have to rotate all imported objects about the X-axis by 90 degrees and freeze their transforms effectively making the Y-axis the up axis. I am not a mel guy so I cannot really comment on your script. |
Bornhall
Its not a case of anyone being bothered. People may not actually know hence, no answers. As CTBram says....... for the record MAX uses Z up I believe. If Dave or NextDesign are around they may be able to help with the script J |
All times are GMT. The time now is 05:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018