• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Newbie to Ruby

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 4 Posters 162 Views 4 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.
  • D Offline
    daveedwards
    last edited by 14 Feb 2013, 13:51

    I've been with SU since nearly day one, but new to Ruby.

    I'm trying simply to create geometry based on points from selected geometry. I know how to parse through select objects, but can't seem to figure out how to extract the Start and End points of a selected Edge. Not sure this is the correct subforum for this. TIA!

    David William Edwards

    David William Edwards

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 14 Feb 2013, 17:27

      Assuming the reference to the Edge is e1

      sp = e1.start.position ep = e1.end.position

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 15 Feb 2013, 09:11

        <span class="syntaxdefault"><br /></span><span class="syntaxcomment">#&nbsp;Assuming&nbsp;a&nbsp;single&nbsp;edge&nbsp;is&nbsp;selected<br /></span><span class="syntaxdefault">model&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model<br />edge&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">selection</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">start_point&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">edge</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">position<br />end_point&nbsp;&nbsp;&nbsp;</span><span class="syntaxkeyword">=&nbsp;</span><span class="syntaxdefault">edge</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">end</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">position<br /></span>
        

        API Reference
        http://www.sketchup.com/intl/en/developer/docs/ourdoc/selection
        http://www.sketchup.com/intl/en/developer/docs/ourdoc/edge

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • O Offline
          Obryan
          last edited by 26 Feb 2013, 10:34

          I have been using Sketchup for a long time but I cant figure out how to load Solid Inspector.

          It seem that I have loaded Simple Installer correctly because I can see it in the plugins drop down menu. I believe I installed solid inspector the same way and I can see it in library/application support/sketchup/plugins.
          (see attached screen shot)

          However, it does not appear in the plugins drop down menu.

          When I open Sketchup I get this error message:

          Error Loading File tt_solid_inspector-2.rb
          no such file to load -- TT_Lib2/core.rbError Loading File tt_solid_inspector.rb
          no such file to load -- TT_Lib2/core.rbError Loading File tt_solid_inspector.rb
          no such file to load -- TT_Lib2/core.rb

          I am using a Mac OSX 10.6.8 with Snow Leopard and Sketchup 8.

          I have some complex components which I cant figure out how to make solid so I would really appreciate some help.

          Thank you in advance.
          Sean

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 26 Feb 2013, 21:04

            Did you ALSO install TT_Lib2 ?????????????

            Obviously solid inspector has a library dependancy on TT_Lib2.

            Did you read the solid inspector post for dependancies, and install all those needed ?

            I'm not here much anymore.

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

            Advertisement