Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [V8i VBA] Automating rotated cell insertion - which Matrix3d method?

$
0
0

Hi Jon, many thanks for the snippet.

I was testing the Matrix3dFromAxisAndRotationAngle method prior to your reply but found I was getting the wrong rotation.

I gave your function a test with the angle = angle - Pi() line commented and uncommented but found the cell rotations to not be correct.

The comment in your function did however lead me to the correct solution in the end which is below:

Function ConstructMatrix3D(ByVal degrees As Double) As Matrix3d
Dim angle                                         As Double
    angle = Radians(degrees)
    angle = (2 * Pi) - angle
    Const Z                                       As Long = 2
    ConstructMatrix3D = Matrix3dFromAxisAndRotationAngle(Z, angle)
End Function

I've verified your reply as ultimately it does do what was initially asking, thanks once again.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>