Set the last column of a Geom::Transformation

Set the last column of a Geom::Transformation

Postby Voulz » Wed Jun 27, 2018 2:33 pm

Hi Guys,

I am working on a plugin handling projections where I end up creating my own transformation matrices. I was getting weird results and it took me a while to see that SketchUp was discarding some data from the last column , which is problematic in my case.

Code: Select all
Geom::Transformation.new([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]).to_a
>> [1.0, 2.0, 3.0, 0.0, 5.0, 6.0, 7.0, 0.0, 9.0, 10.0, 11.0, 0.0, 13.0, 14.0, 15.0, 16.0]

(note the missing items #3,#7,#11 keeping the value 0.0)

Do you know why and if there is any workaround?

Thanks!
0

Voulz 
 

Re: Set the last column of a Geom::Transformation

Postby faust07 » Fri Jun 29, 2018 3:55 pm

You may find information on this in:

"Automatic SketchUp - Creating 3-D Models in Ruby"
by Mathew Scarpino
Permissions may be sought directly from Eclipse Engineering LLC:
Fax: (925) 262-1757
E-mail: info@eclipseengineer.com

Appendix B: Advanced Geometry..................................... 391
B.3 Introduction to Transformation Matrices .........................................406
B.4 Combinations of Transformations...................................................415
B.5 Transforming Points and Vectors....................................................418
B.6 Mathematics of Combining Transformations....................................423

You may find helpful links here:
viewtopic.php?f=180&t=10142&p=573943&hilit=automatic+sketchup#p269709
0

faust07 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 5 guests

Visit our sponsors: