Retreive world coords nested component InputPoint  Topic is solved

Retreive world coords nested component InputPoint

Postby jur123 » Sat Nov 01, 2014 5:08 pm

Hi,
I want to make a tool using InputPoint. On mouse click I select a face, works ok.
But I am not able to get the worldcoordinates if the face is in a nested component. I am puzzled as how to use the transformations. A simple example would be appreciated.
Regards, Jur
0

jur123 
 

Re: Retreive world coords nested component InputPoint  Topic is solved

Postby sdmitch » Sun Nov 02, 2014 1:30 am

InputPoint returns the transformation, if any, for the face you clicked on. Simply apply that tranformation to the vertices of the face to get the real world coordinates.

rwc = @ip.face.vertices.map{|v| v.position.transform(@ip.transformation)}
1
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: Bing [Bot] and 10 guests

Visit our sponsors: