
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I've calculated translation parameters and rotation parameters by a least squares method to move a family to a wanted location. The problem is the folowing : as a french land surveyor, the coordinates system I used are very far from the point (0,0,0). Yet, the parameters I calculated are supposed to be applied from this point. To try to solve this problem I've created a project in which the survey point is (1000,5000,100) and the project base point is (1000,5000,0). All in meters. All my families are close to that point. My rotations angles are : close to 0 around axis X, close to 0 around axis Y, 45° around axis Z so around -0.78 radians. When I apply those, my family barely moves. But the orientation is right so I guess it does not apply those rotations from (0,0,0). This is how i do it :
ElementTransformUtils.RotateElement(doc, gr, axeX, X2[3, 0]);
ElementTransformUtils.RotateElement(doc, gr, axeY, X2[4, 0]);
ElementTransformUtils.RotateElement(doc, gr, axeZ, X2[5,0]);
(my paremeters are in double[,] X2)
The problem is that my translations parameters are HUGE since my family is supposed to be moved very far. So I guess I have two choices:
Either I can manage to apply my transformation from the point (0,0,0) and problem solved (unless Revit does not allow too extended-in-space projects),
Or if I could retrieve from which point the rotation is applied (maybe the SP or the PBP ? I don't know) I could just translate all my coordinates of my data before the least squares and calculate the parameters corresponding to a rotation applied from said point.
Anyone knows how to do either/both ?
Thanks in advance,
Jordi
Solved! Go to Solution.