• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Retreive world coords nested component InputPoint

Scheduled Pinned Locked Moved Developers' Forum
2 Posts 2 Posters 7.2k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    jur123
    last edited by 1 Nov 2014, 16:08

    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

    1 Reply Last reply Reply Quote 0
    • S Offline
      sdmitch
      last edited by 2 Nov 2014, 00:30

      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)}

      Nothing is worthless, it can always be used as a bad example.

      http://sdmitch.blogspot.com/

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement